mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* bareboxenv-target
@ 2020-10-28 11:09 Barbier, Renaud
  2020-11-02 13:13 ` bareboxenv-target Roland Hieber
  2021-03-23 12:33 ` bareboxenv-target Ahmad Fatoum
  0 siblings, 2 replies; 14+ messages in thread
From: Barbier, Renaud @ 2020-10-28 11:09 UTC (permalink / raw)
  To: barebox

I am building bareboxenv-target for a  cortex-A9 board (not present upstream) with gcc 9.3.0 and got this error:

arm-oe-linux-gnueabi-gcc -Wp,-MMD,scripts/.bareboxenv-target.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89  -I /mnt/projects/all/openware-core/home/renaud/sandbox/bootloader/barebox-rebase/scripts/include      -o scripts/bareboxenv-target scripts/bareboxenv-target.c
In file included from scripts/bareboxenv-target.c:1:
scripts/bareboxenv.c:17:10: fatal error: stdio.h: No such file or directory
   17 | #include <stdio.h>
      |          ^~~~~~~~~


It looks like sysroot is missing as when I add to scripts/Makefile:
ifdef SDKTARGETSYSROOT
    userccflags += --sysroot=$(SDKTARGETSYSROOT)
endif

It builds.

Not much came out from search on google but one thread that refers to this problem when building with Yocto.

Could it it be related to  how our toolchain got build?

Cheers,
Renaud

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: bareboxenv-target
  2020-10-28 11:09 bareboxenv-target Barbier, Renaud
@ 2020-11-02 13:13 ` Roland Hieber
  2020-11-04 10:05   ` bareboxenv-target Barbier, Renaud
                     ` (2 more replies)
  2021-03-23 12:33 ` bareboxenv-target Ahmad Fatoum
  1 sibling, 3 replies; 14+ messages in thread
From: Roland Hieber @ 2020-11-02 13:13 UTC (permalink / raw)
  To: Barbier, Renaud; +Cc: barebox

On Wed, Oct 28, 2020 at 11:09:18AM +0000, Barbier, Renaud wrote:
> I am building bareboxenv-target for a  cortex-A9 board (not present upstream) with gcc 9.3.0 and got this error:
> 
> arm-oe-linux-gnueabi-gcc -Wp,-MMD,scripts/.bareboxenv-target.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89  -I /mnt/projects/all/openware-core/home/renaud/sandbox/bootloader/barebox-rebase/scripts/include      -o scripts/bareboxenv-target scripts/bareboxenv-target.c
> In file included from scripts/bareboxenv-target.c:1:
> scripts/bareboxenv.c:17:10: fatal error: stdio.h: No such file or directory
>    17 | #include <stdio.h>
>       |          ^~~~~~~~~
> 
> 
> It looks like sysroot is missing as when I add to scripts/Makefile:
> ifdef SDKTARGETSYSROOT
>     userccflags += --sysroot=$(SDKTARGETSYSROOT)
> endif
> 
> It builds.
> 
> Not much came out from search on google but one thread that refers to this problem when building with Yocto.
> 
> Could it it be related to  how our toolchain got build?

Which toolchain were you using? IIRC, the Yocto SDK builds don't set a
valid SYSROOT during the build, and patch it in through a compile option
when calling the compiler.

 - Roland

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* RE: bareboxenv-target
  2020-11-02 13:13 ` bareboxenv-target Roland Hieber
@ 2020-11-04 10:05   ` Barbier, Renaud
  2020-11-06  9:55   ` bareboxenv-target Barbier, Renaud
  2020-11-06 12:06   ` bareboxenv-target Barbier, Renaud
  2 siblings, 0 replies; 14+ messages in thread
From: Barbier, Renaud @ 2020-11-04 10:05 UTC (permalink / raw)
  To: Roland Hieber; +Cc: barebox


> Which toolchain were you using? IIRC, the Yocto SDK builds don't set a
> valid SYSROOT during the build, and patch it in through a compile option
> when calling the compiler.
[Barbier, Renaud] 
The toolchain is built from our Yocto (dunfell-23.0.0)
> 
>  - Roland
> 
> --
> Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
> Steuerwalder Str. 21                     |
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> w.pengutronix.de%2F&amp;data=04%7C01%7Crenaud.barbier%40abaco.co
> m%7Caf3bfcf353684c3ae9ae08d87f312089%7Ce6f27451899d4d0db8fa88baaf
> a551a7%7C0%7C0%7C637399196270355233%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
> D%7C2000&amp;sdata=%2BdontmtYoJ%2BsS1%2FkGternIF%2FOdHe1h2QaV
> hQPE%2BbNeY%3D&amp;reserved=0 |
> 31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* RE: bareboxenv-target
  2020-11-02 13:13 ` bareboxenv-target Roland Hieber
  2020-11-04 10:05   ` bareboxenv-target Barbier, Renaud
@ 2020-11-06  9:55   ` Barbier, Renaud
  2020-11-06 12:25     ` bareboxenv-target Roland Hieber
  2020-11-06 12:06   ` bareboxenv-target Barbier, Renaud
  2 siblings, 1 reply; 14+ messages in thread
From: Barbier, Renaud @ 2020-11-06  9:55 UTC (permalink / raw)
  To: Roland Hieber; +Cc: barebox

We derived out recipe for barebox from the barebox layer.
We may have broken something in there.

> -----Original Message-----
> From: Roland Hieber [mailto:rhi@pengutronix.de]
> Sent: 02 November 2020 13:14
> To: Barbier, Renaud <renaud.barbier@abaco.com>
> Cc: barebox@lists.infradead.org
> Subject: Re: bareboxenv-target
> 
> 
> 
> [**EXTERNAL SOURCE**]:Please verify the source before clicking link or
> opening attachment.
> 
> On Wed, Oct 28, 2020 at 11:09:18AM +0000, Barbier, Renaud wrote:
> > I am building bareboxenv-target for a  cortex-A9 board (not present
> upstream) with gcc 9.3.0 and got this error:
> >
> > arm-oe-linux-gnueabi-gcc -Wp,-MMD,scripts/.bareboxenv-target.d -Wall -
> Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -
> std=gnu89  -I /mnt/projects/all/openware-
> core/home/renaud/sandbox/bootloader/barebox-rebase/scripts/include
> -o scripts/bareboxenv-target scripts/bareboxenv-target.c
> > In file included from scripts/bareboxenv-target.c:1:
> > scripts/bareboxenv.c:17:10: fatal error: stdio.h: No such file or directory
> >    17 | #include <stdio.h>
> >       |          ^~~~~~~~~
> >
> >
> > It looks like sysroot is missing as when I add to scripts/Makefile:
> > ifdef SDKTARGETSYSROOT
> >     userccflags += --sysroot=$(SDKTARGETSYSROOT)
> > endif
> >
> > It builds.
> >
> > Not much came out from search on google but one thread that refers to
> this problem when building with Yocto.
> >
> > Could it it be related to  how our toolchain got build?
> 
> Which toolchain were you using? IIRC, the Yocto SDK builds don't set a
> valid SYSROOT during the build, and patch it in through a compile option
> when calling the compiler.
> 
>  - Roland
> 
> --
> Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
> Steuerwalder Str. 21                     |
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> w.pengutronix.de%2F&amp;data=04%7C01%7Crenaud.barbier%40abaco.co
> m%7Caf3bfcf353684c3ae9ae08d87f312089%7Ce6f27451899d4d0db8fa88baaf
> a551a7%7C0%7C0%7C637399196270355233%7CUnknown%7CTWFpbGZsb3d8
> eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
> D%7C2000&amp;sdata=%2BdontmtYoJ%2BsS1%2FkGternIF%2FOdHe1h2QaV
> hQPE%2BbNeY%3D&amp;reserved=0 |
> 31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* RE: bareboxenv-target
  2020-11-02 13:13 ` bareboxenv-target Roland Hieber
  2020-11-04 10:05   ` bareboxenv-target Barbier, Renaud
  2020-11-06  9:55   ` bareboxenv-target Barbier, Renaud
@ 2020-11-06 12:06   ` Barbier, Renaud
  2020-11-06 12:31     ` bareboxenv-target Roland Hieber
  2 siblings, 1 reply; 14+ messages in thread
