From ef4e92fb1d4bb3b5d29cf4476ed4a57af83dc784 Mon Sep 17 00:00:00 2001 From: kn Date: Wed, 29 Mar 2023 00:16:14 +0000 Subject: [PATCH] Unify variable usage in arm64 and armv7 md_installboot() with the rest `_disk' (and related variables) hold disk names as "sd0" so that all else can be constructed from it. Fix the only two offenders across distrib/ which put start the variable with "/dev/"; no functional change. --- distrib/arm64/ramdisk/install.md | 8 ++++---- distrib/armv7/ramdisk/install.md | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/distrib/arm64/ramdisk/install.md b/distrib/arm64/ramdisk/install.md index 46c747f2798..e28b6d59f25 100644 --- a/distrib/arm64/ramdisk/install.md +++ b/distrib/arm64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.38 2023/03/26 19:25:16 kn Exp $ +# $OpenBSD: install.md,v 1.39 2023/03/29 00:16:14 kn Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ NCPU=$(sysctl -n hw.ncpufound) MOUNT_ARGS_msdos="-o-l" md_installboot() { - local _disk=/dev/$1 _mdec _plat + local _disk=$1 _mdec _plat case $(sysctl -n machdep.compatible) in apple,*) _plat=apple;; @@ -60,11 +60,11 @@ md_installboot() { done) ;; pine64) - dd if=$_mdec/u-boot-sunxi-with-spl.bin of=${_disk}c \ + dd if=$_mdec/u-boot-sunxi-with-spl.bin of=/dev/${_disk}c \ bs=1024 seek=8 status=none ;; rpi) - mount ${MOUNT_ARGS_msdos} ${_disk}i /mnt/mnt + mount ${MOUNT_ARGS_msdos} /dev/${_disk}i /mnt/mnt cp $_mdec/{bootcode.bin,start*.elf,fixup*.dat,*.dtb} /mnt/mnt/ cp $_mdec/u-boot.bin /mnt/mnt/ mkdir -p /mnt/mnt/overlays diff --git a/distrib/armv7/ramdisk/install.md b/distrib/armv7/ramdisk/install.md index f2bf142ce59..3ee6c9ea7ff 100644 --- a/distrib/armv7/ramdisk/install.md +++ b/distrib/armv7/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.53 2023/03/28 23:09:08 kn Exp $ +# $OpenBSD: install.md,v 1.54 2023/03/29 00:16:14 kn Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. @@ -34,7 +34,7 @@ MOUNT_ARGS_msdos="-o-l" md_installboot() { - local _disk=/dev/$1 _mdec _plat + local _disk=$1 _mdec _plat case $(sysctl -n hw.product) in *AM335x*) _plat=am335x;; @@ -53,7 +53,7 @@ md_installboot() { fi # Apply some final tweaks on selected platforms - mount ${MOUNT_ARGS_msdos} ${_disk}i /mnt/mnt + mount ${MOUNT_ARGS_msdos} /dev/${_disk}i /mnt/mnt _mdec=/usr/mdec/$_plat @@ -63,9 +63,9 @@ md_installboot() { ;; cubox|wandboard) cp $_mdec/*.dtb /mnt/mnt/ - dd if=$_mdec/SPL of=${_disk}c bs=1024 seek=1 \ + dd if=$_mdec/SPL of=/dev/${_disk}c bs=1024 seek=1 \ status=none - dd if=$_mdec/u-boot.img of=${_disk}c bs=1024 seek=69 \ + dd if=$_mdec/u-boot.img of=/dev/${_disk}c bs=1024 seek=69 \ status=none ;; nitrogen) @@ -81,7 +81,7 @@ md_installboot() { ;; cubie) cp $_mdec/*.dtb /mnt/mnt/ - dd if=$_mdec/u-boot-sunxi-with-spl.bin of=${_disk}c \ + dd if=$_mdec/u-boot-sunxi-with-spl.bin of=/dev/${_disk}c \ bs=1024 seek=8 status=none ;; esac -- 2.20.1