diff options
Diffstat (limited to 'distrib/arm64')
-rw-r--r-- | distrib/arm64/miniroot/Makefile | 2 | ||||
-rw-r--r-- | distrib/arm64/ramdisk/Makefile | 3 | ||||
-rw-r--r-- | distrib/arm64/ramdisk/install.md | 32 | ||||
-rw-r--r-- | distrib/arm64/ramdisk/list | 4 |
4 files changed, 29 insertions, 12 deletions
diff --git a/distrib/arm64/miniroot/Makefile b/distrib/arm64/miniroot/Makefile index b0fa3b12094..336f59e3393 100644 --- a/distrib/arm64/miniroot/Makefile +++ b/distrib/arm64/miniroot/Makefile @@ -65,6 +65,8 @@ do_files: cp /usr/mdec/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh echo 'arm_control=0x200\nenable_uart=1\ndevice_tree_address=0x100\nkernel=u-boot.bin' > ${MOUNT_POINT}/config.txt + dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \ + of=${VND_CDEV} bs=1024 seek=8 rd_setup: dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS} diff --git a/distrib/arm64/ramdisk/Makefile b/distrib/arm64/ramdisk/Makefile index e89c8ebf591..368693a3351 100644 --- a/distrib/arm64/ramdisk/Makefile +++ b/distrib/arm64/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2017/02/18 02:01:53 jsg Exp $ +# $OpenBSD: Makefile,v 1.3 2017/08/22 23:20:00 jsg Exp $ REV= ${OSrev} @@ -18,6 +18,7 @@ DISKTYPE= rdroot MAKEFSARGS_RD= -o disklabel=${DISKTYPE},minfree=0,density=4096 DIRS=\ + pine64 \ rpi .ifndef DESTDIR diff --git a/distrib/arm64/ramdisk/install.md b/distrib/arm64/ramdisk/install.md index fc644719af6..1603efa563c 100644 --- a/distrib/arm64/ramdisk/install.md +++ b/distrib/arm64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.6 2017/07/28 18:15:44 rpe Exp $ +# $OpenBSD: install.md,v 1.7 2017/08/22 23:20:00 jsg Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -38,23 +38,35 @@ MOUNT_ARGS_msdos="-o-l" md_installboot() { local _disk=/dev/$1 _mdec _plat + case $(sysctl -n hw.product) in + *Pine64*) _plat=pine64;; + *'Raspberry Pi'*) _plat=rpi;; + esac + # Mount MSDOS partition, extract U-Boot and copy UEFI boot program mount ${MOUNT_ARGS_msdos} ${_disk}i /mnt/mnt mkdir -p /mnt/mnt/efi/boot cp /mnt/usr/mdec/BOOTAA64.EFI /mnt/mnt/efi/boot/bootaa64.efi echo bootaa64.efi > /mnt/mnt/efi/boot/startup.nsh - _plat=rpi _mdec=/usr/mdec/$_plat - cp $_mdec/{bootcode.bin,start.elf,fixup.dat,*.dtb} /mnt/mnt/ - cp $_mdec/u-boot.bin /mnt/mnt/ - cat > /mnt/mnt/config.txt<<-__EOT - arm_control=0x200 - enable_uart=1 - device_tree_address=0x100 - kernel=u-boot.bin - __EOT + case $_plat in + pine64) + dd if=$_mdec/u-boot-sunxi-with-spl.bin of=${_disk}c \ + bs=1024 seek=8 >/dev/null 2>&1 + ;; + rpi) + cp $_mdec/{bootcode.bin,start.elf,fixup.dat,*.dtb} /mnt/mnt/ + cp $_mdec/u-boot.bin /mnt/mnt/ + cat > /mnt/mnt/config.txt<<-__EOT + arm_control=0x200 + enable_uart=1 + device_tree_address=0x100 + kernel=u-boot.bin + __EOT + ;; + esac } md_prep_fdisk() { diff --git a/distrib/arm64/ramdisk/list b/distrib/arm64/ramdisk/list index 98ccc970afc..d1b4f696646 100644 --- a/distrib/arm64/ramdisk/list +++ b/distrib/arm64/ramdisk/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.4 2017/07/08 15:42:46 florian Exp $ +# $OpenBSD: list,v 1.5 2017/08/22 23:20:00 jsg Exp $ SRCDIRS distrib/special @@ -124,4 +124,6 @@ COPY /usr/local/share/raspberrypi-firmware/boot/start.elf usr/mdec/rpi/start.elf COPY /usr/local/share/raspberrypi-firmware/boot/fixup.dat usr/mdec/rpi/fixup.dat COPY /usr/local/share/u-boot/rpi_3/u-boot.bin usr/mdec/rpi/u-boot.bin +COPY /usr/local/share/u-boot/pine64_plus/u-boot-sunxi-with-spl.bin usr/mdec/pine64/u-boot-sunxi-with-spl.bin + TZ |