mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
b6c043cb06
Update to latest and adjust patch to fix boot issue with linux-aarch64
72 lines
2.3 KiB
Bash
72 lines
2.3 KiB
Bash
# U-Boot: Raspberry Pi
|
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
pkgname=uboot-raspberrypi
|
|
pkgver=2024.01
|
|
pkgrel=1
|
|
pkgdesc="U-Boot for Raspberry Pi"
|
|
arch=('armv7h' 'aarch64')
|
|
url='http://www.denx.de/wiki/U-Boot/WebHome'
|
|
license=('GPL')
|
|
backup=('boot/boot.txt' 'boot/boot.scr' 'boot/config.txt')
|
|
makedepends=('bc' 'dtc' 'git')
|
|
conflicts_armv7h=('linux-raspberrypi')
|
|
_commit=2a1e5bfd933d977a57ba4cd62f3381fdc339e29a
|
|
source=(
|
|
"https://github.com/u-boot/u-boot/archive/refs/tags/v${pkgver/rc/-rc}.tar.gz"
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2710-rpi-3-b.dtb"
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2710-rpi-3-b-plus.dtb"
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2710-rpi-cm3.dtb"
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2711-rpi-4-b.dtb"
|
|
'0001-rpi-increase-space-for-kernel.patch'
|
|
'boot.txt.v2'
|
|
'boot.txt.v3'
|
|
'mkscr')
|
|
md5sums=('6e0b18756a5f856b3bf520eea12f5e40'
|
|
'797f952a9f21522c4f303393fd4b582d'
|
|
'db77bbeb380319a3a230d6985b9a8e32'
|
|
'80e31ec6eb9d5b2fef4402c4490af57d'
|
|
'1479091344ee42694d72ebc57d2f06ec'
|
|
'cc3d9cb2cc977b22d236922005102be7'
|
|
'69e883f0b8d1686b32bdf79684623f06'
|
|
'be8abe44b86d63428d7ac3acc64ee3bf'
|
|
'021623a04afd29ac3f368977140cfbfd')
|
|
|
|
prepare() {
|
|
cd u-boot-${pkgver/rc/-rc}
|
|
|
|
patch -p1 -i ../0001-rpi-increase-space-for-kernel.patch
|
|
}
|
|
|
|
build() {
|
|
cd u-boot-${pkgver/rc/-rc}
|
|
|
|
unset CFLAGS
|
|
unset CXXFLAGS
|
|
unset CPPFLAGS
|
|
|
|
make distclean
|
|
[[ $CARCH == "armv7h" ]] && make rpi_2_config
|
|
[[ $CARCH == "aarch64" ]] && make rpi_arm64_config
|
|
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> .config
|
|
make EXTRAVERSION=-${pkgrel}
|
|
}
|
|
|
|
package() {
|
|
cd u-boot-${pkgver/rc/-rc}
|
|
|
|
mkdir -p "${pkgdir}"/boot
|
|
|
|
if [[ $CARCH == "armv7h" ]]; then
|
|
cp u-boot.bin ${pkgdir}/boot/kernel7.img
|
|
cp ../boot.txt.v2 ../boot.txt
|
|
elif [[ $CARCH == "aarch64" ]]; then
|
|
cp u-boot.bin ${pkgdir}/boot/kernel8.img
|
|
cp ../*.dtb ${pkgdir}/boot
|
|
cp ../boot.txt.v3 ../boot.txt
|
|
echo "enable_uart=1" > ${pkgdir}/boot/config.txt
|
|
fi
|
|
|
|
tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt "${pkgdir}"/boot/boot.scr
|
|
cp ../{boot.txt,mkscr} "${pkgdir}"/boot
|
|
}
|