From: Barbier, Renaud @ 2020-11-06 12:06 UTC (permalink / raw)
  To: Roland Hieber; +Cc: barebox

> >
> >
> > It looks like sysroot is missing as when I add to scripts/Makefile:
> > ifdef SDKTARGETSYSROOT
> >     userccflags += --sysroot=$(SDKTARGETSYSROOT)
> > endif
> >
> > It builds.
> >
> > Not much came out from search on google but one thread that refers to
> this problem when building with Yocto.

In barebox.inc of the Yocto recipe, I replaced
export TARGETCFLAGS="${TARGET_LDFLAGS}${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
with
export userccflags="${TARGET_LDFLAGS}${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"

It builds.

Would that  be the way to pass sysroot to scripts/Makefile?

Cheers,
Renaud
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: bareboxenv-target
  2020-11-06  9:55   ` bareboxenv-target Barbier, Renaud
@ 2020-11-06 12:25     ` Roland Hieber
  2020-11-06 13:12       ` bareboxenv-target Barbier, Renaud
  0 siblings, 1 reply; 14+ messages in thread
From: Roland Hieber @ 2020-11-06 12:25 UTC (permalink / raw)
  To: Barbier, Renaud; +Cc: barebox

On Fri, Nov 06, 2020 at 09:55:18AM +0000, Barbier, Renaud wrote:
> We derived out recipe for barebox from the barebox layer.

Which layer is "the barebox layer"?

 - Roland

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: bareboxenv-target
  2020-11-06 12:06   ` bareboxenv-target Barbier, Renaud
@ 2020-11-06 12:31     ` Roland Hieber
  0 siblings, 0 replies; 14+ messages in thread
From: Roland Hieber @ 2020-11-06 12:31 UTC (permalink / raw)
  To: Barbier, Renaud; +Cc: barebox

On Fri, Nov 06, 2020 at 12:06:08PM +0000, Barbier, Renaud wrote:
> > >
> > >
> > > It looks like sysroot is missing as when I add to scripts/Makefile:
> > > ifdef SDKTARGETSYSROOT
> > >     userccflags += --sysroot=$(SDKTARGETSYSROOT)
> > > endif
> > >
> > > It builds.
> > >
> > > Not much came out from search on google but one thread that refers to
> > this problem when building with Yocto.
> 
> In barebox.inc of the Yocto recipe, I replaced
> export TARGETCFLAGS="${TARGET_LDFLAGS}${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> with
> export userccflags="${TARGET_LDFLAGS}${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> 
> It builds.
> 
> Would that  be the way to pass sysroot to scripts/Makefile?

I think someone more knowledgeable about Yocto/OE needs to answer this,
I don't know if anyone is here…

 - Roland

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* RE: bareboxenv-target
  2020-11-06 12:25     ` bareboxenv-target Roland Hieber
@ 2020-11-06 13:12       ` Barbier, Renaud
  0 siblings, 0 replies; 14+ messages in thread
From: Barbier, Renaud @ 2020-11-06 13:12 UTC (permalink / raw)
  To: Roland Hieber; +Cc: barebox



> -----Original Message-----
> From: Roland Hieber [mailto:rhi@pengutronix.de]
> Sent: 06 November 2020 12:25
> To: Barbier, Renaud <renaud.barbier@abaco.com>
> Cc: barebox@lists.infradead.org
> Subject: Re: bareboxenv-target
> 
> 
> 
> [**EXTERNAL SOURCE**]:Please verify the source before clicking link or
> opening attachment.
> 
> On Fri, Nov 06, 2020 at 09:55:18AM +0000, Barbier, Renaud wrote:
> > We derived out recipe for barebox from the barebox layer.
> 
> Which layer is "the barebox layer"?
meta-ptx
https://git.pengutronix.de/cgit/meta-ptx/tree/recipes-bsp/barebox/barebox.inc

> 
>  - Roland
> 
> --
> Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
> Steuerwalder Str. 21                     |
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> w.pengutronix.de%2F&amp;data=04%7C01%7Crenaud.barbier%40abaco.co
> m%7Cbdb306aa2c3c408ae3db08d8824f019a%7Ce6f27451899d4d0db8fa88baa
> fa551a7%7C0%7C0%7C637402623132252846%7CUnknown%7CTWFpbGZsb3d
> 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
> 3D%7C1000&amp;sdata=YjiJX5FHBtobL16tN2R2C%2BJGgCJ3cxCaxIqI2ZymXY4
> %3D&amp;reserved=0 |
> 31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: bareboxenv-target
  2020-10-28 11:09 bareboxenv-target Barbier, Renaud
  2020-11-02 13:13 ` bareboxenv-target Roland Hieber
