From 4a44a5b92d559f6433c412e67c8e102b6e4a58da Mon Sep 17 00:00:00 2001 From: nxshock Date: Sun, 19 Feb 2023 13:06:54 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB(=D0=B0)=20?= =?UTF-8?q?'PKGBUILD'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..58c9134 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# U-Boot: Orange Pi 4 +# Maintainer: Kevin Mihelich +# Maintainer: Joseph Kogut + +buildarch=8 + +pkgname=uboot-orangepi4 +pkgver=2021.10 +pkgrel=1 +_srcname=u-boot-${pkgver} +pkgdesc="U-Boot for Orange Pi 4" +arch=('aarch64') +url='http://www.denx.de/wiki/U-Boot/WebHome' +license=('GPL') +backup=('boot/boot.txt' 'boot/boot.scr') +makedepends=('bc' 'git') +install=${pkgname}.install +atfver=2.5 +opi4_patch_sha=86abac1 +source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2" + "https://raw.githubusercontent.com/armbian/build/${opi4_patch_sha}/patch/u-boot/u-boot-rockchip64/add-board-orangepi-4.patch" + 'boot.txt' + 'mkscr' + 'bl31.elf::https://github.com/rockchip-linux/rkbin/raw/master/bin/rk33/rk3399_bl31_v1.35.elf') +md5sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') +prepare() { + cd ${srcdir}/${_srcname} + patch -p1 -i ../add-board-orangepi-4.patch +} + +build() { + unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS + + cd ${srcdir}/${_srcname} + + make orangepi-4-rk3399_defconfig + + echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> .config + make EXTRAVERSION=-${pkgrel} BL31=${srcdir}/bl31.elf +} + +package() { + cd ${_srcname} + + mkdir -p "${pkgdir}/boot" + + cp idbloader.img u-boot.itb "${pkgdir}/boot" + + 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 +}