summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2019-11-22 15:32:59 -0800
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2019-11-22 15:32:59 -0800
commit17cb75f37adab5656fd9355720fb7544035e2280 (patch)
tree90131c2899bb00f71a23c701f809c16a3d7e618b
downloaduboot-pinebookpro-17cb75f37adab5656fd9355720fb7544035e2280.tar.xz
Initial commit
-rw-r--r--PKGBUILD37
-rw-r--r--boot.txt22
-rw-r--r--idbloader.imgbin0 -> 163836 bytes
-rw-r--r--mkscr9
-rw-r--r--trust.imgbin0 -> 4194304 bytes
-rw-r--r--uboot-pinebookpro.install27
-rw-r--r--uboot.imgbin0 -> 4194304 bytes
7 files changed, 95 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..f78e3dd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
+# Maintainer (Manjaro): Dan Johansen <strit@manjaro.org>
+# Contributor (Manjaro): Spikerguy <tech@fkardame.com>
+# Pre-Built IMG by MrFixit
+
+# # I maintain this because:
+# Not in an official repo and I use it
+# Manjaro version fails to build
+
+pkgname=uboot-pinebookpro
+pkgver=1.1
+pkgrel=4
+pkgdesc="U-Boot for Pinebook Pro (prebuilt binaries)"
+arch=('aarch64')
+url='https://github.com/mrfixit2001/updates_repo/tree/v1.1/pinebook/filesystem'
+license=('GPL')
+makedepends=('uboot-tools')
+#Commented out until we know the parition to be used.
+#install=${pkgname}.install
+source=('uboot.img'
+ 'trust.img'
+ 'idbloader.img'
+ 'boot.txt'
+ 'mkscr'
+ )
+sha256sums=('f9a3d144ab8702ab1ab2f39280f4976bbac621a90fb3eaa1729077f34355ca89'
+ 'bd62940658c632bf39c883cf3ba1e4054ac893bc31df2ea45e05cb633da49598'
+ '40a0ecb986818db4c2d984045037fd12414fa9a7553b0edcbb45225dce31d12f'
+ '0635926d7deda636827b413f78acfe3a286cdc87a26ea379bc2c4985bb901c77'
+ 'a4fc8b6b92bc364d6542670d294aa618a8501fb8729f415cc0a3eed776ef0c8e')
+
+package() {
+ mkdir -p "${pkgdir}"/boot
+ cp uboot.img trust.img idbloader.img "${pkgdir}"/boot
+ mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ${srcdir}/boot.txt "${pkgdir}/boot/boot.scr"
+ cp ${srcdir}/{boot.txt,mkscr} "${pkgdir}"/boot
+}
diff --git a/boot.txt b/boot.txt
new file mode 100644
index 0000000..7ce8eff
--- /dev/null
+++ b/boot.txt
@@ -0,0 +1,22 @@
+# After modifying, run ./mkscr
+
+# MAC address (use spaces instead of colons)
+setenv macaddr da 19 c8 7a 6d f4
+
+part uuid ${devtype} ${devnum}:${bootpart} uuid
+setenv bootargs console=ttyS2,1500000n8 root=PARTUUID=${uuid} rw rootwait append video=eDP-1:1920x1080@60
+setenv fdtfile rockchip/rk3399-pinebook-pro.dtb
+
+if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/Image; then
+ if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
+ fdt addr ${fdt_addr_r}
+ fdt resize
+ fdt set /ethernet@fe300000 local-mac-address "[${macaddr}]"
+ if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
+ # This upstream Uboot doesn't support compresses cpio initrd, use kernel option to
+ # load initramfs
+ setenv bootargs ${bootargs} initrd=${ramdisk_addr_r},20M ramdisk_size=10M
+ fi;
+ booti ${kernel_addr_r} - ${fdt_addr_r};
+ fi;
+fi
diff --git a/idbloader.img b/idbloader.img
new file mode 100644
index 0000000..7c161e6
--- /dev/null
+++ b/idbloader.img
Binary files differ
diff --git a/mkscr b/mkscr
new file mode 100644
index 0000000..272b6a7
--- /dev/null
+++ b/mkscr
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [[ ! -x /usr/bin/mkimage ]]; then
+ echo "mkimage not found. Please install uboot-tools:"
+ echo " pacman -S uboot-tools"
+ exit 1
+fi
+
+mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr
diff --git a/trust.img b/trust.img
new file mode 100644
index 0000000..510d639
--- /dev/null
+++ b/trust.img
Binary files differ
diff --git a/uboot-pinebookpro.install b/uboot-pinebookpro.install
new file mode 100644
index 0000000..71e1ff7
--- /dev/null
+++ b/uboot-pinebookpro.install
@@ -0,0 +1,27 @@
+flash_uboot() {
+ echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
+ echo "Do you want to do this now? [y|N]"
+ read -r shouldwe
+ if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
+ dd if=/boot/idbloader.img of=/dev/mmcblk0 seek=64 conv=notrunc
+ dd if=/boot/uboot.img of=/dev/mmcblk0 seek=16384 conv=notrunc
+ dd if=/boot/trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc
+ else
+ echo "You can do this later by running:"
+ echo "# dd if=/boot/idbloader.img of=/dev/mmcblk0 seek=64 conv=notrunc"
+ echo "# dd if=/boot/uboot.img of=/dev/mmcblk0 seek=16384 conv=notrunc"
+ echo "# dd if=/boot/trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc"
+ fi
+}
+
+## arg 1: the new package version
+post_install() {
+ flash_uboot
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ flash_uboot
+}
+
diff --git a/uboot.img b/uboot.img
new file mode 100644
index 0000000..05bb23f
--- /dev/null
+++ b/uboot.img
Binary files differ