Created attachment 248972 [details] fix to the loader.efi issue When building loader.efi with LOADER_NET_SUPPORT=no an error occurs: ld: error: undefined symbol: net_parse_rootpath >>> referenced by main.c:1760 (out/usr/src/stand/efi/loader_simp/../loader/main.c:1760) >>> main.o:(command_netserver) cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Probably cause stand/common/dev_net.h (witch contains net_parse_rootpath) is disabled There was a similar problem in 11.3 fixed with https://reviews.freebsd.org/rGbe4890f75e7c68ae6bc5978a85860d78d05ae02b But COMMAND_SET(netserver, "netserver"...) in efi/loader/main.c efi/loader/main.c was added later. Probably that is the reason I'm attaching the patch that I've used to disable this command. Which looks logically fine - cause why need netserver if LOADER_NET_SUPPORT=no
Looks good. Committed. Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=47ef2a131091508e049ab10cad7f91a3c1342cd9 commit 47ef2a131091508e049ab10cad7f91a3c1342cd9 Author: Tatiana <t.ermakova@securitycode.ru> AuthorDate: 2024-11-02 22:13:58 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-11-02 22:13:58 +0000 loader.efi: Fix LOADER_NET_SUPPORT=no builds We include too many references to networking things in the non-networking build for loader.efi. Ifdef out netserver command when we are disabling network support to resolve. PR: 277528 MFC After: 2 days Reviewed by: imp stand/efi/loader/main.c | 2 ++ 1 file changed, 2 insertions(+)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=adce5eaab9a975655cd846c9841551ed8f89207a commit adce5eaab9a975655cd846c9841551ed8f89207a Author: Tatiana <t.ermakova@securitycode.ru> AuthorDate: 2024-11-02 22:13:58 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-11-04 00:51:25 +0000 loader.efi: Fix LOADER_NET_SUPPORT=no builds We include too many references to networking things in the non-networking build for loader.efi. Ifdef out netserver command when we are disabling network support to resolve. PR: 277528 MFC After: 2 days Reviewed by: imp (cherry picked from commit 47ef2a131091508e049ab10cad7f91a3c1342cd9) stand/efi/loader/main.c | 2 ++ 1 file changed, 2 insertions(+)