@ 2021-03-23 12:33 ` Ahmad Fatoum
  2021-03-23 14:44   ` bareboxenv-target Barbier, Renaud
  1 sibling, 1 reply; 14+ messages in thread
From: Ahmad Fatoum @ 2021-03-23 12:33 UTC (permalink / raw)
  To: Barbier, Renaud, barebox, Roland Hieber

Hello Renaud,

On 28.10.20 12:09, Barbier, Renaud wrote:
> I am building bareboxenv-target for a  cortex-A9 board (not present upstream) with gcc 9.3.0 and got this error:
> 
> arm-oe-linux-gnueabi-gcc -Wp,-MMD,scripts/.bareboxenv-target.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89  -I /mnt/projects/all/openware-core/home/renaud/sandbox/bootloader/barebox-rebase/scripts/include      -o scripts/bareboxenv-target scripts/bareboxenv-target.c
> In file included from scripts/bareboxenv-target.c:1:
> scripts/bareboxenv.c:17:10: fatal error: stdio.h: No such file or directory
>    17 | #include <stdio.h>
>       |          ^~~~~~~~~
> 
> 
> It looks like sysroot is missing as when I add to scripts/Makefile:
> ifdef SDKTARGETSYSROOT
>     userccflags += --sysroot=$(SDKTARGETSYSROOT)
> endif
> 
> It builds.
> 
> Not much came out from search on google but one thread that refers to this problem when building with Yocto.
> 
> Could it it be related to  how our toolchain got build?

Just ran into the same issue. Cause is as Roland describes the lack of --sysroot
as default and that it comes in via $CC, which Kbuild doesn't expect.

I guess this would break building kernel host tools too or how do they solve it?

Cheers,
Ahmad

> 
> Cheers,
> Renaud
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* RE: bareboxenv-target
  2021-03-23 12:33 ` bareboxenv-target Ahmad Fatoum
@ 2021-03-23 14:44   ` Barbier, Renaud
  2021-03-23 15:47     ` bareboxenv-target Ahmad Fatoum
  0 siblings, 1 reply; 14+ messages in thread
From: Barbier, Renaud @ 2021-03-23 14:44 UTC (permalink / raw)
  To: Ahmad Fatoum, barebox, Roland Hieber



> -----Original Message-----
> From: Ahmad Fatoum [mailto:a.fatoum@pengutronix.de]
> Sent: 23 March 2021 12:34
> To: Barbier, Renaud <renaud.barbier@abaco.com>;
> barebox@lists.infradead.org; Roland Hieber <rhi@pengutronix.de>
> Subject: Re: bareboxenv-target
> 
> 
> 
> [**EXTERNAL SOURCE**]:Please verify the source before clicking link or
> opening attachment.
> 
> Hello Renaud,
> 
> On 28.10.20 12:09, Barbier, Renaud wrote:
> > I am building bareboxenv-target for a  cortex-A9 board (not present
> upstream) with gcc 9.3.0 and got this error:
> >
> > arm-oe-linux-gnueabi-gcc -Wp,-MMD,scripts/.bareboxenv-target.d -Wall -
> Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
> -I /mnt/projects/all/openware-
> core/home/renaud/sandbox/bootloader/barebox-rebase/scripts/include      -o
> scripts/bareboxenv-target scripts/bareboxenv-target.c
> > In file included from scripts/bareboxenv-target.c:1:
> > scripts/bareboxenv.c:17:10: fatal error: stdio.h: No such file or directory
> >    17 | #include <stdio.h>
> >       |          ^~~~~~~~~
> >
> >
> > It looks like sysroot is missing as when I add to scripts/Makefile:
> > ifdef SDKTARGETSYSROOT
> >     userccflags += --sysroot=$(SDKTARGETSYSROOT)
> > endif
> >
> > It builds.
> >
> > Not much came out from search on google but one thread that refers to this
> problem when building with Yocto.
> >
> > Could it it be related to  how our toolchain got build?
> 
> Just ran into the same issue. Cause is as Roland describes the lack of --sysroot
> as default and that it comes in via $CC, which Kbuild doesn't expect.
> 
> I guess this would break building kernel host tools too or how do they solve it?
> > 
> > Not working either:
> >  [renaud@ediowsrv01]$ make tools/leds
> >   DESCEND  leds
> > arm-oe-linux-gnueabi-gcc -Wall -Wextra -g -I../../include/uapi -o uledmon uledmon.c
> > uledmon.c:14:10: fatal error: fcntl.h: No such file or directory
> >    14 | #include <fcntl.h>
> >       |          ^~~~~~~~~

> 
> Cheers,
> Ahmad


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* Re: bareboxenv-target
  2021-03-23 14:44   ` bareboxenv-target Barbier, Renaud
@ 2021-03-23 15:47     ` Ahmad Fatoum
  2021-05-31 17:10       ` bareboxenv-target Ahmad Fatoum
  0 siblings, 1 reply; 14+ messages in thread
From: Ahmad Fatoum @ 2021-03-23 15:47 UTC (permalink / raw)
  To: Barbier, Renaud, barebox, Roland Hieber

Hello Renaud,

On 23.03.21 15:44, Barbier, Renaud wrote:
>>> Could it it be related to  how our toolchain got build?
>>
>> Just ran into the same issue. Cause is as Roland describes the lack of --sysroot
>> as default and that it comes in via $CC, which Kbuild doesn't expect.
>>
>> I guess this would break building kernel host tools too or how do they solve it?
>>>
>>> Not working either:
>>>  [renaud@ediowsrv01]$ make tools/leds
>>>   DESCEND  leds
>>> arm-oe-linux-gnueabi-gcc -Wall -Wextra -g -I../../include/uapi -o uledmon uledmon.c
>>> uledmon.c:14:10: fatal error: fcntl.h: No such file or directory
>>>    14 | #include <fcntl.h>
>>>       |          ^~~~~~~~~

Thanks for trying it out. Well, this is a general incompatibility of the SDK's environment
setup script with Kbuild then. I am wondering why they decided on not having a default
--sysroot. Raising the issue upstream could shed some light on this and perhaps result
in a fix. I don't think there is anything to fix here at the barebox side.

FTR: we use meta-ptx extensively and AFAIK we haven't run into this issue. It only
popped up when using the SDK build, so bitbake seems to do the right thing in that case.

Cheers,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* Re: bareboxenv-target
  2021-03-23 15:47     ` bareboxenv-target Ahmad Fatoum
@ 2021-05-31 17:10       ` Ahmad Fatoum
  0 siblings, 0 replies; 14+ messages in thread
From: Ahmad Fatoum @ 2021-05-31 17:10 UTC (permalink / raw)
  To: Barbier, Renaud, barebox, Roland Hieber

On 23.03.21 16:47, Ahmad Fatoum wrote:
> Hello Renaud,
> 
> On 23.03.21 15:44, Barbier, Renaud wrote:
>>>> Could it it be related to  how our toolchain got build?
>>>
>>> Just ran into the same issue. Cause is as Roland describes the lack of --sysroot
>>> as default and that it comes in via $CC, which Kbuild doesn't expect.
>>>
>>> I guess this would break building kernel host tools too or how do they solve it?
>>>>
>>>> Not working either:
>>>>  [renaud@ediowsrv01]$ make tools/leds
>>>>   DESCEND  leds
>>>> arm-oe-linux-gnueabi-gcc -Wall -Wextra -g -I../../include/uapi -o uledmon uledmon.c
>>>> uledmon.c:14:10: fatal error: fcntl.h: No such file or directory
>>>>    14 | #include <fcntl.h>
>>>>       |          ^~~~~~~~~
> 
> Thanks for trying it out. Well, this is a general incompatibility of the SDK's environment
> setup script with Kbuild then. I am wondering why they decided on not having a default
> --sysroot. Raising the issue upstream could shed some light on this and perhaps result
> in a fix. I don't think there is anything to fix here at the barebox side.
> 
> FTR: we use meta-ptx extensively and AFAIK we haven't run into this issue. It only
> popped up when using the SDK build, so bitbake seems to do the right thing in that case.

FTR: There's a pending meta-ptx fix here:
https://github.com/pengutronix/meta-ptx/pull/74

The solution for now seems to be to:

export TARGETCFLAGS="${TARGET_LDFLAGS}${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
export userccflags="${TARGETCFLAGS}"

It's yet unclear whether userccflags is meant to be used this way, but it works
for barebox.

Cheers,
Ahmad

> 
> Cheers,
> Ahmad
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* Re: bareboxenv-target
  2014-11-14 18:44 bareboxenv-target Balasa, Bogdan
@ 2014-11-15 17:54 ` Sascha Hauer
  0 siblings, 0 replies; 14+ messages in thread
From: Sascha Hauer @ 2014-11-15 17:54 UTC (permalink / raw)
  To: Balasa, Bogdan; +Cc: barebox

On Fri, Nov 14, 2014 at 06:44:30PM +0000, Balasa, Bogdan wrote:
> Hi,
> 
> I'm using barebox 2014.11.0, kernel 3.14 on phyFlex imx6 and when loading barebox environment from userspace I get a wrong magic:
> -------
> ./bareboxenv-target -l /mnt/bbox /dev/mtd1
> envfs: wrong magic
> -------
> root@imx6q-pbab01:~# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00400000 00020000 "barebox"
> mtd1: 00020000 00020000 "barebox-environment"
> mtd2: 00800000 00020000 "kernel"
> mtd3: 3f3e0000 00020000 "root"

This seems to be your Nand flash, so if you have your environment in NOR
FLash,

> mtd4: 01000000 00010000 "spi2.0"

it should be here. However, the NOR Flash is not partitioned, so the
partitions get lost somewhere between barebox and the kernel.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* bareboxenv-target
@ 2014-11-14 18:44 Balasa, Bogdan
  2014-11-15 17:54 ` bareboxenv-target Sascha Hauer
  0 siblings, 1 reply; 14+ messages in thread
From: Balasa, Bogdan @ 2014-11-14 18:44 UTC (permalink / raw)
  To: barebox

Hi,

I'm using barebox 2014.11.0, kernel 3.14 on phyFlex imx6 and when loading barebox environment from userspace I get a wrong magic:
-------
./bareboxenv-target -l /mnt/bbox /dev/mtd1
envfs: wrong magic
-------
root@imx6q-pbab01:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00400000 00020000 "barebox"
mtd1: 00020000 00020000 "barebox-environment"
mtd2: 00800000 00020000 "kernel"
mtd3: 3f3e0000 00020000 "root"
mtd4: 01000000 00010000 "spi2.0"
-----

I have the barebox environment in NOR flash and I think is good since I can modify it and save it with the barebox menu.


Thank you,
Bogdan

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2021-05-31 17:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 11:09 bareboxenv-target Barbier, Renaud
2020-11-02 13:13 ` bareboxenv-target Roland Hieber
2020-11-04 10:05   ` bareboxenv-target Barbier, Renaud
2020-11-06  9:55   ` bareboxenv-target Barbier, Renaud
2020-11-06 12:25     ` bareboxenv-target Roland Hieber
2020-11-06 13:12       ` bareboxenv-target Barbier, Renaud
2020-11-06 12:06   ` bareboxenv-target Barbier, Renaud
2020-11-06 12:31     ` bareboxenv-target Roland Hieber
2021-03-23 12:33 ` bareboxenv-target Ahmad Fatoum
2021-03-23 14:44   ` bareboxenv-target Barbier, Renaud
2021-03-23 15:47     ` bareboxenv-target Ahmad Fatoum
2021-05-31 17:10       ` bareboxenv-target Ahmad Fatoum
  -- strict thread matches above, loose matches on Subject: below --
2014-11-14 18:44 bareboxenv-target Balasa, Bogdan
2014-11-15 17:54 ` bareboxenv-target Sascha Hauer

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git