From fbd2bda1091c6b208906ffe06fd5c66cd6bc35b7 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 6 Jan 2022 13:37:22 +0100 Subject: [PATCH] bsdinstall: react to WORKAROUND_HYBRID to force UEFI install on BIOS boot Also add branding name. --- usr.sbin/bsdinstall/Makefile | 2 +- usr.sbin/bsdinstall/partedit/partedit_x86.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index bbf8071a91c..9e52e5acf42 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -1,5 +1,5 @@ -OSNAME?= FreeBSD +OSNAME?= OPNsense SUBDIR= distextract distfetch partedit runconsoles scripts SUBDIR_PARALLEL= SUBDIR_DEPEND_distfetch = distextract diff --git a/usr.sbin/bsdinstall/partedit/partedit_x86.c b/usr.sbin/bsdinstall/partedit/partedit_x86.c index 6a536271c25..3256a74edc4 100644 --- a/usr.sbin/bsdinstall/partedit/partedit_x86.c +++ b/usr.sbin/bsdinstall/partedit/partedit_x86.c @@ -28,6 +28,7 @@ #include #include +#include #include #include "partedit.h" @@ -111,7 +112,8 @@ const char * bootpart_type(const char *scheme, const char **mountpoint) { - if (strcmp(x86_bootmethod(), "UEFI") == 0) { + if (strcmp(x86_bootmethod(), "UEFI") == 0 || + getenv("WORKAROUND_HYBRID")) { *mountpoint = "/boot/efi"; return ("efi"); }