From: Wes Chow <wes.chow@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: barebox state w/ qemu
Date: Mon, 8 Jul 2024 22:13:51 -0400 [thread overview]
Message-ID: <CAGWymk23wmB14DSzHcyjc0eHCVaNgxeG6ykL7WyE_fCCiTsdsw@mail.gmail.com> (raw)
In-Reply-To: <09205dea-7c95-47d3-b339-e7ad2477d592@pengutronix.de>
Ahmad,
> Normally, the barebox device tree already describes the state and
> environment, but Qemu is a special case, because the device tree is
> not compiled into barebox, but supplied by the virtual machine.
>
> Thus this overlay to add some barebox specific information. As this
> should happen very early, so that the environment can take effect early
> on, the overlays aren't applied dynamically in this case, but compiled-in.
Thanks, that's very helpful. I'm starting to understand but I'm not
quite there yet...
> Because that flash is a fixed part of the virt machine, you should
> already have functional state:
>
> barebox@ARM QEMU virt64:/ state
> registered state instances:
> state (backend: raw, path: /dev/nor0.barebox-state)
>
> Is this not the case and if not, what errors did you get?
I do have the same thing. If I'm reading the docs correctly though I
should be able to modify state with the nv command, right? This
doesn't seem to persist the foo variable:
barebox@ARM QEMU virt64:/ state
registered state instances:
state (backend: raw, path: /dev/nor0.barebox-state)
barebox@ARM QEMU virt64:/ nv foo=bar
nv variable modified, will save nv variables on shutdown
barebox@ARM QEMU virt64:/ nv
allow_color: true
autoboot_timeout: 3
foo: bar
user: none
barebox@ARM QEMU virt64:/ poweroff
When I restart Qemu the "foo" variable goes away. And actually, every
time I start Qemu I get this message:
state state.of: Fresh state detected, continuing with defaults
Do I need to specify a flash device when starting Qemu? I'm running
this (taken from the docs):
qemu-system-aarch64 -m 2048M -cpu cortex-a57 -machine virt -display
none -serial stdio -kernel ./images/barebox-dt-2nd.img
... but I'm guessing I'm missing a pflash argument. I've been trying
various incantations but haven't been able to get Qemu to boot
successfully if I supply a `-drive if=pflash,...`.
Thanks,
Wes
next prev parent reply other threads:[~2024-07-09 2:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-08 2:22 Wes Chow
2024-07-08 6:49 ` Ahmad Fatoum
2024-07-09 2:13 ` Wes Chow [this message]
2024-07-09 9:16 ` Ahmad Fatoum
2024-07-11 11:47 ` Wes Chow
2024-07-12 22:35 ` Wes Chow
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=CAGWymk23wmB14DSzHcyjc0eHCVaNgxeG6ykL7WyE_fCCiTsdsw@mail.gmail.com \
--to=wes.chow@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