<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hi Luigi<br><br>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.<br><br>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).<br><br>Thanks<br>Avinash<br><br><div
style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com><br>To: Avinash Vijayvergia <avinashs36@yahoo.com><br>Cc: u-boot-users@lists.sourceforge.net<br>Sent: Wednesday, April 2, 2008 2:37:20 PM<br>Subject: Re: [U-Boot-Users] help - u-boot header & compression<br><br>
Hi Avinash,<br>
<br>
see inline.<br>
<br>
Il giorno mer, 02/04/2008 alle 14.26 -0700, Avinash Vijayvergia ha scritto:
<blockquote type="CITE">
<font color="#000000">Hi Luig</font><b>I</b><br>
<br>
</blockquote>
<br>
<blockquote type="CITE">
<font color="#000000">Thank you for your mail. I actually have two questions:</font>
<ol type="1">
<li value="1"><font color="#000000">What is the format of u-boot header? Can you refer me to some documentation?</font>
</li></ol>
</blockquote>
<br>
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: <br>
<a rel="nofollow" target="_blank" href="http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/image.h;h=36143e25acfe3684a751a4ee6a5cf945524ef424;hb=74d1e66d22dac91388bc538b2fe19f735edc5b82">http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/image.h;h=36143e25acfe3684a751a4ee6a5cf945524ef424;hb=74d1e66d22dac91388bc538b2fe19f735edc5b82</a><br>
<br>
<br>
<br>
<blockquote type="CITE">
<ol type="1">
<li value="1"><font color="#000000">I want to compress u-boot. I have picked up nrv2b.c from <a target="_blank" href="http://Koders.com">Koders.com</a> 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 <a target="_blank" href="http://Koder.com">Koder.com</a>.</font>
</li></ol>
</blockquote>
<br>
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.<br>
<br>
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...<br>
<br>
Best regards,<br>
<br>
luigi<br>
<br>
<blockquote type="CITE">
<font color="#000000">Thanks for your help</font><br>
<font color="#000000">Avinash</font><br>
<br>
</blockquote>
<blockquote type="CITE">
<font color="#000000">----- Original Message ----</font><br>
<font color="#000000">From: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com></font><br>
<font color="#000000">To: Avinash Vijayvergia <avinashs36@yahoo.com></font><br>
<font color="#000000">Cc: u-boot-users@lists.sourceforge.net</font><br>
<font color="#000000">Sent: Wednesday, April 2, 2008 2:19:36 PM</font><br>
<font color="#000000">Subject: Re: [U-Boot-Users] help - u-boot header & compression</font><br>
<br>
<font color="#000000">Hi Avinash,</font><br>
<br>
<font color="#000000">I'm not undestanding if you want compress the U-Boot code or if you want compress the uImage image.</font><br>
<font color="#000000">Anyway, I don't know the nrv2b algorithm, can you give me any links?</font><br>
<br>
<font color="#000000">thanks,</font><br>
<br>
<font color="#000000">luigi</font><br>
<br>
<font color="#000000">Il giorno mer, 02/04/2008 alle 13.54 -0700, Avinash Vijayvergia ha scritto: </font><br>
<blockquote type="CITE">
<font color="#000000">Hi All</font><br>
<br>
<font color="#000000">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.</font><br>
<br>
<font color="#000000">Thanks</font><br>
<font color="#000000">Avinash</font><br>
<br>
<hr size="1">
<br>
<br>
<font color="#000000">You rock. That's why Blockbuster's offering you <a rel="nofollow" target="_blank" href="http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com">one month of Blockbuster Total Access</a>, No Cost. </font>
<pre><font color="#000000">-------------------------------------------------------------------------</font><br><font color="#000000">Check out the new <a rel="nofollow" target="_blank" href="http://SourceForge.net">SourceForge.net</a> Marketplace.</font><br><font color="#000000">It's the best place to buy or sell services for</font><br><font color="#000000">just about anything Open Source.</font><br><font color="#000000"><a rel="nofollow" target="_blank" href="http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace">http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace</a></font><br><font color="#000000">_______________________________________________ U-Boot-Users mailing list <a rel="nofollow" ymailto="mailto:U-Boot-Users@lists.sourceforge.net" target="_blank" href="mailto:U-Boot-Users@lists.sourceforge.net">U-Boot-Users@lists.sourceforge.net</a> <a rel="nofollow" target="_blank"
href="https://lists.sourceforge.net/lists/listinfo/u-boot-users">https://lists.sourceforge.net/lists/listinfo/u-boot-users</a></font>
</pre>
</blockquote>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td>
<table cellpadding="0" cellspacing="9">
<tbody><tr>
<td>
<br>
</td>
<td>
<b>Ing. Luigi Mantellini</b><br>
Industrie Dial Face S.p.A.<br>
Via Canzo, 4 <br>
20068 Peschiera Borromeo (MI)<br>
Tel.: +39 02 5167 2813<br>
Fax: +39 02 5167 2459<br>
E-mail: <a rel="nofollow" ymailto="mailto:luigi.mantellini@idf-hit.com" target="_blank" href="mailto:luigi.mantellini@idf-hit.com">luigi.mantellini@idf-hit.com</a>
</td>
</tr>
</tbody></table>
<br>
<br>
<br>
</td>
</tr>
</tbody></table>
</blockquote>
<blockquote type="CITE">
<br>
<br>
</blockquote>
<blockquote type="CITE">
<br>
<hr size="1">
<br>
<font color="#000000">You rock. That's why Blockbuster's offering you <a rel="nofollow" target="_blank" href="http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com">one month of Blockbuster Total Access</a>, No Cost.</font><br>
</blockquote>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td>
<table cellpadding="0" cellspacing="9">
<tbody><tr>
<td>
<a rel="nofollow" target="_blank" href="http://www.idf-hit.com"><img align="bottom" border="0"></a>
</td>
<td>
<b>Ing. Luigi Mantellini</b><br>
Industrie Dial Face S.p.A.<br>
Via Canzo, 4 <br>
20068 Peschiera Borromeo (MI)<br>
Tel.: +39 02 5167 2813<br>
Fax: +39 02 5167 2459<br>
E-mail: <a rel="nofollow" ymailto="mailto:luigi.mantellini@idf-hit.com" target="_blank" href="mailto:luigi.mantellini@idf-hit.com">luigi.mantellini@idf-hit.com</a>
</td>
</tr>
</tbody></table>
<br>
<br>
</td>
</tr>
</tbody></table>
</div><br></div></div><br>
<hr size=1>You rock. That's why Blockbuster's offering you <a href="http://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com">one month of Blockbuster Total Access</a>, No Cost.</body></html>