boot: implement devboot in C
Get series with b4
b4 am [email protected] change-id 20261030-devboot-af494560e196Versions newest first
- v2 Latest6 patches 0 repliesNew
- v15 patches 6 repliesSuperseded
Changes in v2 from the cover letter
- New patch "commands: boot: apply -o overrides to boot entries in the menu"
- "boot: implement devboot in C":
- devboot also applies to the boot menu
- depend on BOOTM_OPTIONAL_SIGNED_IMAGES and refuse devboot when signed images are forced at runtime
- use globalvar_get() and pushd()/popd()
- add a migration guide entry for the removed devboot boot target
- rework commit message
- Rebase onto the current "boot: revert boot related globalvars after booting" series
- Collect tags
- Link to v1: https://lore.barebox.org/[email protected]
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | boot: report the exit status of failing boot scriptscommon/ include/ test/ | +21 | 0 replies | |
| 2/6 | hush: export source_script()common/ include/ | +23 | 0 replies | |
| 3/6 | boot: hand overrides on to nested boots and the bootm commandDocumentation/ commands/ common/ +6 more | +163 | 0 replies | |
| 4/6 | commands: boot: apply -o overrides to boot entries in the menucommands/ | +3 | 0 replies | |
| 5/6 | boot: implement devboot in CDocumentation/ Documentation/ commands/ +8 more | +479 | 0 replies | |
| 6/6 | sandbox: defconfig: enable boot overrides and devbootarch/ | +2 | 0 replies |
Reviews trailers per patch
3 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Ahmad Fatoum |
|---|---|
| 1/6 | R-b |
| 2/6 | R-b |
| 3/6 | |
| 4/6 | |
| 5/6 | |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/6] boot: implement devboot in C
devboot is a script on top of the boot command, and the devboot boot target needed to boot with it by default is another one on top of that. Booting with devboot thus means nested boot commands, and booting with it by default means rewriting global.boot.default as devboot@<target>. Also, boot overrides get lost when a boot script calls boot or bootm itself, and the boot menu ignores them altogether.
This series hands overrides on to whatever a boot entry boots, applies them to entries booted from the menu, and turns devboot into what it really is, an option to the boot command: boot -D, or global.boot.devboot=1 to enable it independently of the boot targets. The devboot command remains as a shorthand for boot -D. The devboot boot target is removed, see the migration guide entry for how to replace it.
The series is based on the "Add and use file_exists() helper" and "boot:
revert boot related globalvars after booting" series.
---
Changes in v2:
- New patch "commands: boot: apply -o overrides to boot entries in the menu"
- "boot: implement devboot in C":
- devboot also applies to the boot menu
- depend on BOOTM_OPTIONAL_SIGNED_IMAGES and refuse devboot when signed images are forced at runtime
- use globalvar_get() and pushd()/popd()
- add a migration guide entry for the removed devboot boot target
- rework commit message
- Rebase onto the current "boot: revert boot related globalvars after booting" series
- Collect tags
- Link to v1: https://lore.barebox.org/[email protected]
---
Sascha Hauer (6):
boot: report the exit status of failing boot scripts
hush: export source_script()
boot: hand overrides on to nested boots and the bootm command
commands: boot: apply -o overrides to boot entries in the menu
boot: implement devboot in C
sandbox: defconfig: enable boot overrides and devboot
.../migration-master/devboot-boot-option.rst | 22 +++ Documentation/user/devboot.rst | 81 ++++---- arch/sandbox/configs/sandbox_defconfig | 2 + commands/boot.c | 30 ++- commands/bootm.c | 3 +- common/Kconfig | 12 +- common/Makefile | 1 + common/boot.c | 63 ++++--- common/bootchooser.c | 13 +- common/bootm.c | 22 ++- common/devboot.c | 206 +++++++++++++++++++++ common/hush.c | 17 +- defaultenv/defaultenv-2-base/bin/devboot | 52 +----- defaultenv/defaultenv-2-base/boot/devboot | 8 - include/boot.h | 9 + include/bootchooser.h | 2 +- include/bootm.h | 3 + include/devboot.h | 31 ++++ include/shell.h | 8 + test/py/test_boot_overrides.py | 92 +++++++++ test/py/test_boot_script.py | 13 ++ test/py/test_devboot.py | 131 +++++++++++++ 22 files changed, 691 insertions(+), 130 deletions(-)
---
base-commit: 8df700d8f4fc86df09dca13e53fb7c1d64cc9680
change-id: 20261030-devboot-af494560e196
Best regards,
Signature · 1 line
Sascha Hauer <[email protected]>