diff options
| author | Tom Rini <[email protected]> | 2024-10-15 09:18:04 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-10-15 11:38:44 -0600 |
| commit | 4378732d5658accd07d2fb245417262a23f578ce (patch) | |
| tree | 06b50e26d4b1582fb4c00393e83b4ede06537fa6 /cmd/bootmeth.c | |
| parent | 4f777c2ef20ad294af1d3447baf7dfffb7514ab3 (diff) | |
| parent | 87980311fbb64369c29d8725fc8fb4fb35ae2f3c (diff) | |
Merge patch series to add a "fallback" keyword to extlinux.conf parsing
This series from Martyn Welch <[email protected]> adds the
ability to have a "fallback" option in extlinux.conf parsing, which can
be in turn used in A/B style update mechanisms.
Link: https://lore.kernel.org/u-boot/[email protected]/
Diffstat (limited to 'cmd/bootmeth.c')
| -rw-r--r-- | cmd/bootmeth.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/cmd/bootmeth.c b/cmd/bootmeth.c index ebf8b7e2530..2f41fa1bec6 100644 --- a/cmd/bootmeth.c +++ b/cmd/bootmeth.c @@ -103,10 +103,31 @@ static int do_bootmeth_order(struct cmd_tbl *cmdtp, int flag, int argc, return 0; } +static int do_bootmeth_set(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + int ret; + + if (argc < 4) { + printf("Required parameters not provided\n"); + return CMD_RET_FAILURE; + } + + ret = bootmeth_set_property(argv[1], argv[2], argv[3]); + if (ret) { + printf("Failed (err=%d)\n", ret); + return CMD_RET_FAILURE; + } + + return 0; +} + U_BOOT_LONGHELP(bootmeth, "list [-a] - list available bootmeths (-a all)\n" - "bootmeth order [<bd> ...] - select bootmeth order / subset to use"); + "bootmeth order [<bd> ...] - select bootmeth order / subset to use\n" + "bootmeth set <bootmeth> <property> <value> - set optional property"); U_BOOT_CMD_WITH_SUBCMDS(bootmeth, "Boot methods", bootmeth_help_text, U_BOOT_SUBCMD_MKENT(list, 2, 1, do_bootmeth_list), - U_BOOT_SUBCMD_MKENT(order, CONFIG_SYS_MAXARGS, 1, do_bootmeth_order)); + U_BOOT_SUBCMD_MKENT(order, CONFIG_SYS_MAXARGS, 1, do_bootmeth_order), + U_BOOT_SUBCMD_MKENT(set, CONFIG_SYS_MAXARGS, 1, do_bootmeth_set)); |
