diff options
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/riscv64/ramdisk/install.md | 19 | ||||
-rw-r--r-- | distrib/riscv64/ramdisk/list | 3 | ||||
-rw-r--r-- | distrib/special/installboot/Makefile | 4 |
3 files changed, 11 insertions, 15 deletions
diff --git a/distrib/riscv64/ramdisk/install.md b/distrib/riscv64/ramdisk/install.md index 426f91e332d..5c83395f2f4 100644 --- a/distrib/riscv64/ramdisk/install.md +++ b/distrib/riscv64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.3 2021/08/02 21:46:39 kettenis Exp $ +# $OpenBSD: install.md,v 1.4 2022/02/03 10:27:33 visa Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -33,16 +33,13 @@ # NCPU=$(sysctl -n hw.ncpufound) -NEWFSARGS_msdos="-F 16 -L boot" -MOUNT_ARGS_msdos="-o-l" md_installboot() { - local _disk=/dev/$1 - - mount ${MOUNT_ARGS_msdos} ${_disk}i /mnt/mnt - mkdir -p /mnt/mnt/efi/boot - cp /mnt/usr/mdec/BOOTRISCV64.EFI /mnt/mnt/efi/boot/bootriscv64.efi - echo bootriscv64.efi > /mnt/mnt/efi/boot/startup.nsh + if ! installboot -r /mnt ${1}; then + echo "\nFailed to install bootblocks." + echo "You will not be able to boot OpenBSD from ${1}." + exit + fi } md_prep_fdisk() { @@ -53,7 +50,6 @@ md_prep_fdisk() { local bootsectorsize="32768" local bootsectorend=$(($bootsectorstart + $bootsectorsize)) local bootfstype="msdos" - local newfs_args=${NEWFSARGS_msdos} while :; do _d=whole @@ -83,8 +79,7 @@ write quit __EOT echo "done." - disklabel $_disk 2>/dev/null | grep -q "^ i:" || disklabel -w -d $_disk - newfs -t ${bootfstype} ${newfs_args} ${_disk}i + installboot -p $_disk return ;; [eE]*) # Manually configure the MBR. diff --git a/distrib/riscv64/ramdisk/list b/distrib/riscv64/ramdisk/list index 23a2fb5c1f4..b765f96d74d 100644 --- a/distrib/riscv64/ramdisk/list +++ b/distrib/riscv64/ramdisk/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.5 2021/10/04 01:34:29 kevlo Exp $ +# $OpenBSD: list,v 1.6 2022/02/03 10:27:33 visa Exp $ SRCDIRS distrib/special @@ -62,6 +62,7 @@ LINK instbin usr/bin/sed LINK instbin usr/bin/signify LINK instbin usr/bin/tee LINK instbin usr/sbin/chroot +LINK instbin usr/sbin/installboot LINK instbin usr/sbin/pwd_mkdb ARGVLINK ksh -sh SPECIAL rm bin/md5 diff --git a/distrib/special/installboot/Makefile b/distrib/special/installboot/Makefile index 8b00e1c27f2..4ab1041b759 100644 --- a/distrib/special/installboot/Makefile +++ b/distrib/special/installboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2022/02/03 10:21:13 visa Exp $ +# $OpenBSD: Makefile,v 1.16 2022/02/03 10:27:33 visa Exp $ .PATH: ${.CURDIR}/../../../usr.sbin/installboot @@ -15,7 +15,7 @@ CFLAGS += -DSOFTRAID SRCS += i386_installboot.c SRCS += i386_nlist.c SRCS += i386_softraid.c -.elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64" +.elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64" || ${MACHINE} == "riscv64" SRCS += efi_installboot.c .elif ${MACHINE} == "hppa" CFLAGS += -DBOOTSTRAP |