Skip to content

Adjust command macros to allow smaller U-Boot size

Tom Rini u-boot 1 version New

Get series with b4
b4 am 20140331183014.GX16360@bill-the-cat

Versions newest first

  1. v1 Latest0 of 6 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 6 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/6] Adjust command macros to allow smaller U-Boot size
Quoted 21 lines · Simon Glass

Hi Tom,

Quoted 17 lines · Tom Rini
Quoted 14 lines · Simon Glass

A large chunk of U-Boot's executable size is the code to process and execute commands. This is reasonable, since commands and scripts are an important part of U-Boot's feature set and provide much of its flexibility.

However, for some applications only a very limited set of commands is required. Where image size is important, it is desirable to be able to easily remove unwanted code.

This series introduces a new board_run_command() function which can be used to run a small subset of commands as required by the board (typically load and bootm), thus allowing the rest of the commands to be automatically and reliably dropped from the image using toolchain dead code elimination.

Quoted 8 lines
Quoted 3 lines

This is an interesting concept certainly. Can you also provide a non-trivial example here?

I have a very non-trivial example which is a lot of code, and calls things like the SPI layer and do_bootm(). That might be more than you want.

Would it help if I wrote a simple FDT-based boot to a kernel in a function?

How about both?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140331/7b3d8486/attachment.pgp>