summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Woudstra2022-07-22 16:46:44 +0200
committerEric Woudstra2022-07-22 16:46:44 +0200
commit986c4927b80b79245755bbc6268f9009bc6ac680 (patch)
tree82d90ba328b36a67749ad7dd7ddecbff08b3fc24
downloadaur-986c4927b80b79245755bbc6268f9009bc6ac680.tar.gz
Mkimage tool modified for Bananapi R64
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD27
-rw-r--r--mtkimage-buffer-inc.patch9
-rw-r--r--mtkimage-gpt-expand.patch19
4 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..41a5edbf41f0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = bpir64-mkimage
+ pkgdesc = An acoustic spectrum analyser (compiled against wxGtk3 and ffmpeg4.4)
+ pkgver = 2021.10
+ pkgrel = 1
+ url = http://spek.cc/
+ arch = aarch64
+ license = GPL3
+ source = https://github.com/u-boot/u-boot/archive/refs/tags/v2021.10.tar.gz
+ source = mtkimage-buffer-inc.patch
+ source = mtkimage-gpt-expand.patch
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = bpir64-mkimage
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c4bf18eca04f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Eric Woudstra <ericwouds@gmail.com>
+pkgname=bpir64-mkimage
+pkgver=2021.10
+pkgrel=1
+pkgdesc='An acoustic spectrum analyser (compiled against wxGtk3 and ffmpeg4.4)'
+arch=(aarch64)
+url='http://spek.cc/'
+license=(GPL3)
+depends=()
+makedepends=()
+source=("https://github.com/u-boot/u-boot/archive/refs/tags/v${pkgver}.tar.gz"
+ 'mtkimage-buffer-inc.patch'
+ 'mtkimage-gpt-expand.patch')
+sha256sums=(SKIP SKIP SKIP)
+
+build() {
+ cd "${srcdir}/u-boot-${pkgver}"
+ patch -p1 -N -r - < "${srcdir}/mtkimage-buffer-inc.patch"
+ patch -p1 -N -r - < "${srcdir}/mtkimage-gpt-expand.patch"
+ ARCH=arm64 make mt7622_rfb_defconfig tools-only
+ cp -vf tools/mkimage tools/bpir64-mkimage
+}
+
+package() {
+ cd "${srcdir}/u-boot-${pkgver}/tools"
+ install -m755 -vDt $pkgdir/usr/bin bpir64-mkimage
+}
diff --git a/mtkimage-buffer-inc.patch b/mtkimage-buffer-inc.patch
new file mode 100644
index 000000000000..c2ce679965aa
--- /dev/null
+++ b/mtkimage-buffer-inc.patch
@@ -0,0 +1,9 @@
+diff -NarU 1 a/tools/mtk_image.c b/tools/mtk_image.c
+--- a/tools/mtk_image.c 2021-06-11 13:26:11.580666817 +0200
++++ b/tools/mtk_image.c 2021-06-11 13:29:14.024018325 +0200
+@@ -262,3 +262,3 @@
+ /* GFH header + 2 * 4KB pages of NAND */
+-static char hdr_tmp[sizeof(struct gfh_header) + 0x2000];
++static char hdr_tmp[sizeof(struct gfh_header) + 0x2000 + 0x10000];
+
+
diff --git a/mtkimage-gpt-expand.patch b/mtkimage-gpt-expand.patch
new file mode 100644
index 000000000000..62c9293c373a
--- /dev/null
+++ b/mtkimage-gpt-expand.patch
@@ -0,0 +1,19 @@
+diff -NarU 6 a/tools/mtk_image.h b/tools/mtk_image.h
+--- a/tools/mtk_image.h 2021-06-10 20:32:04.156559289 +0200
++++ b/tools/mtk_image.h 2021-06-10 20:32:36.964722097 +0200
+@@ -16,13 +16,13 @@
+ struct {
+ char name[12];
+ uint32_t version;
+ uint32_t size;
+ };
+
+- uint8_t pad[0x200];
++ uint8_t pad[34*512];
+ };
+
+ #define EMMC_BOOT_NAME "EMMC_BOOT"
+ #define SF_BOOT_NAME "SF_BOOT"
+ #define SDMMC_BOOT_NAME "SDMMC_BOOT"
+
+