Stop writing pine64 firmware to disk
authorkn <kn@openbsd.org>
Mon, 3 Apr 2023 10:51:50 +0000 (10:51 +0000)
committerkn <kn@openbsd.org>
Mon, 3 Apr 2023 10:51:50 +0000 (10:51 +0000)
pine64 happens to be the first board "we ran on", as kettenis explains, and
this code tries to handle the situation of installing to the same disk the
installer booted from.

Similar boards like the Pinebook Pro don't get special treatment and work;
INSTALL.arm64 already explains how to flash required firmware onto disks or
install media -- Allwinner SoCs like the pine64 included.

Spotted through md_installboot() dd'ing blobs onto the root disk,
which does not fly with root on softraid and is in the way of arm64 getting
support for guided disk encryption.

Suggested by kettenis patrick
Feedback jsg patrick
OK patrick

distrib/arm64/iso/Makefile
distrib/arm64/ramdisk/Makefile
distrib/arm64/ramdisk/install.md
distrib/arm64/ramdisk/list

index 89ee962..3301215 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.4 2023/02/10 15:54:33 krw Exp $
+#      $OpenBSD: Makefile,v 1.5 2023/04/03 10:51:50 kn Exp $
 
 FS=            install${OSrev}.img
 FSSIZE=                1032192
@@ -65,8 +65,6 @@ ${FS}: ${BASE} ${XBASE}
        cp /usr/mdec/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi
        echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh
        echo 'arm_64bit=1\nenable_uart=1\ndtoverlay=disable-bt\nkernel=u-boot.bin' > ${MOUNT_POINT}/config.txt
-       dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \
-           of=/dev/r`cat vnd`c bs=1024 seek=8 conv=sync
        umount ${MOUNT_POINT}
 
        newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
index eb549af..1b82064 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.25 2023/02/10 15:54:33 krw Exp $
+#      $OpenBSD: Makefile,v 1.26 2023/04/03 10:51:50 kn Exp $
 
 FS=            miniroot${OSrev}.img
 FSSIZE=                88064
@@ -61,8 +61,6 @@ ${FS}: bsd.rd
        cp /usr/mdec/BOOTAA64.EFI ${MOUNT_POINT}/efi/boot/bootaa64.efi
        echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh
        echo 'arm_64bit=1\nenable_uart=1\ndtoverlay=disable-bt\nkernel=u-boot.bin' > ${MOUNT_POINT}/config.txt
-       dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \
-           of=/dev/r`cat vnd`c bs=1024 seek=8 conv=sync
        umount ${MOUNT_POINT}
        newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
        mount /dev/`cat vnd`a ${MOUNT_POINT}
index c899261..0650822 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: install.md,v 1.41 2023/03/29 16:20:17 kn Exp $
+#      $OpenBSD: install.md,v 1.42 2023/04/03 10:51:50 kn Exp $
 #
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -40,7 +40,6 @@ md_installboot() {
 
        case $(sysctl -n machdep.compatible) in
        apple,*)                _plat=apple;;
-       pine64,pine64*(+))      _plat=pine64;;
        raspberrypi,*)          _plat=rpi;;
        esac
 
@@ -59,10 +58,6 @@ md_installboot() {
                        [[ -d $_dir ]] && pax -rw $_dir /mnt/etc/firmware
                done)
                ;;
-       pine64)
-               dd if=$_mdec/u-boot-sunxi-with-spl.bin of=/dev/r${_disk}c \
-                   bs=1024 seek=8 status=none
-               ;;
        rpi)
                mount ${MOUNT_ARGS_msdos} /dev/${_disk}i /mnt/mnt
                cp $_mdec/{bootcode.bin,start*.elf,fixup*.dat,*.dtb} /mnt/mnt/
index 27a4f0e..d8971aa 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: list,v 1.20 2023/01/28 18:40:53 phessler Exp $
+#      $OpenBSD: list,v 1.21 2023/04/03 10:51:50 kn Exp $
 
 SRCDIRS distrib/special
 
@@ -116,9 +116,6 @@ COPY        /usr/local/share/raspberrypi-firmware/boot/fixup4.dat usr/mdec/rpi/fixup4.d
 COPY   /usr/local/share/raspberrypi-firmware/boot/overlays/disable-bt.dtbo usr/mdec/rpi/disable-bt.dtbo
 COPY   /usr/local/share/u-boot/rpi_arm64/u-boot.bin usr/mdec/rpi/u-boot.bin
 
-MKDIR  usr/mdec/pine64
-COPY   /usr/local/share/u-boot/pine64_plus/u-boot-sunxi-with-spl.bin usr/mdec/pine64/u-boot-sunxi-with-spl.bin
-
 # copy the MAKEDEV script and make some devices
 SCRIPT ${DESTDIR}/dev/MAKEDEV                  dev/MAKEDEV
 SPECIAL        cd dev; sh MAKEDEV ramdisk