Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] u-boot: Fix pylibfdt generation
@ 2018-07-19 16:31 Joshua Watt
  2018-07-19 20:10 ` Burton, Ross
  2018-07-31 17:19 ` [PATCH v2] " Joshua Watt
  0 siblings, 2 replies; 6+ messages in thread
From: Joshua Watt @ 2018-07-19 16:31 UTC (permalink / raw)
  To: OE-core; +Cc: Marek Vasut, Otavio Salvador

u-boot attempts to build a Python library called pylibfdt. By default,
u-boot would attempt to use the build host's Python interpreter, which
causes numerous problems, not least of which is that it fails if the
host doesn't have the Python development package installed (complaining
about not being able to find Python.h)

Rectify this situation by including the proper build time dependencies
for pylibfdt and passing the proper arguments to make.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/recipes-bsp/u-boot/u-boot.inc        | 1 +
 meta/recipes-bsp/u-boot/u-boot_2018.07.bb | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index c2bcf998402..6b8604ddbec 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -9,6 +9,7 @@ inherit uboot-config uboot-extlinux-config uboot-sign deploy
 
 EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
 EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
+EXTRA_OEMAKE += 'PYTHON=nativepython STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
 
 PACKAGECONFIG ??= "openssl"
 # u-boot will compile its own tools during the build, with specific
diff --git a/meta/recipes-bsp/u-boot/u-boot_2018.07.bb b/meta/recipes-bsp/u-boot/u-boot_2018.07.bb
index 37c21dcaa38..11588a75ed5 100644
--- a/meta/recipes-bsp/u-boot/u-boot_2018.07.bb
+++ b/meta/recipes-bsp/u-boot/u-boot_2018.07.bb
@@ -1,4 +1,4 @@
 require u-boot-common_${PV}.inc
 require u-boot.inc
 
-DEPENDS += "bc-native dtc-native"
+DEPENDS += "bc-native dtc-native swig-native python-native"
-- 
2.17.1



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

* Re: [PATCH] u-boot: Fix pylibfdt generation
  2018-07-19 16:31 [PATCH] u-boot: Fix pylibfdt generation Joshua Watt
@ 2018-07-19 20:10 ` Burton, Ross
  2018-07-19 21:36   ` Joshua Watt
  2018-07-31 17:19 ` [PATCH v2] " Joshua Watt
  1 sibling, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2018-07-19 20:10 UTC (permalink / raw)
  To: Joshua Watt; +Cc: Marek Vasut, Otavio Salvador, OE-core

On 19 July 2018 at 17:31, Joshua Watt <jpewhacker@gmail.com> wrote:
> +EXTRA_OEMAKE += 'PYTHON=nativepython STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
> +DEPENDS += "bc-native dtc-native swig-native python-native"

Instead of setting PYTHON and DEPENDS, you can just inherit pythonnative.

Or ideally, if it can use Python 3, inherit python3native.

Ross


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

* Re: [PATCH] u-boot: Fix pylibfdt generation
  2018-07-19 20:10 ` Burton, Ross
@ 2018-07-19 21:36   ` Joshua Watt
  0 siblings, 0 replies; 6+ messages in thread
From: Joshua Watt @ 2018-07-19 21:36 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Marek Vasut, Otavio Salvador, OE-core

On Thu, 2018-07-19 at 21:10 +0100, Burton, Ross wrote:
> On 19 July 2018 at 17:31, Joshua Watt <jpewhacker@gmail.com> wrote:
> > +EXTRA_OEMAKE += 'PYTHON=nativepython
> > STAGING_INCDIR=${STAGING_INCDIR_NATIVE}
> > STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
> > +DEPENDS += "bc-native dtc-native swig-native python-native"
> 
> Instead of setting PYTHON and DEPENDS, you can just inherit
> pythonnative.

I tried that, but pythonnative.bbclass appears to export the wrong
variables for this case:
 export STAGING_INCDIR
 export STAGING_LIBDIR

u-boot actually needs:

 STAGING_INCDIR=${STAGING_INCDIR_NATIVE}
 STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}

I'm not sure where the disconnect is there?

> 
> Or ideally, if it can use Python 3, inherit python3native.
> 
> Ross


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

* [PATCH v2] u-boot: Fix pylibfdt generation
  2018-07-19 16:31 [PATCH] u-boot: Fix pylibfdt generation Joshua Watt
  2018-07-19 20:10 ` Burton, Ross
@ 2018-07-31 17:19 ` Joshua Watt
  2018-08-02 17:25   ` Joshua Watt
  1 sibling, 1 reply; 6+ messages in thread
From: Joshua Watt @ 2018-07-31 17:19 UTC (permalink / raw)
  To: OE-core; +Cc: Marek Vasut, Otavio Salvador

u-boot attempts to build a Python library called pylibfdt. By default,
u-boot would attempt to use the build host's Python interpreter, which
causes numerous problems, not least of which is that it fails if the
host doesn't have the Python development package installed (complaining
about not being able to find Python.h)

Rectify this situation by including the proper build time dependencies
for pylibfdt and passing the proper arguments to make.

