[U-Boot] [RFC 0/2] Add support for bootstrap stage and compressed U-Boot image
Luigi Mantellini
luigi.mantellini.ml at gmail.com
Sat Dec 4 12:12:52 CET 2010
Hi Shunya,
On Sat, Dec 4, 2010 at 3:32 AM, Shinya Kuribayashi <skuribay at pobox.com> wrote:
> Hi,
>
> On 11/30/2010 11:35 PM, Luigi 'Comio' Mantellini wrote:
>> Look the following benchmark (qemu-mips board):
>>
...
>> Bootstrap code using LZMA compression
>> 89456 bytes u-boot-bootstrap.bin
>> -->size 50% <-- BEST
>>
...
>
> Personally, I don't much care about the size of U-Boot bin itself
> (179kB or 104kB), but it depends. And I'd like to see how much boot
> time of U-Boot improved on your environment.
>
My target is to have a full-featured u-boot with size less than flash
sector (128K on my dev board).
In the best case (LZMA, but I also tried with XZ) I have just 16K/17K
of boot code and a payload u-boot image less than half of the original
size.
>> >> The following patches introduce the bootstrap support that enable to have a
>>> compressed U-Boot image. The bootstrap code supports the uncompressed as
>>> well as compressed payloads, using LZMA, GZIP, BZIP2 and LZO.
>>>
>>> Actually I developed just the mips version (using qemu-mips board)...
>>>
>>> Please see the Patch #1 for the required defines to enable the required
>>> features.
>
> Not having a closer look at the patch yet, some general comments:
>
> * Two patches posted, but contains multiple logical changes:
> - CONFIG_BOOTSTRAP* build infrastructure (main body)
I will separate into a (1) Generic bootstrap code, (2) and MIPS support.
I will send ASAP a new patchset that inclues also XZ format support (aka LZMA2)
> - common: Introduce console_bootstrap
> - MIPS: Separate _machine_restart() and do_reset() into reset.c
> - MIPS: config.mk: Append -g debug option to PLATFORM_CPPFLAGS,
> which is already provided by $(TOPDIR)/config.mk.
> - MIPS: qemu_mips: bootstrap support enablement (experimental)
>
> Please break into logical changes, please.
>
> * '_bootstrap' suffixed files are almost identical to the original
> ones:
> - arch/mips/cpu/reset{,_bootstrap}.c
I removed the "fprintf" from reset_bootstrap.c because the bootstrap
code haven't the generic dev io infrastructure. I would avoid also to
compile twice the same files in order to produce different .o files
(changing, for example, a define value).
> - arch/mips/cpu/start{,_bootstrap}.S
> - board/qemu-mips/u-boot{,_bootstrap}.lds
some here.
>
> Is there any way not to duplicate them? Do we really need to have
> _bootstrap files separated?
An Idea, that I don't like, should be to compile changing the CFLAGS
in order to produce different object files. Considering that bootstrap
code should be very small and stable I don't see big issues to have
different files.
>
> Once this bootstrap feature approved as general U-Boot feature, I'd
> like to take MIPS-related changes.
ok.
Thanks for your review.
luigi
>
> Thanks,
>
> Ralf
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
--
Luigi 'Comio' Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4
20068 Peschiera Borromeo (MI), Italy
Tel.: +39 02 5167 2813
Fax: +39 02 5167 2459
web: www.idf-hit.com
mail: luigi.mantellini at idf-hit.com
More information about the U-Boot
mailing list