diff options
author | Eric Woudstra | 2023-03-07 09:28:48 +0100 |
---|---|---|
committer | Eric Woudstra | 2023-03-07 09:28:48 +0100 |
commit | 9a767ad1a4853015a9cec00874926c2d21e4c553 (patch) | |
tree | 59c337f73b63f78a016048113e44d32da97f9d2f | |
parent | 180fa3d0063d70735eaab78e13d81ae538b43001 (diff) | |
download | aur-9a767ad1a4853015a9cec00874926c2d21e4c553.tar.gz |
Use unpatched version of mkimage for R3
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | 95-atf.hook | 2 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rwxr-xr-x | bpir-writefip (renamed from bpir64-writefip) | 12 | ||||
-rw-r--r-- | bpir64-atf-git.install | 2 |
5 files changed, 23 insertions, 17 deletions
@@ -1,7 +1,7 @@ pkgbase = bpir64-atf-git - pkgdesc = ATF bpir64 images including fiptool + pkgdesc = ATF BPI-R64 & BPI-R3 images including fiptool pkgver = v2.8r12079.7155480e7 - pkgrel = 1 + pkgrel = 2 epoch = 2 url = https://github.com/mtk-openwrt/arm-trusted-firmware.git install = bpir64-atf-git.install @@ -12,7 +12,7 @@ pkgbase = bpir64-atf-git depends = linux source = git+https://github.com/ericwoud/arm-trusted-firmware.git#branch=bpir source = 95-atf.hook - source = bpir64-writefip + source = bpir-writefip sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP diff --git a/95-atf.hook b/95-atf.hook index 9be80110560c..a24e72b9353c 100644 --- a/95-atf.hook +++ b/95-atf.hook @@ -8,4 +8,4 @@ Target = usr/lib/initcpio/* [Action] Description = Updating fip partition... When = PostTransaction -Exec = /usr/bin/bpir64-writefip +Exec = /usr/bin/bpir-writefip @@ -7,8 +7,8 @@ _gitbranch="bpir" pkgname=bpir64-atf-git epoch=2 pkgver=v2.8r12079.7155480e7 -pkgrel=1 -pkgdesc='ATF bpir64 images including fiptool' +pkgrel=2 +pkgdesc='ATF BPI-R64 & BPI-R3 images including fiptool' url='https://github.com/mtk-openwrt/arm-trusted-firmware.git' arch=(aarch64) depends=(linux) @@ -16,7 +16,7 @@ makedepends=(git bpir64-mkimage) license=(GPL) source=("git+${_gitroot}.git#branch=${_gitbranch}" '95-atf.hook' - 'bpir64-writefip' + 'bpir-writefip' ) sha256sums=(SKIP SKIP SKIP) install=${pkgname}.install @@ -46,9 +46,13 @@ _buildimage() { unset CXXFLAGS CPPFLAGS LDFLAGS export CFLAGS=-Wno-error make PLAT=${_plat} BOOT_DEVICE=$_atfdev LOG_LEVEL=40 MTK_BL33_IS_64BIT=1 \ - USE_MKIMAGE=1 MKIMAGE=$(which bpir64-mkimage) ${_rest} all - dd of=build/${_plat}/release/${_bpir}-atf-${_atfdev}-header.bin bs=1 count=440 if=build/${_plat}/release/bl2.img - dd of=build/${_plat}/release/${_bpir}-atf-${_atfdev}-atf.bin skip=34 if=build/${_plat}/release/bl2.img + USE_MKIMAGE=1 MKIMAGE=$(which ${_bpir}-mkimage) ${_rest} all + if [[ "${_bpir}" == "bpir64" ]]; then + dd of=build/${_plat}/release/${_bpir}-atf-${_atfdev}-header.bin bs=1 count=440 if=build/${_plat}/release/bl2.img + dd of=build/${_plat}/release/${_bpir}-atf-${_atfdev}-atf.bin skip=34 if=build/${_plat}/release/bl2.img + else + dd of=build/${_plat}/release/${_bpir}-atf-${_atfdev}-atf.bin if=build/${_plat}/release/bl2.img + fi } _installimage() { @@ -70,7 +74,7 @@ build() { package() { cd "${srcdir}" - install -m755 -vDt "$pkgdir/usr/bin" bpir64-writefip + install -m755 -vDt "$pkgdir/usr/bin" bpir-writefip install -Dt "${pkgdir}/usr/share/libalpm/hooks/" -m644 95-atf.hook cd "${srcdir}/${_gitname}/tools/fiptool" install -m755 -vDt "$pkgdir/usr/bin" fiptool diff --git a/bpir64-writefip b/bpir-writefip index ec4a563ab520..f3428acb6b92 100755 --- a/bpir64-writefip +++ b/bpir-writefip @@ -16,12 +16,14 @@ dtb=$(cat /boot/bootcfg/dtb) if [[ $@ =~ "--atf" ]]; then atfdev="/dev/disk/by-partlabel/${target}-${fipdev}-atf" if [ -L $atfdev ]; then - headerdev="/dev/"$(lsblk -no pkname ${atfdev}) + if [ -f "/boot/${target}-atf-${fipdev}-header.bin" ]; then + headerdev="/dev/"$(lsblk -no pkname ${atfdev}) + echo Writing ${target}-atf-${fipdev}-header.bin to $headerdev + dd of="${headerdev}" if=/boot/${target}-atf-${fipdev}-header.bin + fi echo -e "Target = ${target}, ATF device = ${fipdev}\nZeroing: $atfdev" - dd of="${atfdev}" if=/dev/zero 2>/dev/null - echo Writing HEADER to: $headerdev - dd of="${headerdev}" if=/boot/${target}-atf-${fipdev}-header.bin - echo Writing ATF to: $atfdev + dd bs=64k of="${atfdev}" if=/dev/zero 2>/dev/null + echo Writing ${target}-atf-${fipdev}-atf.bin to $atfdev dd bs=64k of="${atfdev}" if=/boot/${target}-atf-${fipdev}-atf.bin fi fi diff --git a/bpir64-atf-git.install b/bpir64-atf-git.install index 678892ea4d2d..4a00450dc87c 100644 --- a/bpir64-atf-git.install +++ b/bpir64-atf-git.install @@ -1,5 +1,5 @@ post_upgrade() { - bpir64-writefip --atf + bpir-writefip --atf } post_install() { |