diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2022-08-24 21:08:52 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2022-08-24 21:08:52 +0000 |
commit | b7da604269b62881fe3c20ea64073bcb4b826611 (patch) | |
tree | 450f7740a429bb78ef6925f3bda49029e38ad91a /distrib/special/installboot/Makefile | |
parent | 44be7fe6a5c1c9ed975bab11112e25f9b07cc863 (diff) |
Forgotten to commit as part of
----------------------------
/usr/src/usr.sbin/installboot/Makefile revision 1.25
date: 2022/08/15 17:06:43; author: kn; state: Exp; lines: +5 -1; commitid: 36Ayh2RViNOotnQJ;
Add initial piece for softraid(4) support on arm64
arm64 is the only currently supported OpenBSD platform which both
a) supports booting off root on softraid(4) (kernel and bootloader) and
b) is an EFI platform (as far as installboot(8) is concerned).
Currently, installboot treats softraid root volumes as regular devices,
ignoring ignores chunk devices completely.
Teach installboot the first bits of softraid support for EFI:
installing the single-stage boot loader on chunks rather than the volume.
Copy over sparc64's softraid stage-1 code as-is and make its stage-2 a NOOP:
# ./obj/installboot -v sd4
Using / as root
installing bootstrap on /dev/rsd4c
using first-stage /usr/mdec/BOOTAA64.EFI
sd4: softraid volume with 1 disk(s)
sd0a: installing boot blocks on /dev/rsd0c
copying /usr/mdec/BOOTAA64.EFI to /tmp/installboot.KuBD4zkfpM/efi/boot/bootaa64.efi
writing /tmp/installboot.KuBD4zkfpM/efi/boot/startup.nsh
arm64 miniroot fits and boots with this.
OK stsp
As of now, EFI partitions must still be created manually as installboot's
'-p' does not support softraid at all (next missing piece for root on
softraid on arm64 installations to work out-of-the-box).
----------------------------
Reminded by miod, thanks
Diffstat (limited to 'distrib/special/installboot/Makefile')
-rw-r--r-- | distrib/special/installboot/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/distrib/special/installboot/Makefile b/distrib/special/installboot/Makefile index 4ab1041b759..cfc4d7bdefd 100644 --- a/distrib/special/installboot/Makefile +++ b/distrib/special/installboot/Makefile @@ -1,10 +1,9 @@ -# $OpenBSD: Makefile,v 1.16 2022/02/03 10:27:33 visa Exp $ +# $OpenBSD: Makefile,v 1.17 2022/08/24 21:08:51 kn Exp $ .PATH: ${.CURDIR}/../../../usr.sbin/installboot PROG= installboot SRCS= installboot.c util.c -MAN= installboot.8 CPPFLAGS= -I${.CURDIR}/../../../usr.sbin/installboot LDADD= -lutil @@ -16,6 +15,10 @@ SRCS += i386_installboot.c SRCS += i386_nlist.c SRCS += i386_softraid.c .elif ${MACHINE} == "armv7" || ${MACHINE} == "arm64" || ${MACHINE} == "riscv64" +. if ${MACHINE} == "arm64" +CFLAGS += -DSOFTRAID +SRCS += efi_softraid.c +. endif SRCS += efi_installboot.c .elif ${MACHINE} == "hppa" CFLAGS += -DBOOTSTRAP |