[YOCTO #12867]

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/recipes-bsp/u-boot/u-boot.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index c2bcf998402..95c2f4db14d 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -7,8 +7,11 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit uboot-config uboot-extlinux-config uboot-sign deploy
 
+DEPENDS += "swig-native python-native"
+
 EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
 EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
+EXTRA_OEMAKE += 'PYTHON=nativepython STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
 
 PACKAGECONFIG ??= "openssl"
 # u-boot will compile its own tools during the build, with specific
-- 
2.17.1



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

* Re: [PATCH v2] u-boot: Fix pylibfdt generation
  2018-07-31 17:19 ` [PATCH v2] " Joshua Watt
@ 2018-08-02 17:25   ` Joshua Watt
  2018-08-02 18:40     ` akuster808
  0 siblings, 1 reply; 6+ messages in thread
From: Joshua Watt @ 2018-08-02 17:25 UTC (permalink / raw)
  To: OE-core; +Cc: Marek Vasut, Otavio Salvador

On Tue, 2018-07-31 at 12:19 -0500, Joshua Watt wrote:
> u-boot attempts to build a Python library called pylibfdt. By
> default,
> u-boot would attempt to use the build host's Python interpreter,
> which
> causes numerous problems, not least of which is that it fails if the
> host doesn't have the Python development package installed
> (complaining
> about not being able to find Python.h)
> 
> Rectify this situation by including the proper build time
> dependencies
> for pylibfdt and passing the proper arguments to make.
> 
> [YOCTO #12867]
> 
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
>  meta/recipes-bsp/u-boot/u-boot.inc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-
> boot/u-boot.inc
> index c2bcf998402..95c2f4db14d 100644
> --- a/meta/recipes-bsp/u-boot/u-boot.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
> @@ -7,8 +7,11 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
>  
>  inherit uboot-config uboot-extlinux-config uboot-sign deploy
>  
> +DEPENDS += "swig-native python-native"
> +
>  EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX}
> CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
>  EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS}
> ${BUILD_LDFLAGS}"'
> +EXTRA_OEMAKE += 'PYTHON=nativepython
> STAGING_INCDIR=${STAGING_INCDIR_NATIVE}
> STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
>  
>  PACKAGECONFIG ??= "openssl"
>  # u-boot will compile its own tools during the build, with specific

This was applied to master as 581a2cb7f8dfc88af785d55ef5ce40b0939c465b.

Armin, could you please backport to sumo?

Thanks,
-- 
Joshua Watt <JPEWhacker@gmail.com>


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

* Re: [PATCH v2] u-boot: Fix pylibfdt generation
  2018-08-02 17:25   ` Joshua Watt
@ 2018-08-02 18:40     ` akuster808
  0 siblings, 0 replies; 6+ messages in thread
From: akuster808 @ 2018-08-02 18:40 UTC (permalink / raw)
  To: Joshua Watt, OE-core; +Cc: Marek Vasut, Otavio Salvador



On 08/02/2018 10:25 AM, Joshua Watt wrote:
> On Tue, 2018-07-31 at 12:19 -0500, Joshua Watt wrote:
>> u-boot attempts to build a Python library called pylibfdt. By
>> default,
>> u-boot would attempt to use the build host's Python interpreter,
>> which
>> causes numerous problems, not least of which is that it fails if the
>> host doesn't have the Python development package installed
>> (complaining
>> about not being able to find Python.h)
>>
>> Rectify this situation by including the proper build time
>> dependencies
>> for pylibfdt and passing the proper arguments to make.
>>
>> [YOCTO #12867]
>>
>> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
>> ---
>>  meta/recipes-bsp/u-boot/u-boot.inc | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-
>> boot/u-boot.inc
>> index c2bcf998402..95c2f4db14d 100644
>> --- a/meta/recipes-bsp/u-boot/u-boot.inc
>> +++ b/meta/recipes-bsp/u-boot/u-boot.inc
>> @@ -7,8 +7,11 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
>>  
>>  inherit uboot-config uboot-extlinux-config uboot-sign deploy
>>  
>> +DEPENDS += "swig-native python-native"
>> +
>>  EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX}
>> CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
>>  EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS}
>> ${BUILD_LDFLAGS}"'
>> +EXTRA_OEMAKE += 'PYTHON=nativepython
>> STAGING_INCDIR=${STAGING_INCDIR_NATIVE}
>> STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
>>  
>>  PACKAGECONFIG ??= "openssl"
>>  # u-boot will compile its own tools during the build, with specific
> This was applied to master as 581a2cb7f8dfc88af785d55ef5ce40b0939c465b.
>
> Armin, could you please backport to sumo?
Got it already in my next build series.

thanks,
Armin
>
> Thanks,



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

end of thread, other threads:[~2018-08-02 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19 16:31 [PATCH] u-boot: Fix pylibfdt generation Joshua Watt
2018-07-19 20:10 ` Burton, Ross
2018-07-19 21:36   ` Joshua Watt
2018-07-31 17:19 ` [PATCH v2] " Joshua Watt
2018-08-02 17:25   ` Joshua Watt
2018-08-02 18:40     ` akuster808

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox