PKGBUILDs/alarm/uboot-raspberrypi/PKGBUILD

71 lines
2.1 KiB
Bash
Raw Normal View History

2016-02-21 00:12:01 +00:00
# U-Boot: Raspberry Pi
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
2016-12-11 21:23:19 +00:00
buildarch=12
2016-02-21 00:12:01 +00:00
pkgname=uboot-raspberrypi
2020-06-01 12:51:47 +00:00
pkgver=2020.04
2016-02-21 00:12:01 +00:00
pkgrel=1
pkgdesc="U-Boot for Raspberry Pi"
2016-12-11 21:23:19 +00:00
arch=('armv7h' 'aarch64')
2016-02-21 00:12:01 +00:00
url='http://www.denx.de/wiki/U-Boot/WebHome'
license=('GPL')
2016-12-11 21:23:19 +00:00
backup=('boot/boot.txt' 'boot/boot.scr' 'boot/config.txt')
2016-02-21 00:12:01 +00:00
makedepends=('bc' 'dtc' 'git')
2016-12-11 21:23:19 +00:00
conflicts_armv7h=('linux-raspberrypi')
2020-06-01 12:51:47 +00:00
_commit=f4b58692fef0b9c16bd4564edb980fff73a758b3
2016-12-11 21:23:19 +00:00
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
2020-06-01 12:51:47 +00:00
"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"
2016-12-11 21:23:19 +00:00
'boot.txt.v2'
'boot.txt.v3'
2016-02-21 00:12:01 +00:00
'mkscr')
2020-06-01 12:51:47 +00:00
md5sums=('51113d2288c55110e33a895c65ab9f60'
'0c56f6b8fde06be1415b3ff85b5b5370'
'e4b819439961514c7441473d4733a1b4'
'38cab92f98944f0492c5320cf8b36870'
'04f2dd06c65cd7ad2932041cbe220a13'
2017-03-22 01:56:50 +00:00
'69e883f0b8d1686b32bdf79684623f06'
2017-11-13 02:54:18 +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}
}
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
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
echo "enable_uart=1" > ${pkgdir}/boot/config.txt
fi
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
}