public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/9] Add CONFIG_CMDLINE to allow removal of all commands
@ 2016-02-26  4:00 Simon Glass
  2016-02-26  4:00 ` [U-Boot] [PATCH 1/9] cbfs: Update a function to be static Simon Glass
                   ` (8 more replies)
  0 siblings, 9 replies; 31+ messages in thread
From: Simon Glass @ 2016-02-26  4:00 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.


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
  Hang 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] 31+ messages in thread

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

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-26  4:00 [U-Boot] [PATCH 0/9] Add CONFIG_CMDLINE to allow removal of all commands Simon Glass
2016-02-26  4:00 ` [U-Boot] [PATCH 1/9] cbfs: Update a function to be static Simon Glass
2016-02-26 17:16   ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 2/9] Add an option to enable the command line Simon Glass
2016-02-26 17:16   ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 3/9] arm: x86: Drop command-line code when CONFIG_CMDLINE is disabled Simon Glass
2016-02-26 17:16   ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 4/9] sandbox: Avoid calling commands when not available Simon Glass
2016-02-26 17:16   ` Tom Rini
2016-02-29 23:39   ` Stephen Warren
2016-03-03  0:25     ` Simon Glass
2016-03-03 16:58       ` Stephen Warren
2016-02-26  4:00 ` [U-Boot] [PATCH 5/9] Drop command-processing code when CONFIG_CMDLINE is disabled Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 6/9] Hang when no command line processing can be performed Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-26 17:31     ` Simon Glass
2016-02-26 17:45       ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 7/9] Allow command code to compile to nothing Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-29 23:40   ` Stephen Warren
2016-03-03  0:25     ` Simon Glass
2016-02-26  4:00 ` [U-Boot] [PATCH 8/9] Allow command-line files to be dropped Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-26 17:31     ` Simon Glass
2016-02-26  4:00 ` [U-Boot] [PATCH 9/9] Drop various features when the command line is not available Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-29 23:47   ` Stephen Warren
2016-02-29 23:56     ` Tom Rini
2016-03-03  0:25       ` Simon Glass
2016-03-03  0:58         ` Tom Rini

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