boot/barebox: fix target bareboxenv command compile
PATCH 1/1 boot/barebox: fix target bareboxenv command compile
The buildroot custom bareboxenv compile command needs the additional include path 'scripts/include' to gain access to the local copy of the kernel header files.
Fixes (with BR2_TARGET_BAREBOX_BAREBOXENV enabled):
build/barebox-2019.12.0/scripts/bareboxenv.c:100:10: fatal error: linux/list.h: No such file or directory
--- boot/barebox/barebox.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
boot/barebox/barebox.mk +2 -1
@@ -82,7 +82,8 @@ $(1)_KCONFIG_DEPENDENCIES = \ ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) define $(1)_BUILD_BAREBOXENV_CMDS - $$(TARGET_CC) $$(TARGET_CFLAGS) $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \ + $$(TARGET_CC) $$(TARGET_CFLAGS) -I$$(@D)/scripts/include \ + $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \ $$(@D)/scripts/bareboxenv.c endef endif
Signature · 1 line
2.24.1
PATCH 1/1 boot/barebox: fix target bareboxenv command compile
Peter, All,
Sorry to come back so late on that patch.
On 2020-01-07 20:50 +0100, Peter Seiderer spake thusly:
Quoted 20 lines
The buildroot custom bareboxenv compile command needs the additional include path '
scripts/include' to gain access to the local copy of the kernel header files.Fixes (with
BR2_TARGET_BAREBOX_BAREBOXENVenabled):
build/barebox-2019.12.0/scripts/bareboxenv.c:100:10: fatal error:linux/list.h: No such file or directoryReported-by Frederick Gotham <[email protected]>Signed-off-by Peter Seiderer <[email protected]>--- boot/barebox/barebox.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)boot/barebox/barebox.mk +0
-0
boot/barebox/barebox.mk $(1)_KCONFIG_DEPENDENCIES = \ · line 86
Quoted 6 lines
boot/barebox/barebox.mk +2
-1@@ -82,7 +82,8 @@ $(1)_KCONFIG_DEPENDENCIES = \ ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) define $(1)_BUILD_BAREBOXENV_CMDS - $$(TARGET_CC) $$(TARGET_CFLAGS) $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \ + $$(TARGET_CC) $$(TARGET_CFLAGS) -I$$(@D)/scripts/include \ + $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \
Although this is techniocally, correct, I wonder why we do not use BAREBOX_KONFIG_FIXUP_CMDS to enabler CONFIG_BAREBOXENV_TARGET in the barebox configuration, for example:
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 422f27312d..5eaeb7db4c 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -112,6 +112,9 @@ ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),)
define $(1)_KCONFIG_FIXUP_CMDS
$$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT)
$$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)")
+ $$(if $$(BAREBOX_KONFIG_FIXUP_CMDS),\
+ $$(call KCONFIG_ENABLE_OPT,CONFIG_BAREBOXENV_TARGET),\
+ $$(call KCONFIG_DISABLE_OPT,CONFIG_BAREBOXENV_TARGET))
endef
endifAnd then we candrop our custom build command for it...
CONFIG_BAREBOXENV_TARGET has existed since commit afb03d7a55, in April 2012, so virtually all barebox versions that are recent have it.
Regards,
Yann E. MORIN.
Quoted 10 lines
boot/barebox/barebox.mk +0
-0$$(@D)/scripts/bareboxenv.c endef endifSignature · 6 lines
2.24.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 boot/barebox: fix target bareboxenv command compile
Hello Yann,
Quoted 3 lines · Yann E. MORIN
Peter, All,
Sorry to come back so late on that patch.
Better late than never ;-), nevertheless thanks for review...
Quoted 33 lines
On 2020-01-07 20:50 +0100, Peter Seiderer spake thusly:
Quoted 20 lines
The buildroot custom bareboxenv compile command needs the additional include path '
scripts/include' to gain access to the local copy of the kernel header files.Fixes (with
BR2_TARGET_BAREBOX_BAREBOXENVenabled):
build/barebox-2019.12.0/scripts/bareboxenv.c:100:10: fatal error:linux/list.h: No such file or directoryReported-by Frederick Gotham <[email protected]>Signed-off-by Peter Seiderer <[email protected]>--- boot/barebox/barebox.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)boot/barebox/barebox.mk +0
-0boot/barebox/barebox.mk $(1)_KCONFIG_DEPENDENCIES = \ · line 86
Quoted 6 lines
boot/barebox/barebox.mk +2
-1@@ -82,7 +82,8 @@ $(1)_KCONFIG_DEPENDENCIES = \ ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) define $(1)_BUILD_BAREBOXENV_CMDS - $$(TARGET_CC) $$(TARGET_CFLAGS) $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \ + $$(TARGET_CC) $$(TARGET_CFLAGS) -I$$(@D)/scripts/include \ + $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \Although this is techniocally, correct, I wonder why we do not use
BAREBOX_KONFIG_FIXUP_CMDSto enablerCONFIG_BAREBOXENV_TARGETin the barebox configuration, for example:
Quoted 5 lines
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 422f27312d..5eaeb7db4c 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -112,6 +112,9 @@ ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),)Seems the wrong place as BR2_TARGET_BAREBOX_BAREBOXENV is/should be independent of BR2_TARGET_BAREBOX_CUSTOM_EMBEDDED_ENV_PATH
Quoted 4 lines
define $(1)_KCONFIG_FIXUP_CMDS
$$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT)
$$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)")
+ $$(if $$(BAREBOX_KONFIG_FIXUP_CMDS),\Did you mean '$$(if $$(BR2_TARGET_BAREBOX_BAREBOXENV),' ???
Regards,
Peter
Quoted 25 lines
+ $$(call KCONFIG_ENABLE_OPT,CONFIG_BAREBOXENV_TARGET),\ + $$(call KCONFIG_DISABLE_OPT,CONFIG_BAREBOXENV_TARGET)) endef endifAnd then we candrop our custom build command for it...
CONFIG_BAREBOXENV_TARGEThas existed since commitafb03d7a55, in April 2012, so virtually all barebox versions that are recent have it.Regards,
Yann E. MORIN.Quoted 10 lines
boot/barebox/barebox.mk +0
-1$$(@D)/scripts/bareboxenv.c endef endif --2.24.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 boot/barebox: fix target bareboxenv command compile
Peter, All,
On 2020-10-01 23:02 +0200, Peter Seiderer spake thusly:
Quoted 10 lines · Yann E. MORIN
Quoted 9 lines
On 2020-01-07 20:50 +0100, Peter Seiderer spake thusly:
Quoted 8 lines
The buildroot custom bareboxenv compile command needs the additional include path '
scripts/include' to gain access to the local copy of the kernel header files.Fixes (with
BR2_TARGET_BAREBOX_BAREBOXENVenabled):
build/barebox-2019.12.0/scripts/bareboxenv.c:100:10: fatal error:linux/list.h: No such file or directory
[--SNIP--]
Quoted 11 lines
Quoted 9 lines
Although this is techniocally, correct, I wonder why we do not use
BAREBOX_KONFIG_FIXUP_CMDSto enablerCONFIG_BAREBOXENV_TARGETin the barebox configuration, for example:diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk index 422f27312d..5eaeb7db4c 100644 --- a/boot/barebox/barebox.mk +++ b/boot/barebox/barebox.mk @@ -112,6 +112,9 @@ ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),)Seems the wrong place as
BR2_TARGET_BAREBOX_BAREBOXENVis/should be independent ofBR2_TARGET_BAREBOX_CUSTOM_EMBEDDED_ENV_PATH
Yes, but it was just to give the overall idea. Of course, that part will have to be refactored.
Quoted 5 lines
Quoted 4 lines
define $(1)_KCONFIG_FIXUP_CMDS $$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT) $$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)") + $$(if $$(BAREBOX_KONFIG_FIXUP_CMDS),\Did you mean '$$(if $$(BR2_TARGET_BAREBOX_BAREBOXENV),' ???
Arg, almost, yes. I really meant $$(BR2_TARGET_$(1)_BAREBOXENV) ;-)
Regards,
Yann E. MORIN.
Quoted 29 lines
Regards,
PeterQuoted 25 lines
+ $$(call KCONFIG_ENABLE_OPT,CONFIG_BAREBOXENV_TARGET),\ + $$(call KCONFIG_DISABLE_OPT,CONFIG_BAREBOXENV_TARGET)) endef endifAnd then we candrop our custom build command for it...
CONFIG_BAREBOXENV_TARGEThas existed since commitafb03d7a55, in April 2012, so virtually all barebox versions that are recent have it.Regards,
Yann E. MORIN.Quoted 10 lines
$$(@D)/scripts/bareboxenv.c
endef
endif
--
2.24.1_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 boot/barebox: fix target bareboxenv command compile
Hello Yann,
Quoted 29 lines · Yann E. MORIN
Peter, All,
On 2020-10-01 23:02 +0200, Peter Seiderer spake thusly:
Quoted 10 lines · Yann E. MORIN
Quoted 9 lines
On 2020-01-07 20:50 +0100, Peter Seiderer spake thusly:
Quoted 8 lines
The buildroot custom bareboxenv compile command needs the additional include path '
scripts/include' to gain access to the local copy of the kernel header files.Fixes (with
BR2_TARGET_BAREBOX_BAREBOXENVenabled):
build/barebox-2019.12.0/scripts/bareboxenv.c:100:10: fatal error:linux/list.h: No such file or directory[--SNIP--]
Quoted 11 lines
Quoted 9 lines
Although this is techniocally, correct, I wonder why we do not use
BAREBOX_KONFIG_FIXUP_CMDSto enablerCONFIG_BAREBOXENV_TARGETin the barebox configuration, for example:diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk index 422f27312d..5eaeb7db4c 100644 --- a/boot/barebox/barebox.mk +++ b/boot/barebox/barebox.mk @@ -112,6 +112,9 @@ ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),)Seems the wrong place as
BR2_TARGET_BAREBOX_BAREBOXENVis/should be independent ofBR2_TARGET_BAREBOX_CUSTOM_EMBEDDED_ENV_PATHYes, but it was just to give the overall idea. Of course, that part will have to be refactored.
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
define $(1)_KCONFIG_FIXUP_CMDS $$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT) $$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)") + $$(if $$(BAREBOX_KONFIG_FIXUP_CMDS),\Did you mean '$$(if $$(BR2_TARGET_BAREBOX_BAREBOXENV),' ???
Arg, almost, yes. I really meant $$(BR2_TARGET_$(1)_BAREBOXENV) ;-)
The following patch seems to work:
boot/barebox/barebox.mk +13 -9
@@ -88,13 +88,6 @@ $(1)_KCONFIG_DEPENDENCIES = \ $(BR2_BISON_HOST_DEPENDENCY) \ $(BR2_FLEX_HOST_DEPENDENCY) -ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) -define $(1)_BUILD_BAREBOXENV_CMDS - $$(TARGET_CC) $$(TARGET_CFLAGS) $$(TARGET_LDFLAGS) -o $$(@D)/bareboxenv \ - $$(@D)/scripts/bareboxenv.c -endef -endif - ifeq ($$(BR2_TARGET_$(1)_CUSTOM_ENV),y) $(1)_ENV_NAME = $$(notdir $$(call qstrip,\ $$(BR2_TARGET_$(1)_CUSTOM_ENV_PATH)))
@@ -109,12 +102,23 @@ endef endif ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),) -define $(1)_KCONFIG_FIXUP_CMDS +define $(1)_KCONFIG_FIXUP_CUSTOM_EMBEDDED_ENV_PATH $$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT) $$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)") endef endif +ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) +define $(1)_KCONFIG_FIXUP_BAREBOXENV + $$(call KCONFIG_ENABLE_OPT,CONFIG_BAREBOXENV_TARGET) +endef +endif + +define $(1)_KCONFIG_FIXUP_CMDS + $$($(1)_KCONFIG_FIXUP_CUSTOM_EMBEDDED_ENV_PATH) + $$($(1)_KCONFIG_FIXUP_BAREBOXENV) +endef + define $(1)_BUILD_CMDS $$($(1)_BUILD_BAREBOXENV_CMDS) $$(TARGET_MAKE_ENV) $$(MAKE) $$($(1)_MAKE_FLAGS) -C $$(@D)
@@ -136,7 +140,7 @@ endef ifeq ($$(BR2_TARGET_$(1)_BAREBOXENV),y) define $(1)_INSTALL_TARGET_CMDS - cp $$(@D)/bareboxenv $$(TARGET_DIR)/usr/bin + cp $$(@D)/scripts/bareboxenv-target $$(TARGET_DIR)/usr/bin/bareboxenv endef endif
$ file target/usr/bin/bareboxenv target/usr/bin/bareboxenv: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 5.4.0, not stripped
Regards,
Peter
Quoted 33 lines
Regards,
Yann E. MORIN.Quoted 29 lines
Regards,
PeterQuoted 25 lines
+ $$(call KCONFIG_ENABLE_OPT,CONFIG_BAREBOXENV_TARGET),\ + $$(call KCONFIG_DISABLE_OPT,CONFIG_BAREBOXENV_TARGET)) endef endifAnd then we candrop our custom build command for it...
CONFIG_BAREBOXENV_TARGEThas existed since commitafb03d7a55, in April 2012, so virtually all barebox versions that are recent have it.Regards,
Yann E. MORIN.Quoted 10 lines
$$(@D)/scripts/bareboxenv.c
endef
endif
--
2.24.1_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot