public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] help -  u-boot header & compression
Date: Thu, 03 Apr 2008 00:12:43 +0200	[thread overview]
Message-ID: <1207174363.3671.58.camel@cassini.comioland> (raw)
In-Reply-To: <393980.79147.qm@web39503.mail.mud.yahoo.com>


Il giorno mer, 02/04/2008 alle 14.57 -0700, Avinash Vijayvergia ha
scritto:
> Hi Luigi
> 
> Thank you for your mail and comments. I should have explain why I want
> to compress u-boot. My target processor is Atmel AT91SAM9260. I am
> having a 64Mb Dataflash which is interfaced on SPI bus. The Atmel ARM9
> copies the first 4kB to internal SRAM and then boots from there. So we
> need a loader of size <4kb which will be copied to SRAM. I have got
> this loader. This loader will invoke u-boot, and u-boot will invoke
> kernel. So I can compress loader and it will still work.
> 
> I'll compare nrv2b and lzma and then will be in a better position to
> comment. I chose nrv2b because I need a compression algo which can be
> as small as 600B (I have size restriction of 4kB).
> 


Ok. Now I understand the problem. U-boot is a pure binary file, you need
to compile it fixing the TEXT_BASE address in order to fit your RAM.
Your "pre-bootloader" should setup the ram and the dataflash in order to
decompress/copy u-boot (vetctors+text+data) from the dataflash space
addresses to the ram addresses. After the copy/decompress just jump to
u-boot address. To achieve this you needn't to know the u-boot header
structure.
You should analyze the board/atmel/at91rm9200dk/u-boot.lds and
cpu/arm920t/start.S files  to understand how u-boot works (at
initialization time).

Best regards,

luigi



> Thanks
> Avinash
> 
> 
> ----- Original Message ----
> From: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
> To: Avinash Vijayvergia <avinashs36@yahoo.com>
> Cc: u-boot-users at lists.sourceforge.net
> Sent: Wednesday, April 2, 2008 2:37:20 PM
> Subject: Re: [U-Boot-Users] help - u-boot header & compression
> 
> Hi Avinash,
> 
> see inline.
> 
> Il giorno mer, 02/04/2008 alle 14.26 -0700, Avinash Vijayvergia ha
> scritto: 
> 
> > Hi LuigI
> > 
> 
> 
> 
> > Thank you for your mail. I actually have two questions: 
> >      1. What is the format of u-boot header? Can you refer me to
> >         some documentation? 
> 
> 
> What do you intend for "u-boot header"? U-boot uses the uImage format
> for the kernels images. You can check the file include/image.h (row
> 175) to understand the (old) uImage format. See this link: 
> http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/image.h;h=36143e25acfe3684a751a4ee6a5cf945524ef424;hb=74d1e66d22dac91388bc538b2fe19f735edc5b82
> 
> 
> 
> 
> >      1. I want to compress u-boot. I have picked up nrv2b.c from
> >         Koders.com which is in use by many people :). I couldn't
> >         understand how it does encoding and decoding. I wanted to
> >         use this algo and do compression and decompression of my
> >         binaries. You can search google for nrv2b.c and you will get
> >         it from Koder.com. 
> 
> 
> U-boot is the object code, the bootloader... how can you compress it?
> it is a non-sense for me. Anyway, if you need to compress the kernel
> image, you need to use the uImage format and the utility mkimage (see
> tools directory). I recently posted a patch to support the lzma
> compression algorithm (that works better than bzip2 and gzip): you can
> search in the mailing list archive to retrieve this patch.
> 
> Are you sure that nrv2b is better than powerful lzma or bzip2? Do you
> have benchmarks on this point? If you demonstrate me that nrv2b is a
> good choice I can consider to make the patch for the community... I
> have an application that has a very small flash memory... nrv2b should
> be a choice...
> 
> Best regards,
> 
> luigi
> 
> 
> > Thanks for your help
> > Avinash
> > 
> > ----- Original Message ----
> > From: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
> > To: Avinash Vijayvergia <avinashs36@yahoo.com>
> > Cc: u-boot-users at lists.sourceforge.net
> > Sent: Wednesday, April 2, 2008 2:19:36 PM
> > Subject: Re: [U-Boot-Users] help - u-boot header & compression
> > 
> > Hi Avinash,
> > 
> > I'm not undestanding if you want compress the U-Boot code or if you
> > want compress the uImage image.
> > Anyway, I don't know the nrv2b algorithm, can you give me any links?
> > 
> > thanks,
> > 
> > luigi
> > 
> > Il giorno mer, 02/04/2008 alle 13.54 -0700, Avinash Vijayvergia ha
> > scritto: 
> > 
> > > Hi All
> > > 
> > > I am working on AT91SAM9260 ARM9 core. I have very small flash
> > > memory and hence need to compress the u-boot. I have picked nrv2b
> > > algo for that. Can someone suggest me how to put the compression
> > > info in the u-boot header. I want to know the details of u-boot
> > > header too.
> > > 
> > > Thanks
> > > Avinash
> > > 
> > > 
> > > __________________________________________________________________
> > > 
> > > 
> > > You rock. That's why Blockbuster's offering you one month of
> > > Blockbuster Total Access, No Cost. 
> > > 
> > > -------------------------------------------------------------------------
> > > Check out the new SourceForge.net Marketplace.
> > > It's the best place to buy or sell services for
> > > just about anything Open Source.
> > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > > _______________________________________________ U-Boot-Users mailing list U-Boot-Users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
> > 
> > 
> > 
> > Ing. Luigi Mantellini
> > Industrie Dial Face S.p.A.
> > Via Canzo, 4 
> > 20068 Peschiera Borromeo (MI)
> > Tel.: +39 02 5167 2813
> > Fax: +39 02 5167 2459
> > E-mail:
> > luigi.mantellini at idf-hit.com
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > ____________________________________________________________________
> > 
> > You rock. That's why Blockbuster's offering you one month of
> > Blockbuster Total Access, No Cost.
> 
> 
> Ing. Luigi Mantellini
> Industrie Dial Face S.p.A.
> Via Canzo, 4 
> 20068 Peschiera Borromeo (MI)
> Tel.: +39 02 5167 2813
> Fax: +39 02 5167 2459
> E-mail:
> luigi.mantellini at idf-hit.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ______________________________________________________________________
> You rock. That's why Blockbuster's offering you one month of
> Blockbuster Total Access, No Cost.


Ing. Luigi Mantellini
Industrie Dial Face S.p.A.
Via Canzo, 4 
20068 Peschiera Borromeo (MI)
Tel.: +39 02 5167 2813
Fax: +39 02 5167 2459
E-mail: luigi.mantellini at idf-hit.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080403/a25b9368/attachment.htm 

  reply	other threads:[~2008-04-02 22:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-02 21:57 [U-Boot-Users] help - u-boot header & compression Avinash Vijayvergia
2008-04-02 22:12 ` Luigi 'Comio' Mantellini [this message]
     [not found] <388357.2045.qm@web39507.mail.mud.yahoo.com>
2008-04-02 21:37 ` Luigi 'Comio' Mantellini
2008-04-03  8:37 ` Luigi 'Comio' Mantellini
  -- strict thread matches above, loose matches on Subject: below --
2008-04-02 20:54 Avinash Vijayvergia
2008-04-02 21:19 ` Luigi 'Comio' Mantellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1207174363.3671.58.camel@cassini.comioland \
    --to=luigi.mantellini@idf-hit.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox