uboot-orangepi-opi4/PKGBUILD

56 lines
1.4 KiB
Bash
Raw Normal View History

2023-02-19 13:06:54 +05:00
# U-Boot: Orange Pi 4
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
# Maintainer: Joseph Kogut <joseph.kogut@gmail.com>
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
}