mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <linux@rempel-privat.de>
To: Dusan Radic <dusrad@gmail.com>, barebox@lists.infradead.org
Subject: Re: barebox environment early loading
Date: Thu, 9 Sep 2021 19:16:40 +0200	[thread overview]
Message-ID: <3eb43ce0-d56f-611b-d5d4-631a9890c36f@rempel-privat.de> (raw)
In-Reply-To: <CAFe1xey4MRgd8YhKePm-L9SEf2sqefcWieft9GHspvE20TZbZg@mail.gmail.com>

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

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


      reply	other threads:[~2021-09-09 17:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 11:58 Dusan Radic
2021-09-09 17:16 ` Oleksij Rempel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3eb43ce0-d56f-611b-d5d4-631a9890c36f@rempel-privat.de \
    --to=linux@rempel-privat.de \
    --cc=barebox@lists.infradead.org \
    --cc=dusrad@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox