# U-Boot: Pinebook, based on Pine64 PKGBUILD # Maintainer: Dan Johansen # Contributor: Kevin Mihelich pkgname=uboot-pinebook pkgver=2020.10 pkgrel=1 _tfaver=2.3 pkgdesc="U-Boot for Pinebook" arch=('aarch64') url='http://www.denx.de/wiki/U-Boot/WebHome' license=('GPL') makedepends=('bc' 'git' 'python' 'swig' 'dtc') provides=('uboot') conflicts=('uboot') install=${pkgname}.install source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2" "https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/trusted-firmware-a-$_tfaver.tar.gz") md5sums=('14656f08aa73a8dbbde2424fe78bbe3b' '628a32a3c3b3f0c567d1ea6ee5582807') build() { unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS cd trusted-firmware-a-$_tfaver make PLAT=sun50i_a64 DEBUG=1 bl31 cp build/sun50i_a64/debug/bl31.bin ../u-boot-${pkgver/rc/-rc} cd ../u-boot-${pkgver/rc/-rc} make distclean make pinebook_defconfig echo 'CONFIG_IDENT_STRING=" Manjaro ARM"' >> .config make EXTRAVERSION=-${pkgrel} cat spl/sunxi-spl.bin u-boot.itb > u-boot-sunxi-with-spl-pinebook.bin } package() { cd u-boot-${pkgver/rc/-rc} mkdir -p "${pkgdir}"/boot/extlinux cp u-boot-sunxi-with-spl-pinebook.bin "${pkgdir}"/boot }