* [PATCH 1/2] kbuild: export whether we are cross compiling
@ 2025-03-13 6:37 Ahmad Fatoum
2025-03-13 6:37 ` [PATCH 2/2] kbuild: override host system KCONFIG_DEFCONFIG_LIST Ahmad Fatoum
2025-03-13 11:41 ` [PATCH 1/2] kbuild: export whether we are cross compiling Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2025-03-13 6:37 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
scripts/kconfig makes use of this variable to inform whether the local
system's config should be used when no config exists.
Set it in barebox like Linux does.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Makefile b/Makefile
index 9ef07ba34457..760fd7381ece 100644
--- a/Makefile
+++ b/Makefile
@@ -368,6 +368,11 @@ ifeq ($(ARCH),um)
SRCARCH := sandbox
endif
+export cross_compiling :=
+ifneq ($(SRCARCH),$(SUBARCH))
+cross_compiling := 1
+endif
+
KCONFIG_CONFIG ?= .config
PKG_CONFIG ?= pkg-config
--
2.39.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] kbuild: override host system KCONFIG_DEFCONFIG_LIST
2025-03-13 6:37 [PATCH 1/2] kbuild: export whether we are cross compiling Ahmad Fatoum
@ 2025-03-13 6:37 ` Ahmad Fatoum
2025-03-13 11:41 ` [PATCH 1/2] kbuild: export whether we are cross compiling Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2025-03-13 6:37 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
KCONFIG_DEFCONFIG_LIST contains some default locations where a Kernel
config can be found (e.g. /boot/config-$(uname -r)).
Currently, if a config is found in these default locations, it's used as
initial config for barebox as well, which doesn't work well, because
barebox architecture symbols defer quite a bit from the Linux ones.
Let's therefore set the make variable to an empty string to avoid this
issue.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 760fd7381ece..5433927ed197 100644
--- a/Makefile
+++ b/Makefile
@@ -602,10 +602,10 @@ include $(srctree)/arch/$(SRCARCH)/Makefile
export KBUILD_DEFCONFIG CC_VERSION_TEXT
config: outputmakefile scripts_basic FORCE
- $(Q)$(MAKE) $(build)=scripts/kconfig $@
+ $(Q)$(MAKE) $(build)=scripts/kconfig KCONFIG_DEFCONFIG_LIST= $@
%config: outputmakefile scripts_basic FORCE
- $(Q)$(MAKE) $(build)=scripts/kconfig $@
+ $(Q)$(MAKE) $(build)=scripts/kconfig KCONFIG_DEFCONFIG_LIST= $@
else #!config-build
# ===========================================================================
--
2.39.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] kbuild: export whether we are cross compiling
2025-03-13 6:37 [PATCH 1/2] kbuild: export whether we are cross compiling Ahmad Fatoum
2025-03-13 6:37 ` [PATCH 2/2] kbuild: override host system KCONFIG_DEFCONFIG_LIST Ahmad Fatoum
@ 2025-03-13 11:41 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2025-03-13 11:41 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Thu, 13 Mar 2025 07:37:26 +0100, Ahmad Fatoum wrote:
> scripts/kconfig makes use of this variable to inform whether the local
> system's config should be used when no config exists.
>
> Set it in barebox like Linux does.
>
>
Applied, thanks!
[1/2] kbuild: export whether we are cross compiling
https://git.pengutronix.de/cgit/barebox/commit/?id=c42de0901bd7 (link may not be stable)
[2/2] kbuild: override host system KCONFIG_DEFCONFIG_LIST
https://git.pengutronix.de/cgit/barebox/commit/?id=2b32c64a9f08 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-03-13 11:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-13 6:37 [PATCH 1/2] kbuild: export whether we are cross compiling Ahmad Fatoum
2025-03-13 6:37 ` [PATCH 2/2] kbuild: override host system KCONFIG_DEFCONFIG_LIST Ahmad Fatoum
2025-03-13 11:41 ` [PATCH 1/2] kbuild: export whether we are cross compiling Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox