# Reference: # Maintainer: exkc pkgname=u-boot-amediatech-x96-mini pkgver=2023.04 pkgrel=0 pkgdesc="U-Boot bootloader for Amediatech x96 mini" url="https://source.denx.de/u-boot" arch="aarch64" _ubootver=2023.04-rc3 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 proprietary" makedepends="$depends_dev bc bison crust dtc flex openssl-dev py3-setuptools python3-dev swig bash " options="!check" # https://u-boot.readthedocs.io/en/latest/board/amlogic/pre-generated-fip.html _amlogicblob_commit="e96b6a694380ff07d5a9e4be644ffe254bd18512" source="https://source.denx.de/u-boot/u-boot/-/archive/v$_ubootver/u-boot-v$_ubootver.tar.gz 0001-add-x96-mini-support.patch amlogicblob_amediatech_x96_mini.tar.gz::https://github.com/LibreELEC/amlogic-boot-fip/archive/$_amlogicblob_commit.tar.gz " builddir="$srcdir/u-boot-v$_ubootver" _fipbuilddir="$srcdir/amlogic-boot-fip-$_amlogicblob_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 make x96_mini_defconfig make all cd $_fipbuilddir mkdir build # We dont have the fip for x96 mini so we use jethub j80's fip ./build-fip.sh jethub-j80 $builddir/u-boot.bin ./build cd ./build dd if=u-boot.bin.sd.bin of=u-boot.bin.sd-stripped.bin conv=fsync,notrunc bs=512 skip=1 } package() { _installdir="$pkgdir/usr/share/u-boot/amediatech-x96-mini" install -Dm644 "$_fipbuilddir/build/u-boot.bin.sd-stripped.bin" -t "$_installdir" install -Dm644 "$_fipbuilddir/build/u-boot.bin.sd.bin" -t "$_installdir" install -Dm644 "$_fipbuilddir/build/u-boot.bin" -t "$_installdir" install -Dm644 "$_fipbuilddir/build/u-boot.bin.usb.bl2" -t "$_installdir" install -Dm644 "$_fipbuilddir/build/u-boot.bin.usb.tpl" -t "$_installdir" } sha512sums=" 4d2afc652d1431f17694bb41493c699dd477c82b466282a24094c59fada558df7c8a79518c1804729a73dd901d2e24beb1643313cb2d93d348559410182bc67b u-boot-v2023.04-rc3.tar.gz 3d78bbf9f945acce5bc9a54cc67b62a5958b5ff66e252cfced46efba05cf9e442086692b8d8c056b8e42bfff28ede1ad6069e9437c96883d38f2fd6dbf01b2dc 0001-add-x96-mini-support.patch 98ecbbc56e8326ce11db4e316a7bb3812d713fbe630235825ddb657b28419eb406f7117208a5c0360653ebdccb9af1a48357d0c257cd61f11a8c3cdaa78548b5 amlogicblob_amediatech_x96_mini.tar.gz "