2016-02-21 00:12:01 +00:00
|
|
|
# U-Boot: Raspberry Pi
|
|
|
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
2024-02-16 18:43:41 +00:00
|
|
|
# Maintainer: graysky <therealgraysky@proton.me>
|
2016-02-21 00:12:01 +00:00
|
|
|
|
|
|
|
pkgname=uboot-raspberrypi
|
2024-11-23 13:16:08 +00:00
|
|
|
pkgver=2024.10
|
|
|
|
pkgrel=1
|
2016-02-21 00:12:01 +00:00
|
|
|
pkgdesc="U-Boot for Raspberry Pi"
|
2016-12-11 21:23:19 +00:00
|
|
|
arch=('armv7h' 'aarch64')
|
2024-02-16 18:43:41 +00:00
|
|
|
url='https://docs.u-boot.org/en/latest'
|
2016-02-21 00:12:01 +00:00
|
|
|
license=('GPL')
|
2016-12-11 21:23:19 +00:00
|
|
|
backup=('boot/boot.txt' 'boot/boot.scr' 'boot/config.txt')
|
2024-07-08 07:11:18 +00:00
|
|
|
makedepends=('bc' 'dtc' 'git' 'util-linux')
|
2024-02-16 18:43:41 +00:00
|
|
|
conflicts_armv7h=('linux-rpi' 'linux-rpi-16k')
|
2024-07-04 17:44:40 +00:00
|
|
|
_commit=c0307606abef9e6070d50047e7fa62d8354d8c29
|
2024-02-13 19:46:21 +00:00
|
|
|
source=(
|
2024-07-08 07:11:18 +00:00
|
|
|
# these work for aarch64 but not for armv7h
|
2024-02-13 19:46:21 +00:00
|
|
|
"https://github.com/u-boot/u-boot/archive/refs/tags/v${pkgver/rc/-rc}.tar.gz"
|
2024-02-16 18:43:41 +00:00
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2710-rpi-2-b.dtb"
|
2020-06-01 12:51:47 +00:00
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2710-rpi-3-b-plus.dtb"
|
2024-02-16 18:43:41 +00:00
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2710-rpi-3-b.dtb"
|
2020-06-01 12:51:47 +00:00
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2710-rpi-cm3.dtb"
|
2024-02-16 18:43:41 +00:00
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2710-rpi-zero-2-w.dtb"
|
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2710-rpi-zero-2.dtb"
|
2020-06-01 12:51:47 +00:00
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2711-rpi-4-b.dtb"
|
2024-02-16 18:43:41 +00:00
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2711-rpi-400.dtb"
|
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2711-rpi-cm4-io.dtb"
|
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2711-rpi-cm4.dtb"
|
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2711-rpi-cm4s.dtb"
|
2024-06-01 12:40:13 +00:00
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2712-rpi-5-b.dtb"
|
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2712d0-rpi-5-b.dtb"
|
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2712-rpi-cm5-cm4io.dtb"
|
|
|
|
"https://github.com/raspberrypi/firmware/raw/${_commit}/boot/bcm2712-rpi-cm5-cm5io.dtb"
|
2024-07-08 07:11:18 +00:00
|
|
|
# these are from linux-armv7-6.9.8-1
|
|
|
|
bcm2712-rpi-5-b.v7
|
|
|
|
bcm2710-rpi-3-b-plus.v7
|
|
|
|
bcm2711-rpi-cm4-io.v7
|
|
|
|
bcm2712-rpi-cm5-cm4io.v7
|
|
|
|
bcm2710-rpi-3-b.v7
|
|
|
|
bcm2711-rpi-cm4.v7
|
|
|
|
bcm2711-rpi-cm4s.v7
|
|
|
|
bcm2711-rpi-400.v7
|
|
|
|
bcm2712d0-rpi-5-b.v7
|
|
|
|
bcm2710-rpi-zero-2.v7
|
|
|
|
bcm2712-rpi-cm5-cm5io.v7
|
|
|
|
bcm2710-rpi-zero-2-w.v7
|
|
|
|
bcm2710-rpi-cm3.v7
|
|
|
|
bcm2711-rpi-4-b.v7
|
2020-08-09 00:55:01 +00:00
|
|
|
'0001-rpi-increase-space-for-kernel.patch'
|
2024-08-07 11:59:53 +00:00
|
|
|
'0002-fix-serial-console.patch'
|
2016-12-11 21:23:19 +00:00
|
|
|
'boot.txt.v2'
|
|
|
|
'boot.txt.v3'
|
2016-02-21 00:12:01 +00:00
|
|
|
'mkscr')
|
2024-11-23 13:16:08 +00:00
|
|
|
md5sums=('f1ef24a7d9907c0aeedde50938726598'
|
2024-07-04 17:44:40 +00:00
|
|
|
'11c5a49b7b4951a571fe1a8537c329c6'
|
|
|
|
'0190cba24f7a637cdf6019d6750c59ff'
|
|
|
|
'c291d947389308411e3779782522f7c3'
|
|
|
|
'8dea82ecb9ec769246767836c74fb8f7'
|
|
|
|
'7e9846deb2c8f81283ccae35240258e1'
|
|
|
|
'7e9846deb2c8f81283ccae35240258e1'
|
|
|
|
'ce1dc48eb08210929e48eac31d5ec031'
|
|
|
|
'e7edf95cfa70211a6db053615c8c45c3'
|
2024-06-01 12:40:13 +00:00
|
|
|
'3efd77582f05e5ca6f55ec14f00810e1'
|
2024-07-04 17:44:40 +00:00
|
|
|
'687902e98a5e4367a2b0f3914752a0c9'
|
|
|
|
'fbfe64dc18614d75d22955eeb3a8cae1'
|
|
|
|
'94abb358fd4af83907dc16e19b65d4f3'
|
|
|
|
'd8619315e6c8896df1727008b7e9359f'
|
|
|
|
'9fb99782610680f2c5457afb65a60826'
|
|
|
|
'8d16fd383d663662ca60f750a69ed732'
|
2024-07-08 07:11:18 +00:00
|
|
|
'94abb358fd4af83907dc16e19b65d4f3'
|
|
|
|
'0190cba24f7a637cdf6019d6750c59ff'
|
|
|
|
'3efd77582f05e5ca6f55ec14f00810e1'
|
|
|
|
'9fb99782610680f2c5457afb65a60826'
|
|
|
|
'c291d947389308411e3779782522f7c3'
|
|
|
|
'687902e98a5e4367a2b0f3914752a0c9'
|
|
|
|
'fbfe64dc18614d75d22955eeb3a8cae1'
|
|
|
|
'e7edf95cfa70211a6db053615c8c45c3'
|
|
|
|
'd8619315e6c8896df1727008b7e9359f'
|
|
|
|
'7e9846deb2c8f81283ccae35240258e1'
|
|
|
|
'8d16fd383d663662ca60f750a69ed732'
|
|
|
|
'7e9846deb2c8f81283ccae35240258e1'
|
|
|
|
'8dea82ecb9ec769246767836c74fb8f7'
|
|
|
|
'35074bb767e8b259c5825b0c1f17fd60'
|
2024-06-02 00:22:08 +00:00
|
|
|
'636c8ac2098ebf0acdc2ff15430edf0d'
|
2024-08-07 11:59:53 +00:00
|
|
|
'daa8314d29129e1b1ae0b316604bf8be'
|
2024-07-08 15:48:34 +00:00
|
|
|
'f8ad4508b9734e9e13aedb9f7419d7a3'
|
2020-08-09 00:55:01 +00:00
|
|
|
'be8abe44b86d63428d7ac3acc64ee3bf'
|
2016-02-21 00:12:01 +00:00
|
|
|
'021623a04afd29ac3f368977140cfbfd')
|
|
|
|
|
2019-07-06 15:23:58 +00:00
|
|
|
prepare() {
|
|
|
|
cd u-boot-${pkgver/rc/-rc}
|
|
|
|
|
2020-08-09 00:55:01 +00:00
|
|
|
patch -p1 -i ../0001-rpi-increase-space-for-kernel.patch
|
2024-08-07 11:59:53 +00:00
|
|
|
patch -p1 -i ../0002-fix-serial-console.patch
|
2019-07-06 15:23:58 +00:00
|
|
|
}
|
|
|
|
|
2016-02-21 00:12:01 +00:00
|
|
|
build() {
|
2016-12-11 21:23:19 +00:00
|
|
|
cd u-boot-${pkgver/rc/-rc}
|
2016-02-21 00:12:01 +00:00
|
|
|
|
|
|
|
unset CFLAGS
|
|
|
|
unset CXXFLAGS
|
|
|
|
unset CPPFLAGS
|
|
|
|
|
2016-12-11 21:23:19 +00:00
|
|
|
make distclean
|
|
|
|
[[ $CARCH == "armv7h" ]] && make rpi_2_config
|
2020-06-01 12:51:47 +00:00
|
|
|
[[ $CARCH == "aarch64" ]] && make rpi_arm64_config
|
2017-03-22 01:56:50 +00:00
|
|
|
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> .config
|
2016-02-21 00:12:01 +00:00
|
|
|
make EXTRAVERSION=-${pkgrel}
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2016-12-11 21:23:19 +00:00
|
|
|
cd u-boot-${pkgver/rc/-rc}
|
2016-02-21 00:12:01 +00:00
|
|
|
|
|
|
|
mkdir -p "${pkgdir}"/boot
|
|
|
|
|
2016-12-11 21:23:19 +00:00
|
|
|
if [[ $CARCH == "armv7h" ]]; then
|
|
|
|
cp u-boot.bin ${pkgdir}/boot/kernel7.img
|
|
|
|
cp ../boot.txt.v2 ../boot.txt
|
2024-07-08 07:11:18 +00:00
|
|
|
cp ../*.v7 ${pkgdir}/boot
|
|
|
|
rename .v7 .dtb ${pkgdir}/boot/*
|
2016-12-11 21:23:19 +00:00
|
|
|
elif [[ $CARCH == "aarch64" ]]; then
|
|
|
|
cp u-boot.bin ${pkgdir}/boot/kernel8.img
|
2020-06-01 12:51:47 +00:00
|
|
|
cp ../*.dtb ${pkgdir}/boot
|
2016-12-11 21:23:19 +00:00
|
|
|
cp ../boot.txt.v3 ../boot.txt
|
|
|
|
fi
|
2016-02-21 00:12:01 +00:00
|
|
|
|
2024-07-08 07:11:18 +00:00
|
|
|
echo "enable_uart=1" > ${pkgdir}/boot/config.txt
|
2016-02-21 00:12:01 +00:00
|
|
|
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
|
|
|
|
}
|