mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lars Pedersen <lapeddk@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: barebox environment raw partition on beaglebone black
Date: Thu, 15 Feb 2024 15:29:11 +0100	[thread overview]
Message-ID: <CAKd8=GtP_q5at-=iJaU78Z9UYzHB7=SmFGnYxcHGUnOmxzDZ0A@mail.gmail.com> (raw)
In-Reply-To: <5a7f3262-a549-47da-8658-afb81ff380fa@pengutronix.de>

Hi Ahmad

On Thu, 15 Feb 2024 at 14:47, Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>
> 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?

I'll check out the omap_env_init. I just trying to understand how it
was set, so I don't want to change anything :)

Thanks for the quick response.

/Lars

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



      reply	other threads:[~2024-02-15 14:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 13:01 Lars Pedersen
2024-02-15 13:47 ` Ahmad Fatoum
2024-02-15 14:29   ` Lars Pedersen [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='CAKd8=GtP_q5at-=iJaU78Z9UYzHB7=SmFGnYxcHGUnOmxzDZ0A@mail.gmail.com' \
    --to=lapeddk@gmail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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