PKGBUILDs/alarm/uboot-rock64/PKGBUILD

60 lines
1.6 KiB
Bash
Raw Normal View History

2018-04-03 00:29:30 +00:00
# U-Boot: Rock64
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
buildarch=8
pkgname=uboot-rock64
pkgver=2020.07
2018-04-03 00:29:30 +00:00
pkgrel=1
pkgdesc="U-Boot for Rock64"
arch=('aarch64')
url='http://www.denx.de/wiki/U-Boot/WebHome'
license=('GPL')
backup=('boot/boot.txt' 'boot/boot.scr')
makedepends=('bc' 'git' 'python' 'swig' 'dtc' 'uboot-tools')
2018-04-03 00:29:30 +00:00
install=${pkgname}.install
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
"https://github.com/ARM-software/arm-trusted-firmware/archive/v2.3.tar.gz"
2018-04-03 00:29:30 +00:00
'boot.txt'
'mkscr')
md5sums=('86e51eeccd15e658ad1df943a0edf622'
'06ad72bdf63b922a3f3865d81f5d9ad2'
2018-04-03 00:29:30 +00:00
'c926f318d8fa7a5c89108331cbd3f8e2'
'021623a04afd29ac3f368977140cfbfd')
prepare() {
cd ${srcdir}/arm-trusted-firmware-2.3
make PLAT=rk3328 all
cd ${srcdir}/u-boot-${pkgver}
cp ../arm-trusted-firmware-2.3/build/rk3328/release/bl31/bl31.elf ./bl31.elf
cd ${srcdir}/u-boot-${pkgver}/configs
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> rock64-rk3328_defconfig
}
2018-04-03 00:29:30 +00:00
build() {
cd ${srcdir}/u-boot-${pkgver}
2018-04-03 00:29:30 +00:00
unset CLFAGS CXXFLAGS CPPFLAGS LDFLAGS
make rock64-rk3328_defconfig
2018-04-03 00:29:30 +00:00
make EXTRAVERSION=-${pkgrel}
make EXTRAVERSION=-${pkgrel} u-boot.itb
2018-04-03 00:29:30 +00:00
}
package() {
cd u-boot-${pkgver}
2018-04-03 00:29:30 +00:00
mkdir -p "${pkgdir}/boot"
tools/mkimage -n rk3328 -T rksd -d ./tpl/u-boot-tpl.bin "${pkgdir}/boot/rksd_loader.img"
cat ./spl/u-boot-spl.bin >> "${pkgdir}/boot/rksd_loader.img"
2018-04-03 00:29:30 +00:00
cp ./u-boot.itb "${pkgdir}/boot/u-boot.itb"
2018-04-03 00:29:30 +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
}