Re: barebox environment raw partition on beaglebone black

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lars,

On 15.02.24 14:01, Lars Pedersen wrote:
> Hi.
> 
> I'm trying to create a barebox environment by using af emmc a raw
> partition offset on the beaglebone black.
> 
> For testing I appended the following into am33x-boneblack.dts.
> 
> / {
>     chosen {
>         environment {
>             compatible = "barebox,environment";
>             device-path = &environment_emmc;
>         };
>     };
> 
>     aliases {
>         state = &state_emmc;
>     };
> 
>     state_emmc: state {

[snip]

Keep in mind that state is unrelated to environment:

 - state: power-fail safe set of predefined variables used for mostly bootstate
 - environment: where you would keep scripts, variables and resources.
    In the field, you'd probably only use the immutable barebox built-in environment
    (+ state), but for development, the mutable environment is very handy.

> state: New state registered 'state'
> state state.of: Fresh state detected, continuing with defaults

State looks ok.

> environment load /mnt/mmc1.0/barebox.env: No such file or directory
> Maybe you have to create the partition.
> changing USB current limit to 1300 mA... done
> 
> Hit m for menu or any to stop autoboot:    1
> ---------------------------------------------------
> 
> Why does it try to read the env on a partition on
> /mnt/mmc1.0/barebox.env? Is it because barebox.bin also is read from
> this partition?

Check out omap_env_init(), which registers the environment if system boots from
SD/MMC. This seems to take precedence over what's in the device tree. Indeed,
upstream AM335x platforms only configure an environment in the DT if it's outside
SD, on NAND or NOR.

I think placing the environment on the FAT makes sense as the MLO is there as well.
Why would you like to move it?

Cheers,
Ahmad

> 
> Thanks.
> 
> /Lars
> 
> 

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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux