meta-freescale.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* No u-boot-fslc-fw-utils recipe for Dunfell?
@ 2021-01-27 19:37 Brian Hutchinson
  2021-01-27 19:42 ` [meta-freescale] " Otavio Salvador
  2021-01-27 19:43 ` Chris Dimich
  0 siblings, 2 replies; 14+ messages in thread
From: Brian Hutchinson @ 2021-01-27 19:37 UTC (permalink / raw)
  To: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

Hi,

Was needing fw_printenv/fw_setenv in Dunfell and don't see the fw-utils
package anywhere.  I see one in Sumo release.

Am I missing something?

Regards,

Brian

[-- Attachment #2: Type: text/html, Size: 333 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
  2021-01-27 19:37 No u-boot-fslc-fw-utils recipe for Dunfell? Brian Hutchinson
@ 2021-01-27 19:42 ` Otavio Salvador
  2021-01-27 19:57   ` Brian Hutchinson
  2021-01-27 19:43 ` Chris Dimich
  1 sibling, 1 reply; 14+ messages in thread
From: Otavio Salvador @ 2021-01-27 19:42 UTC (permalink / raw)
  To: Brian Hutchinson; +Cc: meta-freescale

Hello,

Em qua., 27 de jan. de 2021 às 16:37, Brian Hutchinson
<b.hutchman@gmail.com> escreveu:
> Was needing fw_printenv/fw_setenv in Dunfell and don't see the fw-utils package anywhere.  I see one in Sumo release.
>
> Am I missing something?

The libubootenv is now the one which provide those tools.

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

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
  2021-01-27 19:37 No u-boot-fslc-fw-utils recipe for Dunfell? Brian Hutchinson
  2021-01-27 19:42 ` [meta-freescale] " Otavio Salvador
@ 2021-01-27 19:43 ` Chris Dimich
  1 sibling, 0 replies; 14+ messages in thread
From: Chris Dimich @ 2021-01-27 19:43 UTC (permalink / raw)
  To: Brian Hutchinson; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

Hi Brian,

libubootenv is the replacement for u-boot-fw-utils

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-bsp/u-boot/libubootenv_0.2.bb?id=cfdaad287b8bfe6909acc0257d120c58abe8ae5e&h=master

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=cfdaad287b8bfe6909acc0257d120c58abe8ae5e

Thanks,

Chris Dimich
Boundary Devices, LLC
www.boundarydevices.com
7 Orchard Road, Suite 102*|*Lake Forest, CA 92630



On Wed, Jan 27, 2021 at 11:37 AM Brian Hutchinson <b.hutchman@gmail.com>
wrote:

> Hi,
>
> Was needing fw_printenv/fw_setenv in Dunfell and don't see the fw-utils
> package anywhere.  I see one in Sumo release.
>
> Am I missing something?
>
> Regards,
>
> Brian
>
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 2328 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
  2021-01-27 19:42 ` [meta-freescale] " Otavio Salvador
@ 2021-01-27 19:57   ` Brian Hutchinson
  2021-01-27 20:10     ` Brian Hutchinson
  0 siblings, 1 reply; 14+ messages in thread
From: Brian Hutchinson @ 2021-01-27 19:57 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 727 bytes --]

On Wed, Jan 27, 2021 at 2:42 PM Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> Hello,
>
> Em qua., 27 de jan. de 2021 às 16:37, Brian Hutchinson
> <b.hutchman@gmail.com> escreveu:
> > Was needing fw_printenv/fw_setenv in Dunfell and don't see the fw-utils
> package anywhere.  I see one in Sumo release.
> >
> > Am I missing something?
>
> The libubootenv is now the one which provide those tools.
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
>


Ahhh, I guess I was missing something!!!  Thanks for "updating" me!

Regards,

Brian

