public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v3 00/32] Tidy up use of CONFIG_CMDLINE
@ 2023-10-16 22:27 Simon Glass
  2023-10-16 22:27 ` [PATCH v3 01/32] buildman: Use oldconfig when adjusting the config Simon Glass
                   ` (31 more replies)
  0 siblings, 32 replies; 98+ messages in thread
From: Simon Glass @ 2023-10-16 22:27 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Simon Glass, Albert Aribaud, Anatolij Gustschin,
	Bin Meng, Jaehoon Chung, Jerry Van Baren, Joe Hershberger,
	Peng Fan

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 v3:
- Reword commit message slightly
- Add an explation as to why this patch is here
- Fix 'ut' typo
- Just drop the condition instead
- Add new patch to rearrange the Kconfig for CMD_BOOTEFI_BOOTMGR
- Add new patch with a Kconfig for command-line entry
- Add new patch with a Kconfig for command-line entry
- Reorder the Kconfig options a little
- Add new patch to tidy up semicolon after command macros
- Rebase on Tom's LONGHELP series
- Correct 'of' typo

Changes in v2:
- Move AUTOBOOT_USE_MENUKEY under AUTOBOOT
- Change this to use a Kconfig dependency instead of code failing
- Adjust the depends on the commands, instead of EFI_LOADER
- Add new patch to update EFI_LOADER to depend on DM_ETH
- Add new patch to drop discarding of command linker-lists
- Add new patch to unify the U_BOOT_ENV_LOCATION conditions

Simon Glass (32):
  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: Drop an unnecessary #ifdef
  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: Make commands depend on CMDLINE
  efi: Rearrange the Kconfig for CMD_BOOTEFI_BOOTMGR
  efi: Update EFI_LOADER to depend on DM_ETH
  cli: Split command-line-editing into its own file
  Add a new Kconfig for command-line entry
  Add a new Kconfig for command-line history
  sandbox: Disable CONFIG_DISTRO_DEFAULTS
  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
  treewide: Tidy up semicolon after command macros
  sandbox: Add a test for disabling CONFIG_CMDLINE

 arch/Kconfig                       |  11 +-
 arch/arm/cpu/u-boot.lds            |   3 -
 arch/arm/lib/bootm.c               |   2 +
 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/vid.c       |   2 +-
 board/xilinx/common/fru.c          |   2 +-
 board/xilinx/versal/cmds.c         |   2 +-
 board/xilinx/zynqmp/cmds.c         |   2 +-
 boot/Kconfig                       |  58 ++--
 boot/bootm.c                       |  10 +-
 boot/fdt_support.c                 |   5 +
 cmd/Kconfig                        |  50 ++--
 cmd/Makefile                       |   2 +-
 cmd/btrfs.c                        |   2 +-
 cmd/eeprom.c                       |   2 +-
 cmd/ext2.c                         |   4 +-
 cmd/fdt.c                          |   5 -
 cmd/fs.c                           |   8 +-
 cmd/nvedit.c                       | 122 +--------
 cmd/pinmux.c                       |   2 +-
 cmd/qfw.c                          |   2 +-
 common/Kconfig                     |  12 +
 common/Makefile                    |  10 +-
 common/cli.c                       |   2 +
 common/cli_cread.c                 | 407 +++++++++++++++++++++++++++++
 common/cli_getch.c                 |   1 +
 common/cli_readline.c              | 384 +--------------------------
 common/log.c                       |   4 +-
 common/menu.c                      |  40 ---
 common/menu_key.c                  |  49 ++++
 configs/sandbox64_defconfig        |   1 -
 configs/sandbox_defconfig          |   1 -
 configs/sandbox_flattree_defconfig |   1 -
 configs/sandbox_noinst_defconfig   |   1 -
 configs/sandbox_spl_defconfig      |   1 -
 configs/sandbox_vpl_defconfig      |   1 -
 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/cli.h                      |  31 +++
 include/command.h                  |   2 +-
 include/env_internal.h             |  23 ++
 include/k210/pll.h                 |   2 +-
 lib/efi_loader/Kconfig             |   7 +-
 lib/efi_loader/Makefile            |   2 +-
 net/Kconfig                        |   1 +
 test/Kconfig                       |   1 +
 test/py/tests/test_sandbox_opts.py |  20 ++
 tools/buildman/builder.py          |   2 +-
 tools/buildman/builderthread.py    |   6 +
 tools/buildman/func_test.py        |   4 +-
 57 files changed, 833 insertions(+), 648 deletions(-)
 create mode 100644 common/cli_cread.c
 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.655.g421f12c284-goog


