boot/uboot: Set MAKE_ENV for kconfig build system
PATCH 1/1 boot/uboot: Set MAKE_ENV for kconfig build system
U-Boot fails to build in gitlab CI context because the kconfig-package build stage is unable to find bison for flex even though they are installed in BR_BINARIES_DIR.
To fix this, set UBOOT_MAKE_ENV so that UBOOT_KCONFIG_MAKE uses the correct PATH.
--- boot/uboot/uboot.mk | 3 +++ 1 file changed, 3 insertions(+)
boot/uboot/uboot.mk +3 -0
@@ -449,6 +449,9 @@ endif # BR2_TARGET_UBOOT && BR_BUILDING ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) $(eval $(generic-package)) else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +UBOOT_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + BR_BINARIES_DIR=$(BINARIES_DIR) UBOOT_KCONFIG_DEPENDENCIES = \ $(BR2_BISON_HOST_DEPENDENCY) \ $(BR2_FLEX_HOST_DEPENDENCY)
Signature · 1 line
2.11.0
PATCH 1/1 boot/uboot: Set MAKE_ENV for kconfig build system
Hi Thomas,
Quoted 17 lines · Thomas Preston
U-Boot fails to build in gitlab CI context because the kconfig-package build stage is unable to find bison for flex even though they are installed in
BR_BINARIES_DIR.To fix this, set
UBOOT_MAKE_ENVso thatUBOOT_KCONFIG_MAKEuses the correct PATH.Signed-off-by Thomas Preston <[email protected]>--- boot/uboot/uboot.mk | 3 +++ 1 file changed, 3 insertions(+)boot/uboot/uboot.mk +0
-0
boot/uboot/uboot.mk endif # BR2_TARGET_UBOOT && BR_BUILDING · line 454
Quoted 6 lines
boot/uboot/uboot.mk +3
-0@@ -449,6 +449,9 @@ endif # BR2_TARGET_UBOOT && BR_BUILDING ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) $(eval $(generic-package)) else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +UBOOT_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + BR_BINARIES_DIR=$(BINARIES_DIR)
I can't find any reference to BR_BINARIES_DIR in U-Boot related Buildroot makefile code, or in current U-Boot source tree. How is this going to work?
baruch
Quoted 3 lines
boot/uboot/uboot.mk +0
-0UBOOT_KCONFIG_DEPENDENCIES = \ $(BR2_BISON_HOST_DEPENDENCY) \ $(BR2_FLEX_HOST_DEPENDENCY)
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/1 boot/uboot: Set MAKE_ENV for kconfig build system
Quoted 15 lines · Baruch Siach
Hi Thomas,
Quoted 12 lines · Thomas Preston
U-Boot fails to build in gitlab CI context because the kconfig-package build stage is unable to find bison for flex even though they are installed in
BR_BINARIES_DIR.To fix this, set
UBOOT_MAKE_ENVso thatUBOOT_KCONFIG_MAKEuses the correct PATH.Signed-off-by Thomas Preston <[email protected]>--- boot/uboot/uboot.mk | 3 +++ 1 file changed, 3 insertions(+)
Quoted 15 lines
boot/uboot/uboot.mk endif # BR2_TARGET_UBOOT && BR_BUILDING · line 454
Quoted 11 lines
boot/uboot/uboot.mk +3
-0@@ -449,6 +449,9 @@ endif # BR2_TARGET_UBOOT && BR_BUILDING ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) $(eval $(generic-package)) else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +UBOOT_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + BR_BINARIES_DIR=$(BINARIES_DIR)I can't find any reference to
BR_BINARIES_DIRin U-Boot related Buildroot makefile code, or in current U-Boot source tree. How is this going to work?
Ah, it is TARGET_MAKE_ENV which provides the PATH fix, BR_BINARIES_DIR was added by mistake (I copied it from the linux/linux.mk). Should I resubmit?
You should be able to reproduce the error with:
$ docker run -u1002 -v $PWD:/home/br-user -it buildroot/base make V=1 uboot ... bison -oscripts/kconfig/zconf.tab.c -t -l scripts/kconfig/zconf.y /bin/sh: 1: bison: not found scripts/Makefile.lib:228: recipe for target 'scripts/kconfig/zconf.tab.c' failed ...
The above patch adds PATH="/home/br-user/output/host/bin, which fixes the error.