[-- Attachment #2: Type: text/html, Size: 1427 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
  2021-01-27 19:57   ` Brian Hutchinson
@ 2021-01-27 20:10     ` Brian Hutchinson
  2021-01-27 20:13       ` Otavio Salvador
  0 siblings, 1 reply; 14+ messages in thread
From: Brian Hutchinson @ 2021-01-27 20:10 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]

On Wed, Jan 27, 2021 at 2:57 PM Brian Hutchinson <b.hutchman@gmail.com>
wrote:

>
> On Wed, Jan 27, 2021 at 2:42 PM Otavio Salvador <
> otavio.salvador@ossystems.com.br> wrote:
>
>> Hello,
>>
>> Em qua., 27 de jan. de 2021 às 16:37, Brian Hutchinson
>> <b.hutchman@gmail.com> escreveu:
>> > Was needing fw_printenv/fw_setenv in Dunfell and don't see the fw-utils
>> package anywhere.  I see one in Sumo release.
>> >
>> > Am I missing something?
>>
>> The libubootenv is now the one which provide those tools.
>>
>> --
>> Otavio Salvador                             O.S. Systems
>> http://www.ossystems.com.br        http://code.ossystems.com.br
>> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
>>
>
>
> Ahhh, I guess I was missing something!!!  Thanks for "updating" me!
>
> Regards,
>
> Brian
>
>
Ok I think I just realized something screwed up with my build.  Several
months ago I switched from using NXP releases to meta-freescale community
BSP for imx8mm.  I'm using Poky distro for now while I use imx8mm-evk
distro as a base for what I want to do.

I searched my current checkout for libubootenv and only got hits in:
./poky/meta/recipes-bsp/u-boot/libubootenv_0.3.1.bb
./openembedded-core/meta/recipes-bsp/u-boot/libubootenv_0.3.1.bb
... nothing in meta-freescale.

That got me wondering which u-boot I'm really using.  When my board boots
and I pay attention to u-boot it says I'm running U-Boot2020.04-imx
_v2020.04_5.4.24_2.1.0+g4979a99482

So shouldn't there be a libubootenv.bb in meta-freescale/recipes-bsp/u-boot?
Looks like I'm still missing something ;)

Regards,

Brian

[-- Attachment #2: Type: text/html, Size: 4619 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
  2021-01-27 20:10     ` Brian Hutchinson
@ 2021-01-27 20:13       ` Otavio Salvador
  2021-01-27 22:24         ` Brian Hutchinson
       [not found]         ` <165E371A7C0B0DCE.12137@lists.yoctoproject.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Otavio Salvador @ 2021-01-27 20:13 UTC (permalink / raw)
  To: Brian Hutchinson; +Cc: meta-freescale

Em qua., 27 de jan. de 2021 às 17:11, Brian Hutchinson
<b.hutchman@gmail.com> escreveu:
> On Wed, Jan 27, 2021 at 2:57 PM Brian Hutchinson <b.hutchman@gmail.com> wrote:
> So shouldn't there be a libubootenv.bb in meta-freescale/recipes-bsp/u-boot?  Looks like I'm still missing something ;)

No. The tools are generic and now we package the default environment
for use with them.

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

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
  2021-01-27 20:13       ` Otavio Salvador
@ 2021-01-27 22:24         ` Brian Hutchinson
       [not found]         ` <165E371A7C0B0DCE.12137@lists.yoctoproject.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Hutchinson @ 2021-01-27 22:24 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

On Wed, Jan 27, 2021 at 3:13 PM Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> Em qua., 27 de jan. de 2021 às 17:11, Brian Hutchinson
> <b.hutchman@gmail.com> escreveu:
> > On Wed, Jan 27, 2021 at 2:57 PM Brian Hutchinson <b.hutchman@gmail.com>
> wrote:
> > So shouldn't there be a libubootenv.bb in
> meta-freescale/recipes-bsp/u-boot?  Looks like I'm still missing something
> ;)
>
> No. The tools are generic and now we package the default environment
> for use with them.
>
>
> Thanks!  Added  libubootenv <http://libubootenv.bb> to my core-image-base
image and now get:

root@imx8mmevk:~# fw_printenv
Configuration file wrong or corrupted


... so getting closer.  I'm booting off sdcard so need to find the config
for that and figure out what's wrong with it.  Then change it for eMMC
later as that's my ultimate goal.

Regards,

Brian

[-- Attachment #2: Type: text/html, Size: 1987 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
       [not found]         ` <165E371A7C0B0DCE.12137@lists.yoctoproject.org>
@ 2021-01-28  4:41           ` Brian Hutchinson
       [not found]           ` <165E4BA6BFE5FFD7.12137@lists.yoctoproject.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Hutchinson @ 2021-01-28  4:41 UTC (permalink / raw)
  To: b.hutchman; +Cc: Otavio Salvador, meta-freescale

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

On Wed, Jan 27, 2021 at 5:25 PM Brian Hutchinson via lists.yoctoproject.org
<b.hutchman=gmail.com@lists.yoctoproject.org> wrote:

>
> On Wed, Jan 27, 2021 at 3:13 PM Otavio Salvador <
> otavio.salvador@ossystems.com.br> wrote:
>
>> Em qua., 27 de jan. de 2021 às 17:11, Brian Hutchinson
>> <b.hutchman@gmail.com> escreveu:
>> > On Wed, Jan 27, 2021 at 2:57 PM Brian Hutchinson <b.hutchman@gmail.com>
>> wrote:
>> > So shouldn't there be a libubootenv.bb in
>> meta-freescale/recipes-bsp/u-boot?  Looks like I'm still missing something
>> ;)
>>
>> No. The tools are generic and now we package the default environment
>> for use with them.
>>
>>
>> Thanks!  Added  libubootenv <http://libubootenv.bb> to my
> core-image-base image and now get:
>
> root@imx8mmevk:~# fw_printenv
> Configuration file wrong or corrupted
>
>
> ... so getting closer.  I'm booting off sdcard so need to find the config
> for that and figure out what's wrong with it.  Then change it for eMMC
> later as that's my ultimate goal.
>
> Regards,
>
> Brian
>
>
Ok, stumped now.  I created a /etc/fw_env.config file with:
/dev/mmcblk1            0x400000        0x1000

Also tried:
/dev/mmcblk1 0x0 0x1000

... mmcblk1 is the sdcard I'm booting.

Now I'm getting:

root@imx8mmevk:/etc# fw_printenv
Cannot read environment, using default
Cannot read default environment from file

This is first time I'm using sdcards or eMMC to store u-boot env, always
did it in NOR before so I'm kinda lost at the moment.

Anyone know where the u-boot env is on sdcard (or eMMC)?

Regards,

Brian

[-- Attachment #2: Type: text/html, Size: 5031 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
       [not found]           ` <165E4BA6BFE5FFD7.12137@lists.yoctoproject.org>
@ 2021-01-28  5:25             ` Brian Hutchinson
       [not found]             ` <165E4E153C3FC07E.12137@lists.yoctoproject.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Hutchinson @ 2021-01-28  5:25 UTC (permalink / raw)
  To: b.hutchman; +Cc: Otavio Salvador, meta-freescale

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

On Wed, Jan 27, 2021 at 11:41 PM Brian Hutchinson via lists.yoctoproject.org
<b.hutchman=gmail.com@lists.yoctoproject.org> wrote:

>
> Ok, stumped now.  I created a /etc/fw_env.config file with:
> /dev/mmcblk1            0x400000        0x1000
>
> Also tried:
> /dev/mmcblk1 0x0 0x1000
>
> ... mmcblk1 is the sdcard I'm booting.
>
> Now I'm getting:
>
> root@imx8mmevk:/etc# fw_printenv
> Cannot read environment, using default
> Cannot read default environment from file
>
> This is first time I'm using sdcards or eMMC to store u-boot env, always
> did it in NOR before so I'm kinda lost at the moment.
>
> Anyone know where the u-boot env is on sdcard (or eMMC)?
>
>
>
Update ... feeling like I'm losing my mind now.

fw_env.config must be sensitive to spaces or tabs or something.

I messed around with it some more and it magically started working with my
imx8mm-evk board with fw_env.config containing:

/dev/mmcblk1  0x400000    0x1000

I don't know why that didn't work before ... I tried all kinds of things to
get this to work and really can't explain why it just started working.  To
test, I used fw_setenv to set a variable and rebooted and stopped in u-boot
and did printenv and sure enough the variable I set is there.

Regards,

Brian

[-- Attachment #2: Type: text/html, Size: 3473 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
       [not found]             ` <165E4E153C3FC07E.12137@lists.yoctoproject.org>
@ 2021-01-29  2:28               ` Brian Hutchinson
       [not found]               ` <165E92F42A8AA8AC.17182@lists.yoctoproject.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Hutchinson @ 2021-01-29  2:28 UTC (permalink / raw)
  To: b.hutchman; +Cc: Otavio Salvador, meta-freescale

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

>
>
> Update ... feeling like I'm losing my mind now.
>
> fw_env.config must be sensitive to spaces or tabs or something.
>
> I messed around with it some more and it magically started working with my
> imx8mm-evk board with fw_env.config containing:
>
> /dev/mmcblk1  0x400000    0x1000
>
> I don't know why that didn't work before ... I tried all kinds of things
> to get this to work and really can't explain why it just started working.
> To test, I used fw_setenv to set a variable and rebooted and stopped in
> u-boot and did printenv and sure enough the variable I set is there.
>
> Regards,
>
> Brian
>

So I think I figured out what was going on.  I flashed sdcard with fresh
Yocto build.  Apparently the default u-boot environment is in ram and not
in the eMMC until you stop in u-boot and do a saveenv ... then when you
boot into Linux fw_printenv works.  Prior to doing that, fw_printenv will
return the error I previously mentioned.

Hopefully this will help the next person thinking they are losing their
mind messing with creating a fw_env.config file.

Regards,

Brian

[-- Attachment #2: Type: text/html, Size: 1624 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
       [not found]               ` <165E92F42A8AA8AC.17182@lists.yoctoproject.org>
@ 2021-03-09 17:06                 ` Brian Hutchinson
  2021-03-09 21:30                   ` Peter Bergin
  0 siblings, 1 reply; 14+ messages in thread
From: Brian Hutchinson @ 2021-03-09 17:06 UTC (permalink / raw)
  To: b.hutchman; +Cc: Otavio Salvador, meta-freescale

[-- Attachment #1: Type: text/plain, Size: 1835 bytes --]

On Thu, Jan 28, 2021 at 9:28 PM Brian Hutchinson via lists.yoctoproject.org
<b.hutchman=gmail.com@lists.yoctoproject.org> wrote:

>
>> Update ... feeling like I'm losing my mind now.
>>
>> fw_env.config must be sensitive to spaces or tabs or something.
>>
>> I messed around with it some more and it magically started working with
>> my imx8mm-evk board with fw_env.config containing:
>>
>> /dev/mmcblk1  0x400000    0x1000
>>
>> I don't know why that didn't work before ... I tried all kinds of things
>> to get this to work and really can't explain why it just started working.
>> To test, I used fw_setenv to set a variable and rebooted and stopped in
>> u-boot and did printenv and sure enough the variable I set is there.
>>
>> Regards,
>>
>> Brian
>>
>
> So I think I figured out what was going on.  I flashed sdcard with fresh
> Yocto build.  Apparently the default u-boot environment is in ram and not
> in the eMMC until you stop in u-boot and do a saveenv ... then when you
> boot into Linux fw_printenv works.  Prior to doing that, fw_printenv will
> return the error I previously mentioned.
>
> Hopefully this will help the next person thinking they are losing their
> mind messing with creating a fw_env.config file.
>
> Regards,
>
> Brian
>
>
Reviving this issue again ... I noticed that I had to make my own
fw_env.config file and copy it to etc. in a read/write rootfs for quick
testing ... there is no fw_env.config sample provided by libubootenv that
is placed in rootfs under /etc.  I'm now generating a squashfs can can't do
that hack so need to do it in recipe and looking at the recipes ... not
100% sure how to go about it.

But shouldn't libubootenv put a example fw_env.config in /etc?  I mean it
won't work like it's supposed to without one.

Regards,

Brian

[-- Attachment #2: Type: text/html, Size: 2718 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
  2021-03-09 17:06                 ` Brian Hutchinson
@ 2021-03-09 21:30                   ` Peter Bergin
  2021-03-09 21:35                     ` Brian Hutchinson
       [not found]                     ` <166ACA32331689CD.29360@lists.yoctoproject.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Peter Bergin @ 2021-03-09 21:30 UTC (permalink / raw)
  To: Brian Hutchinson; +Cc: Otavio Salvador, meta-freescale

[-- Attachment #1: Type: text/plain, Size: 2322 bytes --]

Hi Brian,


>
> Reviving this issue again ... I noticed that I had to make my own 
> fw_env.config file and copy it to etc. in a read/write rootfs for 
> quick testing ... there is no fw_env.config sample provided by 
> libubootenv that is placed in rootfs under /etc.  I'm now generating a 
> squashfs can can't do that hack so need to do it in recipe and looking 
> at the recipes ... not 100% sure how to go about it.
>
> But shouldn't libubootenv put a example fw_env.config in /etc?  I mean 
> it won't work like it's supposed to without one.
>
> Regards,
>
> Brian
>
it is quite useless for libubootenv (in oe-core) to put a general 
example in /etc as it is highly dependent of the target system and where 
u-boot environment is located. But in the BSP-layer(s) it could be good 
to have example files. There are in the meta-freescale-3rdparty for some 
boards already:

     meta-freescale-3rdparty$ find . -name fw_env.config
     ./recipes-bsp/u-boot/u-boot-boundary/arm/fw_env.config
     ./recipes-bsp/u-boot/u-boot-boundary/aarch64/fw_env.config
     ./recipes-bsp/u-boot/u-boot-toradex/fw_env.config
./recipes-bsp/u-boot/u-boot-toradex/colibri-imx7-emmc/fw_env.config
./recipes-bsp/u-boot/u-boot-toradex/colibri-imx6ull/fw_env.config
     ./recipes-bsp/u-boot/u-boot-toradex/mx6/fw_env.config
     ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx7/fw_env.config
     ./recipes-bsp/u-boot/u-boot-toradex/vf/fw_env.config
     ./recipes-bsp/u-boot/u-boot-kontron/fw_env.config

In u-boot there are around 10 options where to store the environment 
(EEPROM, ext4, FAT, flash memory, MMC......) and for some options eMMC 
for example there are several other options such as boot partition and 
address. This is a proof that it is best practice to create your own 
fw_env.config that fits your system and matches the u-boot configuration.

Still no fw_env.config in meta-freescale for the boards defined there. I 
don't know why. Probably it could be feasible with some defaults there. 
As there are default configs for u-boot I guess a fw_env.config could be 
shipped matching that. But on the other hand there are no example images 
in poky or meta-freescale* that includes libubootenv so that can be a 
reason.

Best regards,
/Peter


[-- Attachment #2: Type: text/html, Size: 3320 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
  2021-03-09 21:30                   ` Peter Bergin
@ 2021-03-09 21:35                     ` Brian Hutchinson
       [not found]                     ` <166ACA32331689CD.29360@lists.yoctoproject.org>
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Hutchinson @ 2021-03-09 21:35 UTC (permalink / raw)
  To: Peter Bergin; +Cc: Otavio Salvador, meta-freescale

[-- Attachment #1: Type: text/plain, Size: 2936 bytes --]

On Tue, Mar 9, 2021 at 4:29 PM Peter Bergin <peter@berginkonsult.se> wrote:

> Hi Brian,
>
>
> Reviving this issue again ... I noticed that I had to make my own
> fw_env.config file and copy it to etc. in a read/write rootfs for quick
> testing ... there is no fw_env.config sample provided by libubootenv that
> is placed in rootfs under /etc.  I'm now generating a squashfs can can't do
> that hack so need to do it in recipe and looking at the recipes ... not
> 100% sure how to go about it.
>
> But shouldn't libubootenv put a example fw_env.config in /etc?  I mean it
> won't work like it's supposed to without one.
>
> Regards,
>
> Brian
>
> it is quite useless for libubootenv (in oe-core) to put a general example
> in /etc as it is highly dependent of the target system and where u-boot
> environment is located. But in the BSP-layer(s) it could be good to have
> example files. There are in the meta-freescale-3rdparty for some boards
> already:
>
>     meta-freescale-3rdparty$ find . -name fw_env.config
>     ./recipes-bsp/u-boot/u-boot-boundary/arm/fw_env.config
>     ./recipes-bsp/u-boot/u-boot-boundary/aarch64/fw_env.config
>     ./recipes-bsp/u-boot/u-boot-toradex/fw_env.config
>     ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx7-emmc/fw_env.config
>     ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx6ull/fw_env.config
>     ./recipes-bsp/u-boot/u-boot-toradex/mx6/fw_env.config
>     ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx7/fw_env.config
>     ./recipes-bsp/u-boot/u-boot-toradex/vf/fw_env.config
>     ./recipes-bsp/u-boot/u-boot-kontron/fw_env.config
>
> In u-boot there are around 10 options where to store the environment
> (EEPROM, ext4, FAT, flash memory, MMC......) and for some options eMMC for
> example there are several other options such as boot partition and address.
> This is a proof that it is best practice to create your own fw_env.config
> that fits your system and matches the u-boot configuration.
>
> Still no fw_env.config in meta-freescale for the boards defined there. I
> don't know why. Probably it could be feasible with some defaults there. As
> there are default configs for u-boot I guess a fw_env.config could be
> shipped matching that. But on the other hand there are no example images in
> poky or meta-freescale* that includes libubootenv so that can be a reason.
>
> Best regards,
> /Peter
>

I'm about to scream.  I can't figure out what I'm doing wrong.

I made a libubootenv_%.bbappend with:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:"

SRC_URI_append += " file://fw_env.config"

do_install_append() {
       install -d ${D}${sysconfdir}
       install -m 0644 ${WORKDIR}/fw_env.config
${D}${sysconfdir}/fw_env.config
}

FILES_${PN} += "${sysconfdir}/fw_env.config"

... and fw_env.conf is going to tmp/deploy/images/imx8mmevk instead of
inside my squashfs.wic file.

Regards,

Brian

[-- Attachment #2: Type: text/html, Size: 4619 bytes --]

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

* Re: [meta-freescale] No u-boot-fslc-fw-utils recipe for Dunfell?
       [not found]                     ` <166ACA32331689CD.29360@lists.yoctoproject.org>
@ 2021-03-09 22:03                       ` Brian Hutchinson
  0 siblings, 0 replies; 14+ messages in thread
From: Brian Hutchinson @ 2021-03-09 22:03 UTC (permalink / raw)
  To: b.hutchman; +Cc: Peter Bergin, Otavio Salvador, meta-freescale

[-- Attachment #1: Type: text/plain, Size: 5287 bytes --]

On Tue, Mar 9, 2021 at 4:35 PM Brian Hutchinson via lists.yoctoproject.org
<b.hutchman=gmail.com@lists.yoctoproject.org> wrote:

>
>
> On Tue, Mar 9, 2021 at 4:29 PM Peter Bergin <peter@berginkonsult.se>
> wrote:
>
>> Hi Brian,
>>
>>
>> Reviving this issue again ... I noticed that I had to make my own
>> fw_env.config file and copy it to etc. in a read/write rootfs for quick
>> testing ... there is no fw_env.config sample provided by libubootenv that
>> is placed in rootfs under /etc.  I'm now generating a squashfs can can't do
>> that hack so need to do it in recipe and looking at the recipes ... not
>> 100% sure how to go about it.
>>
>> But shouldn't libubootenv put a example fw_env.config in /etc?  I mean it
>> won't work like it's supposed to without one.
>>
>> Regards,
>>
>> Brian
>>
>> it is quite useless for libubootenv (in oe-core) to put a general example
>> in /etc as it is highly dependent of the target system and where u-boot
>> environment is located. But in the BSP-layer(s) it could be good to have
>> example files. There are in the meta-freescale-3rdparty for some boards
>> already:
>>
>>     meta-freescale-3rdparty$ find . -name fw_env.config
>>     ./recipes-bsp/u-boot/u-boot-boundary/arm/fw_env.config
>>     ./recipes-bsp/u-boot/u-boot-boundary/aarch64/fw_env.config
>>     ./recipes-bsp/u-boot/u-boot-toradex/fw_env.config
>>     ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx7-emmc/fw_env.config
>>     ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx6ull/fw_env.config
>>     ./recipes-bsp/u-boot/u-boot-toradex/mx6/fw_env.config
>>     ./recipes-bsp/u-boot/u-boot-toradex/colibri-imx7/fw_env.config
>>     ./recipes-bsp/u-boot/u-boot-toradex/vf/fw_env.config
>>     ./recipes-bsp/u-boot/u-boot-kontron/fw_env.config
>>
>> In u-boot there are around 10 options where to store the environment
>> (EEPROM, ext4, FAT, flash memory, MMC......) and for some options eMMC for
>> example there are several other options such as boot partition and address.
>> This is a proof that it is best practice to create your own fw_env.config
>> that fits your system and matches the u-boot configuration.
>>
>> Still no fw_env.config in meta-freescale for the boards defined there. I
>> don't know why. Probably it could be feasible with some defaults there. As
>> there are default configs for u-boot I guess a fw_env.config could be
>> shipped matching that. But on the other hand there are no example images in
>> poky or meta-freescale* that includes libubootenv so that can be a reason.
>>
>> Best regards,
>> /Peter
>>
>
> I'm about to scream.  I can't figure out what I'm doing wrong.
>
> I made a libubootenv_%.bbappend with:
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}/:"
>
> SRC_URI_append += " file://fw_env.config"
>
> do_install_append() {
>        install -d ${D}${sysconfdir}
>        install -m 0644 ${WORKDIR}/fw_env.config
> ${D}${sysconfdir}/fw_env.config
> }
>
> FILES_${PN} += "${sysconfdir}/fw_env.config"
>
> ... and fw_env.conf is going to tmp/deploy/images/imx8mmevk instead of
> inside my squashfs.wic file.
>
> Regards,
>
> Brian
>
>
It actually looks like it's simpler than what I did for
libubootenv_%.bbappend in last email ... since I'm using poky distro and it
looks like u-boot-imx.bb is including that
(recipies-bsp/u-boot/u-boot.inc), simply adding " SRC_URI += "
file://fw_env.config" " is all that's needed (with a fw_env.config file in
files dir of course) in u-boot-imx_2020.04.bb ... but again, I do a bitbake
core-image-minimal and go look at tmp/deploy/images/imx8mmevk and the time
date stamp on my core-image-minimal-imx8mmevk-squashfs has not changed but
it has on a fw_env.config file sitting right in the directory ... which is
not where I want it!  It should be in the squashfs.

-rw-r--r-- 2 hutch hutch      1895 Mar  9 15:31
core-image-minimal-imx8mmevk-20210309203126.rootfs.manifest
-rw-r--r-- 2 hutch hutch   9613312 Mar  9 15:32
core-image-minimal-imx8mmevk-20210309203126.rootfs.squashfs
-rw-r--r-- 2 hutch hutch   9201440 Mar  9 15:32
core-image-minimal-imx8mmevk-20210309203126.rootfs.tar.bz2
-rw-r--r-- 2 hutch hutch    532719 Mar  9 15:31
core-image-minimal-imx8mmevk-20210309203126.testdata.json
lrwxrwxrwx 2 hutch hutch        59 Mar  9 15:31
core-image-minimal-imx8mmevk.manifest ->
core-image-minimal-imx8mmevk-20210309203126.rootfs.manifest
lrwxrwxrwx 2 hutch hutch        59 Mar  9 15:32
core-image-minimal-imx8mmevk.squashfs ->
core-image-minimal-imx8mmevk-20210309203126.rootfs.squashfs
-rw-r--r-- 1 hutch hutch   9605120 Mar  8 09:36
core-image-minimal-imx8mmevk.squashfs_keep
lrwxrwxrwx 2 hutch hutch        58 Mar  9 15:32
core-image-minimal-imx8mmevk.tar.bz2 ->
core-image-minimal-imx8mmevk-20210309203126.rootfs.tar.bz2
lrwxrwxrwx 2 hutch hutch        57 Mar  9 15:31
core-image-minimal-imx8mmevk.testdata.json ->
core-image-minimal-imx8mmevk-20210309203126.testdata.json
lrwxrwxrwx 2 hutch hutch        34 Mar  9 16:48 fw_env.config ->
fw_env.config-imx8mmevk-2020.04-r0
lrwxrwxrwx 2 hutch hutch        34 Mar  9 16:48 fw_env.config-imx8mmevk ->
fw_env.config-imx8mmevk-2020.04-r0
-rw-r--r-- 2 hutch hutch      2858 Mar  9 16:48
fw_env.config-imx8mmevk-2020.04-r0

[-- Attachment #2: Type: text/html, Size: 9374 bytes --]

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

end of thread, other threads:[~2021-03-09 22:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 19:37 No u-boot-fslc-fw-utils recipe for Dunfell? Brian Hutchinson
2021-01-27 19:42 ` [meta-freescale] " Otavio Salvador
2021-01-27 19:57   ` Brian Hutchinson
2021-01-27 20:10     ` Brian Hutchinson
2021-01-27 20:13       ` Otavio Salvador
2021-01-27 22:24         ` Brian Hutchinson
     [not found]         ` <165E371A7C0B0DCE.12137@lists.yoctoproject.org>
2021-01-28  4:41           ` Brian Hutchinson
     [not found]           ` <165E4BA6BFE5FFD7.12137@lists.yoctoproject.org>
2021-01-28  5:25             ` Brian Hutchinson
     [not found]             ` <165E4E153C3FC07E.12137@lists.yoctoproject.org>
2021-01-29  2:28               ` Brian Hutchinson
     [not found]               ` <165E92F42A8AA8AC.17182@lists.yoctoproject.org>
2021-03-09 17:06                 ` Brian Hutchinson
2021-03-09 21:30                   ` Peter Bergin
2021-03-09 21:35                     ` Brian Hutchinson
     [not found]                     ` <166ACA32331689CD.29360@lists.yoctoproject.org>
2021-03-09 22:03                       ` Brian Hutchinson
2021-01-27 19:43 ` Chris Dimich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).