From 599d032a6dfbb7950906a2e26c6b3035f39e3ac7 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 20 Nov 2019 21:06:29 +0000 Subject: [PATCH] Standardize EFI's ESP mount point. Mount the UEFI ESP on /boot/efi. No current system uses this by default, but there are many ad-hoc schemes that do this in /efi or /esp or /uefi and adding a new directory at the top-level would have a much higher likelihood of collision. Document this in /etc/mtree/BSD.root.mtree and create EFIDIR and related variables in bsd.own.mk. Differential Revision: https://reviews.freebsd.org/D21344 --- etc/mtree/BSD.root.dist | 2 ++ share/man/man7/hier.7 | 2 ++ share/mk/bsd.own.mk | 13 +++++++++++++ 3 files changed, 17 insertions(+) diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 371530eb0490..a688d5806b3b 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -18,6 +18,8 @@ rockchip tags=package=runtime .. .. + efi + .. firmware .. lua diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index b0b14df3ce6e..bd81dcc8f5e6 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -53,6 +53,8 @@ Compiled flattened device tree (FDT) files; see .Xr fdt 4 and .Xr dtc 1 +.It Pa efi/ +Mount point for EFI System Partition (ESP) on UEFI systems. .It Pa firmware/ loadable kernel modules containing binary firmware for hardware that needs firmware downloaded to it to function diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 69db8c8eabca..09d7dfbd25c8 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -56,6 +56,15 @@ # KMODMODE KLD mode. [${BINMODE}] # # +# EFIDIR Base path for the UEFI ESP [/boot/efi] +# +# EFIOWN EFIDIR owner. [root] +# +# EFIGRP EFIDIR group. [wheel] +# +# EFIMODE EFIDIR mode. [555] +# +# # SHAREDIR Base path for architecture-independent ascii # text files. [/usr/share] # @@ -169,6 +178,10 @@ DTBODIR?= /boot/dtb/overlays DTBOWN?= root DTBGRP?= wheel DTBMODE?= 444 +EFIDIR?= /boot/efi +EFIOWN?= root +EFIGRP?= wheel +EFIMODE?= 555 # Use make.conf / environment LIBDIR as default if set... .if !empty(_PREMK_LIBDIR)