Page MenuHomeFreeBSD

D28180.diff
No OneTemporary

D28180.diff

diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/partedit/Makefile
--- a/usr.sbin/bsdinstall/partedit/Makefile
+++ b/usr.sbin/bsdinstall/partedit/Makefile
@@ -10,6 +10,8 @@
PARTEDIT_ARCH= ${MACHINE}
.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
PARTEDIT_ARCH= x86
+.elif ${MACHINE} == "arm64" || ${MACHINE} == "riscv"
+PARTEDIT_ARCH= efi
.endif
.if !exists(partedit_${PARTEDIT_ARCH}.c)
PARTEDIT_ARCH= generic
diff --git a/usr.sbin/bsdinstall/partedit/partedit_arm64.c b/usr.sbin/bsdinstall/partedit/partedit_efi.c
rename from usr.sbin/bsdinstall/partedit/partedit_arm64.c
rename to usr.sbin/bsdinstall/partedit/partedit_efi.c
--- a/usr.sbin/bsdinstall/partedit/partedit_arm64.c
+++ b/usr.sbin/bsdinstall/partedit/partedit_efi.c
@@ -34,6 +34,11 @@
#include "partedit.h"
+/*
+ * partedit implementation for platforms on which the installer only offers
+ * UEFI-based boot. Currently, this includes arm64 and RISC-V.
+ */
+
/* EFI partition size in bytes */
#define EFI_BOOTPART_SIZE (260 * 1024 * 1024)
@@ -94,7 +99,7 @@
partcode_path(const char *part_type, const char *fs_type)
{
- /* No boot partition data for ARM64 */
+ /* No boot partition data. */
return (NULL);
}
diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto
--- a/usr.sbin/bsdinstall/scripts/auto
+++ b/usr.sbin/bsdinstall/scripts/auto
@@ -301,7 +301,7 @@
CURARCH=$( uname -m )
case $CURARCH in
- amd64|arm64|i386) # Booting ZFS Supported
+ amd64|arm64|i386|riscv) # Booting ZFS Supported
PMODES="
'$msg_auto_zfs' '$msg_auto_zfs_desc' '$msg_auto_zfs_help'
$PMODES
diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig
--- a/usr.sbin/bsdinstall/scripts/bootconfig
+++ b/usr.sbin/bsdinstall/scripts/bootconfig
@@ -51,7 +51,7 @@
X86_BOOTMETHOD=$(sysctl -n machdep.bootmethod)
fi
-if [ "$(uname -m)" = "arm64" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then
+if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "riscv" ] || [ "$X86_BOOTMETHOD" = "UEFI" ]; then
UFSBOOT_ESPS=$(cat $TMPDIR/bsdinstall-esps 2>/dev/null)
ZFSBOOT_DISKS=$(cat $TMPDIR/bsdinstall-zfsboot 2>/dev/null)
num_esps=0
@@ -127,6 +127,7 @@
case $(uname -m) in
arm64) ARCHBOOTNAME=aa64 ;;
amd64) ARCHBOOTNAME=x64 ;;
+ riscv) ARCHBOOTNAME=riscv64 ;;
# arm) ARCHBOOTNAME=arm ;; # No other support for arm install
# i386) ARCHBOOTNAME=ia32 ;; # no support for this in i386 kernels, rare machines
*) die "Unsupported arch $(uname -m) for UEFI install"
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -1554,8 +1554,8 @@
# Determine default boot type
#
case $(uname -m) in
-arm64)
- # We support only UEFI boot for arm64
+arm64|riscv)
+ # We support only UEFI boot for arm64 and riscv.
: ${ZFSBOOT_BOOT_TYPE:=UEFI}
: ${ZFSBOOT_PARTITION_SCHEME:=GPT}
;;

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 13, 1:06 PM (21 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15782364
Default Alt Text
D28180.diff (2 KB)

Event Timeline