All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/9] Add CONFIG_CMDLINE to allow removal of all commands
@ 2016-03-14  1:07 Simon Glass
  2016-03-14  1:07 ` [U-Boot] [PATCH v2 1/9] cbfs: Update a function to be static Simon Glass
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Simon Glass @ 2016-03-14  1:07 UTC (permalink / raw)
  To: u-boot

A large chunk of the U-Boot code is its wide variety of commands. For some
applications this is not needed, since the boot can be controlled by a
board-specific hard-coded boot procedure.

Any attempt to use commands, such as running script, will result in an
error. U-Boot acts as if it supports commands in general, but there are no
actual commands to run.

This saves a significant amount of space.

For example on snow this saves 300KB of code space, with the code size
dropping from 505KB to 202KB. BSS drops from 238KB to 4KB. The size of
u-boot.bin (which includes the device tree) drops from 541KB to 228KB.

If LCD and USB support is disabled on this platform, code size drops to
139KB.

This makes U-Boot proper look a little more like SPL in terms of size.

The CONFIG_CMDLINE setting is enabled by default, but can be disabled by
boards as needed.

Note: I hopefully have addressed the comments on v1. I've run the series
through buildman to check for bisectability.

Changes in v2:
- Move the board_run_command() prototype into this patch
- Use panic() instead of hang()

Simon Glass (9):
  cbfs: Update a function to be static
  Add an option to enable the command line
  arm: x86: Drop command-line code when CONFIG_CMDLINE is disabled
  sandbox: Avoid calling commands when not available
  Drop command-processing code when CONFIG_CMDLINE is disabled
  Panic when no command line processing can be performed
  Allow command code to compile to nothing
  Allow command-line files to be dropped
  Drop various features when the command line is not available

 README                     |  8 ++++++++
 arch/arm/cpu/u-boot.lds    |  3 +++
 arch/sandbox/cpu/start.c   | 10 +++++++++-
 arch/x86/cpu/u-boot.lds    |  4 ++++
 cmd/Kconfig                | 12 ++++++++++++
 cmd/cbfs.c                 | 12 ++++++++----
 cmd/help.c                 |  4 ++++
 common/Makefile            |  4 ++--
 common/cli.c               | 17 +++++++++++++++-
 common/command.c           |  6 ++++++
 common/main.c              |  1 +
 include/command.h          | 49 ++++++++++++++++++++++++++++++++++++++++++----
 include/config_fallbacks.h | 10 ++++++++++
 13 files changed, 128 insertions(+), 12 deletions(-)

-- 
2.7.0.rc3.207.g0ac5344

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

end of thread, other threads:[~2016-03-23  1:58 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-14  1:07 [U-Boot] [PATCH v2 0/9] Add CONFIG_CMDLINE to allow removal of all commands Simon Glass
2016-03-14  1:07 ` [U-Boot] [PATCH v2 1/9] cbfs: Update a function to be static Simon Glass
2016-03-23  1:58   ` [U-Boot] [U-Boot,v2,1/9] " Tom Rini
2016-03-14  1:07 ` [U-Boot] [PATCH v2 2/9] Add an option to enable the command line Simon Glass
2016-03-23  1:58   ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-03-14  1:07 ` [U-Boot] [PATCH v2 3/9] arm: x86: Drop command-line code when CONFIG_CMDLINE is disabled Simon Glass
2016-03-23  1:58   ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-03-14  1:07 ` [U-Boot] [PATCH v2 4/9] sandbox: Avoid calling commands when not available Simon Glass
2016-03-23  1:58   ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-03-14  1:07 ` [U-Boot] [PATCH v2 5/9] Drop command-processing code when CONFIG_CMDLINE is disabled Simon Glass
2016-03-14 15:25   ` Tom Rini
2016-03-14  1:07 ` [U-Boot] [PATCH v2 6/9] Panic when no command line processing can be performed Simon Glass
2016-03-14 15:25   ` Tom Rini
2016-03-23  1:58   ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-03-14  1:07 ` [U-Boot] [PATCH v2 7/9] Allow command code to compile to nothing Simon Glass
2016-03-23  1:58   ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-03-14  1:07 ` [U-Boot] [PATCH v2 8/9] Allow command-line files to be dropped Simon Glass
2016-03-23  1:58   ` [U-Boot] [U-Boot, v2, " Tom Rini
2016-03-14  1:07 ` [U-Boot] [PATCH v2 9/9] Drop various features when the command line is not available Simon Glass
2016-03-23  1:58   ` [U-Boot] [U-Boot, v2, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.