[PATCH 0/7] Detect partition changes at runtime
Sascha Hauer
s.hauer at pengutronix.de
Wed Feb 14 23:47:50 PST 2024
With this series barebox can detect partition table changes at runtime
and reparse the partition table in that case. With this it's possible
for example to write an image to a SD card and mount partitions directly
afterwards without restarting barebox.
The fastboot code is also changed to check for existing partitions when
they are actually used and no longer during initialization time of the
gadget. With this it becomes possible to expose a full device via
fastboot and also some not yet existing partitions. When the full device
is written to one can then write to a (newly created) partition directly
afterwards.
The reparsing of the partition table only works when none of the
partitions are mounted or otherwise opened. When a partition is open
when the partition table changes, then barebox will continue with
the old partition table just like Linux does.
Sascha
Sascha Hauer (7):
fs: move cdev open count to cdev_open()/cdev_close()
common: partitions: efi: fix memory leak
partition: allow to reparse a partition table
block: reparse partition table when necessary
fastboot: pass list to fb_addvar()
fastboot: add function to free a list of fastboot variables
fastboot: evaluate fastboot partitions when used
common/block.c | 30 +++++++++++++++++++--
common/fastboot.c | 59 ++++++++++++++++++++++++++---------------
common/partitions.c | 20 ++++++++++++++
common/partitions/efi.c | 10 +++----
fs/devfs-core.c | 13 +++++++--
fs/devfs.c | 4 ---
include/block.h | 2 ++
include/disks.h | 1 +
8 files changed, 104 insertions(+), 35 deletions(-)
--
2.39.2
More information about the barebox
mailing list