[prev in list] [next in list] [prev in thread] [next in thread]
List: u-boot
Subject: Re: [U-Boot] [PATCH 0/6] Adjust command macros to allow smaller U-Boot size
From: Simon Glass <sjg () chromium ! org>
Date: 2014-03-31 19:30:22
Message-ID: CAPnjgZ3P3mLBbYbuG1=KHUcBbUvwt_jPCDeo1TRqzT1aw2eL2w () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi Tom,
On 31 March 2014 12:59, Tom Rini <trini@ti.com> wrote:
> On Mon, Mar 31, 2014 at 12:38:20PM -0600, Simon Glass wrote:
> > Hi Tom,
> >
> > On 31 March 2014 12:30, Tom Rini <trini@ti.com> wrote:
> >
> > > On Mon, Mar 24, 2014 at 09:51:05AM -0600, Simon Glass wrote:
> > >
> > > > 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.
> > >
> > > 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?
>
For the first case, here is a commit that adds a function
https://chromium.googlesource.com/chromiumos/third_party/u-boot/+/b9e8864294d8f2143ce17b4e0d4ba019b6348199
For example, this code set up and boots a kernel:
https://chromium.googlesource.com/chromiumos/third_party/u-boot/+/b9e8864294d8f2143ce17b4e0d4ba019b6348199/cros/lib/readwrite.c
and this code deals with checking for a second-stage read-write U-Boot to
run:
https://chromium.googlesource.com/chromiumos/third_party/u-boot/+/b9e8864294d8f2143ce17b4e0d4ba019b6348199/cros/lib/readonly.c
Does that help?
For the second case, I can write something.
Regards,
Simon
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic