Skip to contentSkip to conversation

u-boot-fw-utils: Fix cross and target builds

PATCH Superseded Otavio Salvador 3 participants 5 messages Sep 19, 2017

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 u-boot-fw-utils: Fix cross and target builds

- The environment tools target has change to envtools;
- The HOSTCC variable must be used to set CC for cross;
- The ARCH variable must be set for cross;

---

 meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +3 -3
index c2e8f0fb84..21ab5b3e6d 100644
@@ -5,13 +5,13 @@ DEPENDS = "mtd-utils"
 
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
-EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
+EXTRA_OEMAKE_class-cross = 'ARCH=${ARCH} HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=0'
 
-inherit uboot-config
+inherit kernel-arch uboot-config
 
 do_compile () {
 	oe_runmake ${UBOOT_MACHINE}
-	oe_runmake env
+	oe_runmake envtools
 }
 
 do_install () {
Signature · 1 line
2.14.1
#1 lore raw
Quoted 15 lines · Otavio Salvador

- The environment tools target has change to envtools;
- The HOSTCC variable must be used to set CC for cross;
- The ARCH variable must be set for cross;

---

 meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +0 -0
index c2e8f0fb84..21ab5b3e6d 100644

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 8

Quoted 5 lines
meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +1 -1
@@ -5,13 +5,13 @@ DEPENDS = "mtd-utils"
 
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
-EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
+EXTRA_OEMAKE_class-cross = 'ARCH=${ARCH} HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=0'

Since we're messing with this, U-Boot's build system doesn't take ARCH. It's one of the variables that you pick in Kconfig, not set so that arch/$(ARCH)/Kconfig is sourced. We should drop that. And the changelog doesn't say you're going from V=1 to V=0.

Signature · 1 line
Tom
#2 lore raw

Em 19 de set de 2017 8:26 AM, "Tom Rini" <[email protected]> escreveu:

Review

Quoted 11 lines · Otavio Salvador

- The environment tools target has change to envtools;
- The HOSTCC variable must be used to set CC for cross;
- The ARCH variable must be set for cross;

---

 meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 7

Quoted 7 lines

index c2e8f0fb84..21ab5b3e6d 100644

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +0 -0
@@ -5,13 +5,13 @@ DEPENDS = "mtd-utils"
 
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}

${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 8

Quoted 1 line
meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +0 -1
-EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS}

${LDFLAGS}" V=1'

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 8

Quoted 1 line
meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +1 -0
+EXTRA_OEMAKE_class-cross = 'ARCH=${ARCH} HOSTCC="${CC} ${CFLAGS}

${LDFLAGS}" V=0'

Since we're messing with this, U-Boot's build system doesn't take ARCH. It's one of the variables that you pick in Kconfig, not set so that arch/$(ARCH)/Kconfig is sourced. We should drop that.

You can't. Try dropping it...

And the
changelog doesn't say you're going from V=1 to V=0.

I sent v2 just after.

--
Tom

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 27 lines · Otavio Salvador

Em 19 de set de 2017 8:26 AM, "Tom Rini" <[email protected]> escreveu:

Review

Quoted 11 lines · Otavio Salvador

- The environment tools target has change to envtools;
- The HOSTCC variable must be used to set CC for cross;
- The ARCH variable must be set for cross;

---

 meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 7

Quoted 7 lines

index c2e8f0fb84..21ab5b3e6d 100644

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +0 -0
@@ -5,13 +5,13 @@ DEPENDS = "mtd-utils"
 
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}

${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 8

Quoted 1 line
meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +0 -1
-EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS}

${LDFLAGS}" V=1'

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 8

Quoted 1 line
meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +1 -0
+EXTRA_OEMAKE_class-cross = 'ARCH=${ARCH} HOSTCC="${CC} ${CFLAGS}
Quoted 8 lines

${LDFLAGS}" V=0'

Since we're messing with this, U-Boot's build system doesn't take ARCH. It's one of the variables that you pick in Kconfig, not set so that arch/$(ARCH)/Kconfig is sourced. We should drop that.

You can't. Try dropping it...

I've never ever built U-Boot with ARCH=, so, what's going on in OE land?

Signature · 1 line
Tom
#4 lore raw
Quoted 30 lines · Tom Rini
Quoted 29 lines · Otavio Salvador

Em 19 de set de 2017 8:26 AM, "Tom Rini" <[email protected]> escreveu:

Review

Quoted 11 lines · Otavio Salvador

- The environment tools target has change to envtools;
- The HOSTCC variable must be used to set CC for cross;
- The ARCH variable must be set for cross;

---

 meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 7

Quoted 7 lines

index c2e8f0fb84..21ab5b3e6d 100644

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +0 -0
@@ -5,13 +5,13 @@ DEPENDS = "mtd-utils"
 
 INSANE_SKIP_${PN} = "already-stripped"
 EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}

${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 8

Quoted 1 line
meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +0 -1
-EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS}

${LDFLAGS}" V=1'

meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb DEPENDS = "mtd-utils" · line 8

Quoted 1 line
meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.09.bb +1 -0
+EXTRA_OEMAKE_class-cross = 'ARCH=${ARCH} HOSTCC="${CC} ${CFLAGS}

${LDFLAGS}" V=0'

Quoted 8 lines
Quoted 6 lines

Since we're messing with this, U-Boot's build system doesn't take ARCH. It's one of the variables that you pick in Kconfig, not set so that arch/$(ARCH)/Kconfig is sourced. We should drop that.

You can't. Try dropping it...

I've never ever built U-Boot with ARCH=, so, what's going on in OE land?

Drop works; it was set wrong. v3 is on the way !!! Thanks to spot it ...

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750