summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..36f5493
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# U-Boot: Pine64
+# Maintainer: Dan Johansen <strit@manjaro.org>
+# Contributor: Kevin Mihelich <kevin@archlinuxarm.org>
+
+pkgname=uboot-pinebook
+pkgver=v2019.01.rc3.r35.g64abfc9b6b
+pkgrel=1
+pkgdesc="U-Boot for Pine64"
+arch=('aarch64')
+url='http://www.denx.de/wiki/U-Boot/WebHome'
+license=('GPL')
+makedepends=('bc' 'git' 'python' 'swig' 'dtc')
+install=${pkgname}.install
+source=('git+https://github.com/u-boot/u-boot.git#commit=64abfc9b6bb3'
+ 'git+https://github.com/ARM-software/arm-trusted-firmware.git#commit=63b9b5425f15'
+ '0001-ATF-set-fno-stack-protector.patch'
+ 'extlinux.conf')
+md5sums=('SKIP'
+ 'SKIP'
+ '3213c96ce0713249719dc73d58395620'
+ '9641cbc5984727d43f76350a7c0e124e')
+
+pkgver() {
+ cd u-boot
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd u-boot
+
+ cd ../arm-trusted-firmware
+ git apply ../0001-ATF-set-fno-stack-protector.patch
+}
+
+build() {
+ unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
+
+ cd arm-trusted-firmware
+
+ make PLAT=sun50i_a64 DEBUG=1 bl31
+ cp build/sun50i_a64/debug/bl31.bin ../u-boot
+
+ cd ../u-boot
+
+ make distclean
+ make pinebook_defconfig
+ echo 'CONFIG_IDENT_STRING=" Manjaro ARM"' >> .config
+ make EXTRAVERSION=-${pkgrel}
+ cat spl/sunxi-spl.bin u-boot.itb > u-boot-sunxi-with-spl-pinebook.bin
+}
+
+package() {
+ cd u-boot
+
+ mkdir -p "${pkgdir}"/boot/extlinux
+
+ cp u-boot-sunxi-with-spl-pinebook.bin "${pkgdir}"/boot
+ cp "${srcdir}"/extlinux.conf "${pkgdir}"/boot/extlinux/
+}