Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 363d02b

Browse files
t-8chmasahir0y
authored andcommittedMar 11, 2025
kbuild: implement CONFIG_HEADERS_INSTALL for Usermode Linux
userprogs sometimes need access to UAPI headers. This is currently not possible for Usermode Linux, as UM is only a pseudo architecture built on top of a regular architecture and does not have its own UAPI. Instead use the UAPI headers from the underlying regular architecture. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent dafbec3 commit 363d02b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1361,9 +1361,12 @@ hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj
13611361

13621362
PHONY += headers
13631363
headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts
1364-
$(if $(filter um, $(SRCARCH)), $(error Headers not exportable for UML))
1364+
ifdef HEADER_ARCH
1365+
$(Q)$(MAKE) -f $(srctree)/Makefile HEADER_ARCH= SRCARCH=$(HEADER_ARCH) headers
1366+
else
13651367
$(Q)$(MAKE) $(hdr-inst)=include/uapi
13661368
$(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi
1369+
endif
13671370

13681371
ifdef CONFIG_HEADERS_INSTALL
13691372
prepare: headers

‎lib/Kconfig.debug

-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,6 @@ config READABLE_ASM
473473

474474
config HEADERS_INSTALL
475475
bool "Install uapi headers to usr/include"
476-
depends on !UML
477476
help
478477
This option will install uapi headers (headers exported to user-space)
479478
into the usr/include directory for use during the kernel build.

0 commit comments

Comments
 (0)
Failed to load comments.