From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
Albert Aribaud <albert.u.boot@aribaud.net>,
Anatolij Gustschin <agust@denx.de>, Bin Meng <bmeng.cn@gmail.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Jerry Van Baren <vanbaren@cideas.com>,
Joe Hershberger <joe.hershberger@ni.com>,
Peng Fan <peng.fan@nxp.com>
Subject: [PATCH v2 00/27] Tidy up use of CONFIG_CMDLINE
Date: Sat, 7 Oct 2023 17:12:19 -0600 [thread overview]
Message-ID: <20231007231255.277623-1-sjg@chromium.org> (raw)
It should be possible to disable CONFIG_CMDLINE and have all commands
and related functionality dropped from U-Boot. This is useful when
trying to reduce the size of U-Boot.
Recent changes have stopped this from working.
This series repairs the feature for sandbox and adds a test to stop it
breaking again.
Note that quite a lot of functionality is lost if CONFIG_CMDLINE is
disabled, e.g. networking and most booting options. Further work is
needed to make the option more generally useful.
Changes in v2:
- Move AUTOBOOT_USE_MENUKEY under AUTOBOOT
- Change this to use a Kconfig dependency instead of code failing
- Add new patch to drop discarding of command linker-lists
- Add new patch to unify the U_BOOT_ENV_LOCATION conditions
- Rebase on Tom's LONGHELP series
- Correct 'of' typo
Simon Glass (25):
buildman: Use oldconfig when adjusting the config
bootstd: Correct dependencies on CMDLINE
autoboot: Correct dependencies on CMDLINE
cmd: Add a few more dependencies on CMDLINE
test: Make UNIT_TEST depend on CMDLINE
sifive: Change #ifdef for nop
fastboot: Declare a dependency on CMDLINE
cli: Always build cli_getch
cmd: Use an #ifdef around run_commandf()
Move bootmenu_conv_key() into its own file
pxe: Depend on CMDLINE
env: Split out non-command code into a new file
console: Move SYS_PBSIZE into common/
bootm: Allow building when cleanup functions are missing
fdt: Move working_fdt into fdt_support
net: Depend on CONFIG_CMDLINE
log: Allow use without CONFIG_CMDLINE
video: Allow use without CONFIG_CMDLINE
video: Dont require the font command
efi: Depend on CMDLINE for efi_loader
cmd: Make all commands depend on CMDLINE
sandbox: Avoid requiring cmdline
arm: x86: Drop discarding of command linker-lists
mmc: env: Unify the U_BOOT_ENV_LOCATION conditions
sandbox: Add a test for disabling CONFIG_CMDLINE
Tom Rini (2):
command.h: Add a U_BOOT_LONGHELP macro
cmd: Convert existing long help messages to the new macro
arch/Kconfig | 6 +-
arch/arm/cpu/u-boot.lds | 3 -
arch/arm/lib/bootm.c | 2 +
arch/arm/mach-imx/cmd_nandbcb.c | 6 +-
arch/x86/cpu/u-boot-64.lds | 4 -
arch/x86/cpu/u-boot-spl.lds | 4 -
arch/x86/cpu/u-boot.lds | 4 -
board/freescale/common/ngpixis.c | 6 +-
.../work_92105/work_92105_display.c | 12 +-
board/xilinx/common/fru.c | 7 +-
board/xilinx/versal/cmds.c | 7 +-
board/xilinx/zynq/cmds.c | 6 +-
board/xilinx/zynqmp/cmds.c | 6 +-
boot/Kconfig | 48 ++++---
boot/bootm.c | 10 +-
boot/fdt_support.c | 5 +
cmd/Kconfig | 25 ++--
cmd/Makefile | 2 +-
cmd/acpi.c | 6 +-
cmd/aes.c | 6 +-
cmd/armffa.c | 4 +-
cmd/axi.c | 4 +-
cmd/bloblist.c | 6 +-
cmd/bootcount.c | 9 +-
cmd/bootdev.c | 6 +-
cmd/bootefi.c | 6 +-
cmd/bootflow.c | 9 +-
cmd/booti.c | 6 +-
cmd/bootm.c | 6 +-
cmd/bootmeth.c | 6 +-
cmd/bootz.c | 6 +-
cmd/cat.c | 6 +-
cmd/cedit.c | 6 +-
cmd/clk.c | 6 +-
cmd/conitrace.c | 4 +-
cmd/cpu.c | 7 +-
cmd/cyclic.c | 4 +-
cmd/dm.c | 7 +-
cmd/efidebug.c | 6 +-
cmd/event.c | 6 +-
cmd/fdt.c | 11 +-
cmd/font.c | 6 +-
cmd/help.c | 5 +-
cmd/i2c.c | 6 +-
cmd/kaslrseed.c | 6 +-
cmd/log.c | 7 +-
cmd/mp.c | 6 +-
cmd/mtd.c | 6 +-
cmd/mtdparts.c | 6 +-
cmd/mux.c | 4 +-
cmd/nand.c | 6 +-
cmd/nvedit.c | 128 +----------------
cmd/osd.c | 4 +-
cmd/pcap.c | 4 +-
cmd/pci.c | 6 +-
cmd/pci_mps.c | 6 +-
cmd/riscv/sbi.c | 7 +-
cmd/rng.c | 6 +-
cmd/sandbox/exception.c | 5 +-
cmd/scp03.c | 7 +-
cmd/sf.c | 8 +-
cmd/source.c | 9 +-
cmd/ti/pd.c | 10 +-
cmd/vbe.c | 6 +-
cmd/wdt.c | 4 +-
cmd/ximg.c | 6 +-
cmd/xxd.c | 6 +-
common/Kconfig | 5 +
common/Makefile | 3 +-
common/cli.c | 2 +
common/cli_getch.c | 1 +
common/log.c | 4 +-
common/menu.c | 40 ------
common/menu_key.c | 49 +++++++
drivers/fastboot/Kconfig | 1 +
drivers/video/Kconfig | 2 +-
drivers/video/console_truetype.c | 4 +
env/Makefile | 1 +
env/env_set.c | 132 ++++++++++++++++++
env/mmc.c | 2 +-
include/bootm.h | 15 +-
include/command.h | 3 +
include/env_internal.h | 23 +++
include/k210/pll.h | 2 +-
lib/efi_loader/Kconfig | 2 +
net/Kconfig | 1 +
test/Kconfig | 1 +
test/cmd_ut.c | 6 +-
test/fuzz/cmd_fuzz.c | 7 +-
test/py/tests/test_sandbox_opts.py | 20 +++
tools/buildman/builder.py | 2 +-
tools/buildman/builderthread.py | 6 +
tools/buildman/func_test.py | 4 +-
93 files changed, 462 insertions(+), 462 deletions(-)
create mode 100644 common/menu_key.c
create mode 100644 env/env_set.c
create mode 100644 test/py/tests/test_sandbox_opts.py
--
2.42.0.609.gbb76f46606-goog
next reply other threads:[~2023-10-07 23:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 23:12 Simon Glass [this message]
2023-10-07 23:12 ` [PATCH v2 01/27] command.h: Add a U_BOOT_LONGHELP macro Simon Glass
2023-10-07 23:12 ` [PATCH v2 02/27] cmd: Convert existing long help messages to the new macro Simon Glass
2023-10-07 23:12 ` [PATCH v2 03/27] buildman: Use oldconfig when adjusting the config Simon Glass
2023-10-07 23:12 ` [PATCH v2 04/27] bootstd: Correct dependencies on CMDLINE Simon Glass
2023-10-07 23:32 ` Tom Rini
2023-10-07 23:45 ` Simon Glass
2023-10-09 14:36 ` Tom Rini
2023-10-07 23:12 ` [PATCH v2 05/27] autoboot: " Simon Glass
2023-10-09 14:35 ` Tom Rini
2023-10-07 23:12 ` [PATCH v2 06/27] cmd: Add a few more " Simon Glass
2023-10-09 14:36 ` Tom Rini
2023-10-07 23:12 ` [PATCH v2 07/27] test: Make UNIT_TEST depend " Simon Glass
2023-10-09 14:36 ` Tom Rini
2023-10-07 23:12 ` [PATCH v2 08/27] sifive: Change #ifdef for nop Simon Glass
2023-10-09 14:36 ` Tom Rini
2023-10-07 23:12 ` [PATCH v2 09/27] fastboot: Declare a dependency on CMDLINE Simon Glass
2023-10-07 23:12 ` [PATCH v2 10/27] cli: Always build cli_getch Simon Glass
2023-10-07 23:12 ` [PATCH v2 11/27] cmd: Use an #ifdef around run_commandf() Simon Glass
2023-10-07 23:12 ` [PATCH v2 12/27] Move bootmenu_conv_key() into its own file Simon Glass
2023-10-07 23:12 ` [PATCH v2 13/27] pxe: Depend on CMDLINE Simon Glass
2023-10-07 23:12 ` [PATCH v2 14/27] env: Split out non-command code into a new file Simon Glass
2023-10-07 23:12 ` [PATCH v2 15/27] console: Move SYS_PBSIZE into common/ Simon Glass
2023-10-07 23:12 ` [PATCH v2 16/27] bootm: Allow building when cleanup functions are missing Simon Glass
2023-10-07 23:12 ` [PATCH v2 17/27] fdt: Move working_fdt into fdt_support Simon Glass
2023-10-07 23:12 ` [PATCH v2 18/27] net: Depend on CONFIG_CMDLINE Simon Glass
2023-10-07 23:12 ` [PATCH v2 19/27] log: Allow use without CONFIG_CMDLINE Simon Glass
2023-10-07 23:12 ` [PATCH v2 20/27] video: " Simon Glass
2023-10-07 23:12 ` [PATCH v2 21/27] video: Dont require the font command Simon Glass
2023-10-07 23:12 ` [PATCH v2 22/27] efi: Depend on CMDLINE for efi_loader Simon Glass
2023-10-10 4:48 ` AKASHI Takahiro
2023-10-07 23:12 ` [PATCH v2 23/27] cmd: Make all commands depend on CMDLINE Simon Glass
2023-10-07 23:12 ` [PATCH v2 24/27] sandbox: Avoid requiring cmdline Simon Glass
2023-10-07 23:12 ` [PATCH v2 25/27] arm: x86: Drop discarding of command linker-lists Simon Glass
2023-10-07 23:12 ` [PATCH v2 26/27] mmc: env: Unify the U_BOOT_ENV_LOCATION conditions Simon Glass
2023-10-07 23:12 ` [PATCH v2 27/27] sandbox: Add a test for disabling CONFIG_CMDLINE Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231007231255.277623-1-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=agust@denx.de \
--cc=albert.u.boot@aribaud.net \
--cc=bmeng.cn@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=joe.hershberger@ni.com \
--cc=peng.fan@nxp.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vanbaren@cideas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).