diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-06-09 09:52:29 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-06-12 08:35:46 +0200 |
commit | fa6b27e0cc434019dd1f20934c9199f30044800b (patch) | |
tree | 18d946b12f753b84f9cde7235999fb50ce94f9c0 /Documentation/user | |
parent | 7ee032c02df7d647cb8958d4489727c1bdb478a6 (diff) | |
download | barebox-fa6b27e0cc434019dd1f20934c9199f30044800b.tar.gz barebox-fa6b27e0cc434019dd1f20934c9199f30044800b.tar.xz |
file-list: support special 'auto', 'block' specifiers
Best practice is for each board to populate $global.system.partitions
or $global.fastboot.partitions with a string exporting its flashable
devices in a descriptive manner, e.g. "/dev/mmc0(eMMC),/dev/mmc1(SD)".
This often goes into BSPs though, so upstream boards are left without
default partitions, making use a bit cumbersome. Make this easier
by providing two new magic specifiers:
- block: exports all registered block devices (e.g. eMMC and SD)
- auto: currently equivalent to "block". May be extended
to EEPROMs, raw MTD and UBI in future
This makes it easy to export devices on any board:
usbgadget -A auto -b
or
usbgadget -S auto,/tmp/fitimage(fitimage)c
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230609075229.1093397-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation/user')
-rw-r--r-- | Documentation/user/usb.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/user/usb.rst b/Documentation/user/usb.rst index f2f57ead98..eaee342956 100644 --- a/Documentation/user/usb.rst +++ b/Documentation/user/usb.rst @@ -73,6 +73,22 @@ Example: /dev/nand0.barebox.bb(barebox)sr,/kernel(kernel)rc +Board code authors are encouraged to provide a default environment containing +partitions with descriptive names. For boards where this is not specified, +there exist a number of **partition** specifiers for automatically generating entries: + +* ``block`` exports all registered block devices (e.g. eMMC and SD) +* ``auto`` currently equivalent to ``block``. May be extended to other flashable + devices, like EEPROMs, MTD or UBI volumes in future + +Example usage of exporting registered block devices, barebox update +handlers and a single file that is created on flashing: + +.. code-block:: sh + + detect -a # optional. Detects everything, so auto can register it + usbgadget -A auto,/tmp/fitimage(fitimage)c -b + DFU ^^^ |