Date: Sun, 16 Nov 2025 23:05:08 -0700 From: Warner Losh <imp@bsdimp.com> To: A FreeBSD User <freebsd@walstatt-de.de> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 44fb9f2701c7 - main - sys/efi_map.h: This is a kernel-only file Message-ID: <CANCZdfrEdFgE3_FzPCUTauJ0Y2Xv89-xyAwRCProcrSNc=Jkxw@mail.gmail.com> In-Reply-To: <CANCZdfqZfq7nWijimM0CmSs1xw2s9gZihqoko-Q5NTtF5R=Trw@mail.gmail.com> References: <202511170018.5AH0ITWK063891@gitrepo.freebsd.org> <20251117051144.3d0c31d9@thor.sb211.local> <CANCZdfqZfq7nWijimM0CmSs1xw2s9gZihqoko-Q5NTtF5R=Trw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Sun, Nov 16, 2025 at 10:16 PM Warner Losh <imp@bsdimp.com> wrote: > > > On Sun, Nov 16, 2025 at 9:14 PM A FreeBSD User <freebsd@walstatt-de.de> > wrote: > >> Am Tage des Herren Mon, 17 Nov 2025 00:18:29 GMT >> Warner Losh <imp@FreeBSD.org> schrieb: >> >> > The branch main has been updated by imp: >> > >> > URL: >> https://cgit.FreeBSD.org/src/commit/?id=44fb9f2701c71ce6bba75810fc6b7e735ecd5868 >> > >> > commit 44fb9f2701c71ce6bba75810fc6b7e735ecd5868 >> > Author: Warner Losh <imp@FreeBSD.org> >> > AuthorDate: 2025-11-16 23:58:37 +0000 >> > Commit: Warner Losh <imp@FreeBSD.org> >> > CommitDate: 2025-11-17 00:16:26 +0000 >> > >> > sys/efi_map.h: This is a kernel-only file >> > >> > Slap a #ifdef _KERNEL around it all since it's useless to userland. >> > >> > Fixes: 43b8edb32051 >> > Sponsored by: Netflix >> > --- >> > sys/sys/efi_map.h | 4 ++++ >> > 1 file changed, 4 insertions(+) >> > >> > diff --git a/sys/sys/efi_map.h b/sys/sys/efi_map.h >> > index 8b458cd08b00..d2206056b1f8 100644 >> > --- a/sys/sys/efi_map.h >> > +++ b/sys/sys/efi_map.h >> > @@ -7,6 +7,8 @@ >> > #ifndef _SYS_EFI_MAP_H_ >> > #define _SYS_EFI_MAP_H_ >> > >> > +#ifdef _KERNEL >> > + >> > #include <sys/efi.h> >> > #include <machine/metadata.h> >> > >> > @@ -21,4 +23,6 @@ void efi_map_add_entries(struct efi_map_header >> *efihdr); >> > void efi_map_exclude_entries(struct efi_map_header *efihdr); >> > void efi_map_print_entries(struct efi_map_header *efihdr); >> > >> > +#endif >> > + >> > #endif /* !_SYS_EFI_MAP_H_ */ >> > >> >> Hello, >> >> tried a buildworld just now and it fails, something seems missing: >> >> [...] >> ===> stand/libsa (all) >> mkdir -p xlocale arpa ssp; for i in a.out.h assert.h elf.h limits.h >> nlist.h setjmp.h stddef.h >> stdbool.h string.h strings.h time.h uuid.h; do ln -sf >> /usr/src/include/$i $i; done; ln -sf >> /usr/src/sys/sys/errno.h errno.h; ln -sf /usr/src/sys/sys/stdarg.h >> stdarg.h; ln -sf >> /usr/src/sys/sys/stdint.h stdint.h; ln -sf /usr/src/include/arpa/inet.h >> arpa/inet.h; ln -sf >> /usr/src/include/arpa/tftp.h arpa/tftp.h; ln -sf >> /usr/src/include/ssp/ssp.h ssp/ssp.h; for i in _time.h _strings.h >> _string.h; do [ -f xlocale/$i ] || :> >> xlocale/$i; done; for i in ctype.h fcntl.h signal.h stdio.h stdlib.h >> unistd.h; do ln -sf >> /usr/src/stand/libsa/stand.h $i; done cc -target >> x86_64-unknown-freebsd16.0 >> --sysroot=/usr/obj/usr/src/amd64.amd64/tmp >> -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 >> -pipe -fno-common -nostdinc >> -I/usr/obj/usr/src/amd64.amd64/stand/libsa >> -I/usr/src/stand/libsa -D_STANDALONE -I/usr/src/sys >> -Ddouble=jagged-little-pill >> -Dfloat=floaty-mcfloatface -ffunction-sections -fdata-sections >> -DLOADER_GELI_SUPPORT >> -I/usr/src/stand/libsa/geli -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx >> -mno-sse -mno-avx >> -mno-avx2 -msoft-float -fPIC -mno-red-zone -mno-relax -I. >> -DLOADER_VERIEXEC >> -I/usr/src/lib/libsecureboot/h -DLOADER_VERIEXEC_VECTX -Iinclude >> -I/usr/src/contrib/bearssl/inc -Wno-deprecated-non-prototype >> -I/usr/src/contrib/bearssl/src >> -I/usr/src/lib/libsecureboot/h -DHAVE_BR_X509_TIME_CHECK -DNO_STDIO >> -I/usr/src/contrib/bearssl/tools -I. -DTRUST_ANCHOR_STR=ta_PEM >> -DVE_SHA256_SUPPORT >> -DVE_SHA384_SUPPORT -DVE_RSA_SUPPORT -DVE_PCR_SUPPORT >> -I/usr/src/stand/efi/include >> -I/usr/src/lib/libsecureboot/efi/include >> -I/usr/src/stand/efi/include/amd64 -DNDEBUG -MD >> -MF.depend.efi_variables.o -MTefi_variables.o -std=gnu17 >> -Wno-format-zero-length >> -Wsystem-headers -Wno-pointer-sign -Wdate-time -Wno-empty-body >> -Wno-string-plus-int >> -Wno-unused-const-variable -Wno-error=unused-but-set-parameter >> -Wno-error=cast-function-type-mismatch -Wno-tautological-compare >> -Wno-unused-value >> -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion >> -Wno-unused-local-typedef >> -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum >> -Wno-knr-promoted-parameter >> -Wno-parentheses -Oz -Qunused-arguments -c >> /usr/src/lib/libsecureboot/efi/efi_variables.c >> -o efi_variables.o In file included from >> /usr/src/lib/libsecureboot/efi/efi_variables.c:31: >> /usr/src/stand/efi/include/efi.h:47:10: fatal error: 'Uefi.h' file not >> found 47 | #include >> <Uefi.h> >> [...] > > > I've done 20 buildworlds today. And on what architecture? What do you have > in your src.conf since I'm not seeing this and I didn't think we built > libsecureboot by default. I certainly didn't fix it and didn't expect it to > include efi.h from stand. I'm skeptical about why since that file is > tailored to the boot loader only. > > Warner > Oh, I see. WITH_BEARSSL and WITH_LOADER_EFI_SECUREBOOT must have been selected. I just fixed this with 3c5ca68b9b7c. Unless it's something else, in which case I'll need more details. Warner [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Nov 16, 2025 at 10:16 PM Warner Losh <<a href="mailto:imp@bsdimp.com">imp@bsdimp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 16, 2025 at 9:14 PM A FreeBSD User <<a href="mailto:freebsd@walstatt-de.de" target="_blank">freebsd@walstatt-de.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Tage des Herren Mon, 17 Nov 2025 00:18:29 GMT<br> Warner Losh <imp@FreeBSD.org> schrieb:<br> <br> > The branch main has been updated by imp:<br> > <br> > URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=44fb9f2701c71ce6bba75810fc6b7e735ecd5868" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=44fb9f2701c71ce6bba75810fc6b7e735ecd5868</a><br> > <br> > commit 44fb9f2701c71ce6bba75810fc6b7e735ecd5868<br> > Author: Warner Losh <imp@FreeBSD.org><br> > AuthorDate: 2025-11-16 23:58:37 +0000<br> > Commit: Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2025-11-17 00:16:26 +0000<br> > <br> > sys/efi_map.h: This is a kernel-only file<br> > <br> > Slap a #ifdef _KERNEL around it all since it's useless to userland.<br> > <br> > Fixes: 43b8edb32051<br> > Sponsored by: Netflix<br> > ---<br> > sys/sys/efi_map.h | 4 ++++<br> > 1 file changed, 4 insertions(+)<br> > <br> > diff --git a/sys/sys/efi_map.h b/sys/sys/efi_map.h<br> > index 8b458cd08b00..d2206056b1f8 100644<br> > --- a/sys/sys/efi_map.h<br> > +++ b/sys/sys/efi_map.h<br> > @@ -7,6 +7,8 @@<br> > #ifndef _SYS_EFI_MAP_H_<br> > #define _SYS_EFI_MAP_H_<br> > <br> > +#ifdef _KERNEL<br> > +<br> > #include <sys/efi.h><br> > #include <machine/metadata.h><br> > <br> > @@ -21,4 +23,6 @@ void efi_map_add_entries(struct efi_map_header *efihdr);<br> > void efi_map_exclude_entries(struct efi_map_header *efihdr);<br> > void efi_map_print_entries(struct efi_map_header *efihdr);<br> > <br> > +#endif<br> > +<br> > #endif /* !_SYS_EFI_MAP_H_ */<br> > <br> <br> Hello,<br> <br> tried a buildworld just now and it fails, something seems missing:<br> <br> [...]<br> ===> stand/libsa (all)<br> mkdir -p xlocale arpa ssp; for i in a.out.h assert.h elf.h limits.h nlist.h setjmp.h stddef.h<br> stdbool.h string.h strings.h time.h uuid.h; do ln -sf /usr/src/include/$i $i; done; ln -sf<br> /usr/src/sys/sys/errno.h errno.h; ln -sf /usr/src/sys/sys/stdarg.h stdarg.h; ln -sf<br> /usr/src/sys/sys/stdint.h stdint.h; ln -sf /usr/src/include/arpa/inet.h arpa/inet.h; ln -sf<br> /usr/src/include/arpa/tftp.h arpa/tftp.h; ln -sf /usr/src/include/ssp/ssp.h ssp/ssp.h; for i in _time.h _strings.h _string.h; do [ -f xlocale/$i ] || :><br> xlocale/$i; done; for i in ctype.h fcntl.h signal.h stdio.h stdlib.h unistd.h; do ln -sf<br> /usr/src/stand/libsa/stand.h $i; done cc -target x86_64-unknown-freebsd16.0<br> --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2<br> -pipe -fno-common -nostdinc -I/usr/obj/usr/src/amd64.amd64/stand/libsa<br> -I/usr/src/stand/libsa -D_STANDALONE -I/usr/src/sys -Ddouble=jagged-little-pill<br> -Dfloat=floaty-mcfloatface -ffunction-sections -fdata-sections -DLOADER_GELI_SUPPORT<br> -I/usr/src/stand/libsa/geli -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx<br> -mno-avx2 -msoft-float -fPIC -mno-red-zone -mno-relax -I. -DLOADER_VERIEXEC<br> -I/usr/src/lib/libsecureboot/h -DLOADER_VERIEXEC_VECTX -Iinclude<br> -I/usr/src/contrib/bearssl/inc -Wno-deprecated-non-prototype -I/usr/src/contrib/bearssl/src<br> -I/usr/src/lib/libsecureboot/h -DHAVE_BR_X509_TIME_CHECK -DNO_STDIO<br> -I/usr/src/contrib/bearssl/tools -I. -DTRUST_ANCHOR_STR=ta_PEM -DVE_SHA256_SUPPORT<br> -DVE_SHA384_SUPPORT -DVE_RSA_SUPPORT -DVE_PCR_SUPPORT -I/usr/src/stand/efi/include<br> -I/usr/src/lib/libsecureboot/efi/include -I/usr/src/stand/efi/include/amd64 -DNDEBUG -MD<br> -MF.depend.efi_variables.o -MTefi_variables.o -std=gnu17 -Wno-format-zero-length<br> -Wsystem-headers -Wno-pointer-sign -Wdate-time -Wno-empty-body -Wno-string-plus-int<br> -Wno-unused-const-variable -Wno-error=unused-but-set-parameter<br> -Wno-error=cast-function-type-mismatch -Wno-tautological-compare -Wno-unused-value<br> -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef<br> -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter<br> -Wno-parentheses -Oz -Qunused-arguments -c /usr/src/lib/libsecureboot/efi/efi_variables.c<br> -o efi_variables.o In file included from /usr/src/lib/libsecureboot/efi/efi_variables.c:31:<br> /usr/src/stand/efi/include/efi.h:47:10: fatal error: 'Uefi.h' file not found 47 | #include<br> <Uefi.h><br> [...]</blockquote><div><br></div><div>I've done 20 buildworlds today. And on what architecture? What do you have in your src.conf since I'm not seeing this and I didn't think we built libsecureboot by default. I certainly didn't fix it and didn't expect it to include efi.h from stand. I'm skeptical about why since that file is tailored to the boot loader only.</div><div><br></div><div>Warner </div></div></div></blockquote><div><br></div><div>Oh, I see. WITH_BEARSSL and WITH_LOADER_EFI_SECUREBOOT must have been selected. I just fixed this with 3c5ca68b9b7c. Unless it's something else, in which case I'll need more details.</div><div><br></div><div>Warner </div></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrEdFgE3_FzPCUTauJ0Y2Xv89-xyAwRCProcrSNc=Jkxw>
