# Mainline u-boot with the PinePhone Pro device tree and config pkgname=u-boot-pine64-pinephonepro pkgver=2021.01 pkgrel=1 pkgdesc="u-boot bootloader for the pinephone pro" url="https://git.sr.ht/~martijnbraam/u-boot" arch="aarch64" license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs ISC LGPL-2.0-only LGPL-2.1-only X11" makedepends="$depends_dev arm-trusted-firmware bc bison dtc flex openssl-dev python3-dev swig " options="!check" _commit="5fbafb8bc4cedb6d7aaefc525daa6145ea648528" source=" $pkgname-$_commit.tar.gz::https://git.sr.ht/~martijnbraam/u-boot/archive/$_commit.tar.gz " builddir="$srcdir"/u-boot-$_commit build() { touch include/config.h LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > include/timestamp_autogenerated.h LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> include/timestamp_autogenerated.h export BL31="/usr/share/arm-trusted-firmware/rk3399/bl31.elf" export BUILD_DIR="$builddir"/build mkdir -p "$BUILD_DIR" make O="$BUILD_DIR" HOSTCC=gcc ARCH=arm pinephone-pro-rk3399_defconfig make O="$BUILD_DIR" HOSTCC=gcc ARCH=arm all } package() { install -D -m644 build/u-boot-rockchip.bin \ "$pkgdir"/usr/share/u-boot/pine64-pinephonepro/u-boot-rockchip.bin } sha512sums=" 7bc3a8ad67a332df0206980a53dd95e699b6a70d0ab65aac9aab604e8dcb3e863a496d2a86e12ed14670d2dec01f7db87da849786a971bb6ee9ebfd4124e3308 u-boot-pine64-pinephonepro-5fbafb8bc4cedb6d7aaefc525daa6145ea648528.tar.gz "