mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
62 lines
1.6 KiB
Bash
62 lines
1.6 KiB
Bash
# U-Boot: Raspberry Pi
|
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
buildarch=12
|
|
|
|
pkgname=uboot-raspberrypi
|
|
pkgver=2016.11
|
|
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')
|
|
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
|
|
'0001-arch-linux-arm-modifications.patch'
|
|
'boot.txt.v2'
|
|
'boot.txt.v3'
|
|
'mkscr')
|
|
md5sums=('ca1f6e019d08aff8d0ca1beb2e66737d'
|
|
'7410bad5df89ae981e8c4b680d40e40e'
|
|
'c42b8a22509ca7d1580ce3916c28ae74'
|
|
'b628c01f99130b5869596326d57634a8'
|
|
'021623a04afd29ac3f368977140cfbfd')
|
|
|
|
prepare() {
|
|
cd u-boot-${pkgver/rc/-rc}
|
|
|
|
git apply ../0001-arch-linux-arm-modifications.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_3_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 ../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
|
|
}
|