mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* barebox state w/ qemu
@ 2024-07-08  2:22 Wes Chow
  2024-07-08  6:49 ` Ahmad Fatoum
  0 siblings, 1 reply; 6+ messages in thread
From: Wes Chow @ 2024-07-08  2:22 UTC (permalink / raw)
  To: barebox

I am trying to better understand barebox and playing with it via
Buildroot with Qemu. One thing I don't understand is how the state
backend is configured. I see this:

https://github.com/barebox/barebox/blob/d74c84582591ac1f93b203d733831fcf18e6b033/common/boards/qemu-virt/qemu-virt-flash.dtso#L4

..however I don't know how to read dts overlay files. Do I need to set
up a disk with a partition scheme that matches lines 17-30? Or is it
sufficient to just have a partition with the "barebox-state" label?

Also possibly of relevance, I'm starting qemu like so:

qemu-system-aarch64 -m 2048M -cpu cortex-a57 -machine virt -display
none -serial mon:stdio -kernel output/images/barebox-dt-2nd.img
-device virtio-blk-pci,drive=hd0,disable-legacy=on -drive
file=output/images/rootfs.ext2,if=none,format=raw,id=hd0

The rootfs.ext2 disk becomes available to barebox as /dev/virtioblk0.
How does barebox know which disk to search for the backend?

In the target image, I installed dt-utils and so have access to the
barebox-state command. How does the barebox-state executable know
where to look for the state backend? Is this passed down through the
device tree?

Thanks,
Wes



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-12 22:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-08  2:22 barebox state w/ qemu Wes Chow
2024-07-08  6:49 ` Ahmad Fatoum
2024-07-09  2:13   ` Wes Chow
2024-07-09  9:16     ` Ahmad Fatoum
2024-07-11 11:47       ` Wes Chow
2024-07-12 22:35         ` Wes Chow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox