barebox environment early loading

Oleksij Rempel linux at rempel-privat.de
Thu Sep 9 10:16:40 PDT 2021


Hello Dusan,

Am 09.09.21 um 13:58 schrieb Dusan Radic:
> Hello there,
>
> is there a possibility  to read an environment variable as soon as in
> ipufb.c?
> To be more accurate, before the frame buffer is initalised I need set
> the bus_format manually and the correct value is stored in a non
> volatile environment variable.
> I have tried the following
>
> const char* value;
>
> value = getenv("nv.dataval");
>
> However the result is always NULL.
>
> If I try the same somewhere in board.c then I get the correct value,
> but that ist too late to configure the frame buffer.
>
> Has anyone managed to read the environment early, and if yes how? Do I
> have to somehow manually load the environment path?  I have tried this
> default_environment_path_set(default_environment_path); but it doesn't
> seem to work.
>
> I am using barebox 2017.12.0

uii... drop it, it stinks :D

First of all, update it to the latest version - 2021.08.0 or even next.
Then port the board code to the DEEP_PROBE.
Grep for BAREBOX_DEEP_PROBE_ENABLE. Then you will probably need
something like of_device_ensure_probed() to ensure your environment
storage is probed.

There are probably some more challenges, but this are initial steps.

--
Regards,
Oleksij



More information about the barebox mailing list