^ permalink raw reply	[flat|nested] 98+ messages in thread

end of thread, other threads:[~2023-10-24 18:02 UTC | newest]

Thread overview: 98+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-16 22:27 [PATCH v3 00/32] Tidy up use of CONFIG_CMDLINE Simon Glass
2023-10-16 22:27 ` [PATCH v3 01/32] buildman: Use oldconfig when adjusting the config Simon Glass
2023-10-16 22:27 ` [PATCH v3 02/32] bootstd: Correct dependencies on CMDLINE Simon Glass
2023-10-17 13:32   ` Tom Rini
2023-10-18  3:30     ` Simon Glass
2023-10-18 13:25       ` Tom Rini
2023-10-18 14:42   ` Tom Rini
2023-10-18 15:25     ` Simon Glass
2023-10-16 22:27 ` [PATCH v3 03/32] autoboot: " Simon Glass
2023-10-16 22:27 ` [PATCH v3 04/32] cmd: Add a few more " Simon Glass
2023-10-17 13:32   ` Tom Rini
2023-10-18  3:30     ` Simon Glass
2023-10-18 12:56       ` Tom Rini
2023-10-18 13:14   ` Heinrich Schuchardt
2023-10-19 13:59     ` Simon Glass
2023-10-16 22:27 ` [PATCH v3 05/32] test: Make UNIT_TEST depend " Simon Glass
2023-10-16 22:27 ` [PATCH v3 06/32] sifive: Drop an unnecessary #ifdef Simon Glass
2023-10-18 13:51   ` Heinrich Schuchardt
2023-10-18 17:23     ` Sean Anderson
2023-10-18 23:57       ` Tom Rini
2023-10-16 22:27 ` [PATCH v3 07/32] fastboot: Declare a dependency on CMDLINE Simon Glass
2023-10-16 22:27 ` [PATCH v3 08/32] cli: Always build cli_getch Simon Glass
2023-10-16 22:28 ` [PATCH v3 09/32] cmd: Use an #ifdef around run_commandf() Simon Glass
2023-10-17 13:35   ` Tom Rini
2023-10-16 22:28 ` [PATCH v3 10/32] Move bootmenu_conv_key() into its own file Simon Glass
2023-10-16 22:28 ` [PATCH v3 11/32] pxe: Depend on CMDLINE Simon Glass
2023-10-16 22:28 ` [PATCH v3 12/32] env: Split out non-command code into a new file Simon Glass
2023-10-17 13:40   ` Tom Rini
2023-10-18  3:30     ` Simon Glass
2023-10-16 22:28 ` [PATCH v3 13/32] console: Move SYS_PBSIZE into common/ Simon Glass
2023-10-16 22:28 ` [PATCH v3 14/32] bootm: Allow building when cleanup functions are missing Simon Glass
2023-10-17 14:02   ` Tom Rini
2023-10-18  3:31     ` Simon Glass
2023-10-18 12:39       ` Tom Rini
2023-10-19 13:59         ` Simon Glass
2023-10-19 14:54           ` Tom Rini
2023-10-16 22:28 ` [PATCH v3 15/32] fdt: Move working_fdt into fdt_support Simon Glass
2023-10-16 22:28 ` [PATCH v3 16/32] net: Depend on CONFIG_CMDLINE Simon Glass
2023-10-17 14:03   ` Tom Rini
2023-10-18  3:31     ` Simon Glass
2023-10-16 22:28 ` [PATCH v3 17/32] log: Allow use without CONFIG_CMDLINE Simon Glass
2023-10-17 14:05   ` Tom Rini
2023-10-16 22:28 ` [PATCH v3 18/32] video: " Simon Glass
2023-10-17 14:07   ` Tom Rini
2023-10-18  3:31     ` Simon Glass
2023-10-18 12:40       ` Tom Rini
2023-10-16 22:28 ` [PATCH v3 19/32] video: Dont require the font command Simon Glass
2023-10-17 14:07   ` Tom Rini
2023-10-18  3:31     ` Simon Glass
2023-10-18 12:42       ` Tom Rini
2023-10-16 22:28 ` [PATCH v3 20/32] efi: Make commands depend on CMDLINE Simon Glass
2023-10-16 22:28 ` [PATCH v3 21/32] efi: Rearrange the Kconfig for CMD_BOOTEFI_BOOTMGR Simon Glass
2023-10-17  0:50   ` AKASHI Takahiro
2023-10-17 14:13   ` Tom Rini
2023-10-18  3:31     ` Simon Glass
2023-10-16 22:28 ` [PATCH v3 22/32] efi: Update EFI_LOADER to depend on DM_ETH Simon Glass
2023-10-17 14:09   ` Tom Rini
2023-10-18  3:31     ` Simon Glass
2023-10-18 12:43       ` Tom Rini
2023-10-18 12:55     ` Heinrich Schuchardt
2023-10-19 14:01       ` Simon Glass
2023-10-20  0:30         ` AKASHI Takahiro
2023-10-21 15:43           ` Simon Glass
2023-10-21 18:26             ` Tom Rini
2023-10-22  6:08               ` Heinrich Schuchardt
2023-10-22 14:29                 ` Tom Rini
2023-10-22 14:58                   ` Tom Rini
2023-10-22 21:55                     ` Simon Glass
2023-10-22 22:55                       ` Heinrich Schuchardt
2023-10-22 23:53                         ` Tom Rini
2023-10-22 23:45                       ` Tom Rini
2023-10-23  7:05                         ` Simon Glass
2023-10-23 13:16                           ` Tom Rini
2023-10-23 17:13                             ` Simon Glass
2023-10-23 17:45                               ` Tom Rini
2023-10-24 18:02                                 ` Simon Glass
2023-10-18 13:37   ` Tom Rini
2023-10-18 15:23     ` Simon Glass
2023-10-18 15:27       ` Tom Rini
2023-10-18 16:36         ` Simon Glass
2023-10-19 10:39       ` Peter Robinson
2023-10-19 13:39         ` Tom Rini
2023-10-19 14:01         ` Simon Glass
2023-10-16 22:28 ` [PATCH v3 23/32] cli: Split command-line-editing into its own file Simon Glass
2023-10-16 22:28 ` [PATCH v3 24/32] Add a new Kconfig for command-line entry Simon Glass
2023-10-16 22:28 ` [PATCH v3 25/32] Add a new Kconfig for command-line history Simon Glass
2023-10-16 22:28 ` [PATCH v3 26/32] sandbox: Disable CONFIG_DISTRO_DEFAULTS Simon Glass
2023-10-16 22:28 ` [PATCH v3 27/32] cmd: Make all commands depend on CMDLINE Simon Glass
2023-10-16 22:28 ` [PATCH v3 28/32] sandbox: Avoid requiring cmdline Simon Glass
2023-10-16 22:28 ` [PATCH v3 29/32] arm: x86: Drop discarding of command linker-lists Simon Glass
2023-10-16 22:28 ` [PATCH v3 30/32] mmc: env: Unify the U_BOOT_ENV_LOCATION conditions Simon Glass
2023-10-16 22:28 ` [PATCH v3 31/32] treewide: Tidy up semicolon after command macros Simon Glass
2023-10-16 22:28 ` [PATCH v3 32/32] sandbox: Add a test for disabling CONFIG_CMDLINE Simon Glass
2023-10-17 14:11   ` Tom Rini
2023-10-19  2:32   ` Tom Rini
2023-10-19 14:00     ` Simon Glass
2023-10-19 14:57       ` Tom Rini
2023-10-21 15:44         ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox