All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] boot/uboot: Set MAKE_ENV for kconfig build system
@ 2018-09-05 12:22 Thomas Preston
  2018-09-05 20:30 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Preston @ 2018-09-05 12:22 UTC (permalink / raw)
  To: buildroot

U-Boot fails to build in a GitLab CI context because the kconfig-package
build stage is unable to find bison or flex even though they are
installed in HOST_DIR.

To fix this, set UBOOT_MAKE_ENV so that UBOOT_KCONFIG_MAKE uses the
correct PATH.

Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
---
 boot/uboot/uboot.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index bddafe234d..a19cb72458 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -449,6 +449,7 @@ 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)
 UBOOT_KCONFIG_DEPENDENCIES = \
 	$(BR2_BISON_HOST_DEPENDENCY) \
 	$(BR2_FLEX_HOST_DEPENDENCY)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] boot/uboot: Set MAKE_ENV for kconfig build system
  2018-09-05 12:22 [Buildroot] [PATCH 1/1] boot/uboot: Set MAKE_ENV for kconfig build system Thomas Preston
@ 2018-09-05 20:30 ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2018-09-05 20:30 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed,  5 Sep 2018 13:22:36 +0100, Thomas Preston wrote:
> U-Boot fails to build in a GitLab CI context because the kconfig-package
> build stage is unable to find bison or flex even though they are
> installed in HOST_DIR.
> 
> To fix this, set UBOOT_MAKE_ENV so that UBOOT_KCONFIG_MAKE uses the
> correct PATH.
> 
> Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
> ---
>  boot/uboot/uboot.mk | 1 +
>  1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] boot/uboot: Set MAKE_ENV for kconfig build system
  2018-09-05 10:42 ` Baruch Siach
@ 2018-09-05 11:03   ` Thomas Preston
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Preston @ 2018-09-05 11:03 UTC (permalink / raw)
  To: buildroot

On 05/09/18 11:42, Baruch Siach wrote:
> Hi Thomas,
> 
> On Wed, Sep 05, 2018 at 10:49:40AM +0100, Thomas Preston wrote:
>> 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.
>>
>> Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
>> ---
>>   boot/uboot/uboot.mk | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
>> index bddafe234d..36428e65fe 100644
>> --- a/boot/uboot/uboot.mk
>> +++ b/boot/uboot/uboot.mk
>> @@ -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?
> 

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] boot/uboot: Set MAKE_ENV for kconfig build system
  2018-09-05  9:49 Thomas Preston
@ 2018-09-05 10:42 ` Baruch Siach
  2018-09-05 11:03   ` Thomas Preston
  0 siblings, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2018-09-05 10:42 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Wed, Sep 05, 2018 at 10:49:40AM +0100, Thomas Preston wrote:
> 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.
> 
> Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
> ---
>  boot/uboot/uboot.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index bddafe234d..36428e65fe 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -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

>  UBOOT_KCONFIG_DEPENDENCIES = \
>  	$(BR2_BISON_HOST_DEPENDENCY) \
>  	$(BR2_FLEX_HOST_DEPENDENCY)

-- 
     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 -

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] boot/uboot: Set MAKE_ENV for kconfig build system
@ 2018-09-05  9:49 Thomas Preston
  2018-09-05 10:42 ` Baruch Siach
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Preston @ 2018-09-05  9:49 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
---
 boot/uboot/uboot.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index bddafe234d..36428e65fe 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -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)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-05 20:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 12:22 [Buildroot] [PATCH 1/1] boot/uboot: Set MAKE_ENV for kconfig build system Thomas Preston
2018-09-05 20:30 ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2018-09-05  9:49 Thomas Preston
2018-09-05 10:42 ` Baruch Siach
2018-09-05 11:03   ` Thomas Preston

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.