PKGBUILDs/alarm/uboot-raspberrypi/PKGBUILD

63 lines
1.6 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
2016-12-11 21:23:19 +00:00
pkgver=2016.11
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')
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
2016-02-21 00:12:01 +00:00
'0001-arch-linux-arm-modifications.patch'
2016-12-11 21:23:19 +00:00
'boot.txt.v2'
'boot.txt.v3'
2016-02-21 00:12:01 +00:00
'mkscr')
2016-12-11 21:23:19 +00:00
md5sums=('ca1f6e019d08aff8d0ca1beb2e66737d'
'7410bad5df89ae981e8c4b680d40e40e'
'c42b8a22509ca7d1580ce3916c28ae74'
'b628c01f99130b5869596326d57634a8'
2016-02-21 00:12:01 +00:00
'021623a04afd29ac3f368977140cfbfd')
prepare() {
2016-12-11 21:23:19 +00:00
cd u-boot-${pkgver/rc/-rc}
2016-02-21 00:12:01 +00:00
git apply ../0001-arch-linux-arm-modifications.patch
}
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
[[ $CARCH == "aarch64" ]] && make rpi_3_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
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
}