mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
761362bbc2
This release fixes non-functional USB on RPi4 8G model w/ linux-aarch64
73 lines
2.3 KiB
Bash
73 lines
2.3 KiB
Bash
# U-Boot: Raspberry Pi
|
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
buildarch=12
|
|
|
|
pkgname=uboot-raspberrypi
|
|
pkgver=2021.04
|
|
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=fb0bfa6a669745578041e838fc73cc17e8c543c9
|
|
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
|
|
"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=('1299c23ee4fde7e73a1b9f8f80fd28e0'
|
|
'a3b0c472a22d72b314a3e6b8ae1e8fbe'
|
|
'ff09713c9a5f5a6232609c8492dd2d41'
|
|
'cbd634c5b9e4b0a088330ebfa6412202'
|
|
'67b69121709d6a442c0214ddef336470'
|
|
'728c4a0a542db702b8d88ffe1994660c'
|
|
'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
|
|
}
|