mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 12:06:35 +07:00
kbuild: external modules shall not check config consistency
external modules needs include/linux/autoconf.h and include/config/auto.conf but skip the integrity test of these. Even with a newer Kconfig file we shall just proceed since external modules simply uses the kernel source and shall not attempt to modify it. Error out if a config fiel is missing since they are mandatory. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
58a2f7d85a
commit
9ee4e3365d
24
Makefile
24
Makefile
@ -436,12 +436,13 @@ core-y := usr/
|
|||||||
endif # KBUILD_EXTMOD
|
endif # KBUILD_EXTMOD
|
||||||
|
|
||||||
ifeq ($(dot-config),1)
|
ifeq ($(dot-config),1)
|
||||||
# In this section, we need .config
|
# Read in config
|
||||||
|
-include include/config/auto.conf
|
||||||
|
|
||||||
|
ifeq ($(KBUILD_EXTMOD),)
|
||||||
# Read in dependencies to all Kconfig* files, make sure to run
|
# Read in dependencies to all Kconfig* files, make sure to run
|
||||||
# oldconfig if changes are detected.
|
# oldconfig if changes are detected.
|
||||||
-include include/config/auto.conf.cmd
|
-include include/config/auto.conf.cmd
|
||||||
-include include/config/auto.conf
|
|
||||||
|
|
||||||
# To avoid any implicit rule to kick in, define an empty command
|
# To avoid any implicit rule to kick in, define an empty command
|
||||||
$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
|
$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
|
||||||
@ -451,16 +452,27 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
|
|||||||
# if auto.conf.cmd is missing then we are probably in a cleaned tree so
|
# if auto.conf.cmd is missing then we are probably in a cleaned tree so
|
||||||
# we execute the config step to be sure to catch updated Kconfig files
|
# we execute the config step to be sure to catch updated Kconfig files
|
||||||
include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
|
include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
|
||||||
ifeq ($(KBUILD_EXTMOD),)
|
|
||||||
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
|
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
|
||||||
else
|
else
|
||||||
$(error kernel configuration not valid - run 'make prepare' in $(srctree) to update it)
|
# external modules needs include/linux/autoconf.h and include/config/auto.conf
|
||||||
endif
|
# but do not care if they are up-to-date. Use auto.conf to trigger the test
|
||||||
|
PHONY += include/config/auto.conf
|
||||||
|
|
||||||
|
include/config/auto.conf:
|
||||||
|
$(Q)test -e include/linux/autoconf.h -a -e $@ || ( \
|
||||||
|
echo; \
|
||||||
|
echo " ERROR: Kernel configuration is invalid."; \
|
||||||
|
echo " include/linux/autoconf.h or $@ are missing."; \
|
||||||
|
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
|
||||||
|
echo; \
|
||||||
|
/bin/false)
|
||||||
|
|
||||||
|
endif # KBUILD_EXTMOD
|
||||||
|
|
||||||
else
|
else
|
||||||
# Dummy target needed, because used as prerequisite
|
# Dummy target needed, because used as prerequisite
|
||||||
include/config/auto.conf: ;
|
include/config/auto.conf: ;
|
||||||
endif
|
endif # $(dot-config)
|
||||||
|
|
||||||
# The all: target is the default when no target is given on the
|
# The all: target is the default when no target is given on the
|
||||||
# command line.
|
# command line.
|
||||||
|
Loading…
Reference in New Issue
Block a user