From: Ilias Apalodimas Date: Wed, 11 Jun 2025 20:24:40 +0000 (+0300) Subject: kbuild: fix single target build for external module X-Git-Tag: v2025.10-rc1~118^2~28^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=070b81458aec02f0cde69f87b28fa82c5bb8e906;p=pandora-u-boot.git kbuild: fix single target build for external module Backported from kernel commit e07db28eea38 ("kbuild: fix single target build for external module") It's worth noting that crmodverdir is empty for U-Boot. Just backport it to make diffing easier Signed-off-by: Ilias Apalodimas --- diff --git a/Makefile b/Makefile index af8129ccc88..a9cba5b6e07 100644 --- a/Makefile +++ b/Makefile @@ -230,6 +230,9 @@ ifeq ($(KBUILD_EXTMOD),) _all: all else _all: modules +PHONY += prepare +prepare: + $(cmd_crmodverdir) endif ifeq ($(KBUILD_SRC),) @@ -2503,15 +2506,12 @@ endif # Modules /: prepare FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) %/: prepare FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) %.ko: prepare FORCE - $(cmd_crmodverdir) $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(build)=$(build-dir) $(@:.ko=.o) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost