mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/4] firmware: qemu_fw_cfg: implement file system
@ 2025-06-06  7:29 Ahmad Fatoum
  2025-06-06  7:29 ` [PATCH v2 1/4] fs: add qemu_fw_cfg " Ahmad Fatoum
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2025-06-06  7:29 UTC (permalink / raw)
  To: barebox; +Cc: Adrian Negreanu

The character device we currently have is cumbersome to use.
The Linux way to access it at /sys/firmware/qemu_fw_cfg
is much nicer to use, so this series adds support for a similar
FS to barebox.

A very nice result of having file system access to the QEMU variables
in barebox is that we get a trivial way to pass data to barebox.
To make it even more convenient to use, this series enables overriding
individual files in the environment via the new mechanism, e.g.:

  pytest --env nv/boot.default=fit --env boot/fit=@boot.sh

v1 -> v2:
  - drop already upstream patches
  - drop truncate (Sascha)
  - make writing files besides "raw" an error (Sascha)
  - mount file system unconditionally, so environment can be read
    from it

Ahmad Fatoum (4):
  fs: add qemu_fw_cfg file system
  firmware: qemu_fw_cfg: register at device initcall level
  video: ramfb: use new qemu fw_cfg FS
  fs: qemu_fw_cfg: support populating environment via QEMU fw_cfg

 conftest.py                    |  22 ++
 defaultenv/defaultenv.c        |  22 ++
 drivers/firmware/qemu_fw_cfg.c |   2 +-
 drivers/video/Kconfig          |   2 +-
 drivers/video/ramfb.c          |  98 ++------
 fs/Kconfig                     |   7 +
 fs/Makefile                    |   1 +
 fs/qemu_fw_cfg.c               | 446 +++++++++++++++++++++++++++++++++
 include/envfs.h                |   5 +
 include/string.h               |   5 +
 10 files changed, 525 insertions(+), 85 deletions(-)
 create mode 100644 fs/qemu_fw_cfg.c

-- 
2.39.5




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

end of thread, other threads:[~2025-06-06  7:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-06  7:29 [PATCH v2 0/4] firmware: qemu_fw_cfg: implement file system Ahmad Fatoum
2025-06-06  7:29 ` [PATCH v2 1/4] fs: add qemu_fw_cfg " Ahmad Fatoum
2025-06-06  7:29 ` [PATCH v2 2/4] firmware: qemu_fw_cfg: register at device initcall level Ahmad Fatoum
2025-06-06  7:29 ` [PATCH v2 3/4] video: ramfb: use new qemu fw_cfg FS Ahmad Fatoum
2025-06-06  7:29 ` [PATCH v2 4/4] fs: qemu_fw_cfg: support populating environment via QEMU fw_cfg Ahmad Fatoum

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