Welcome! Log In Create A New Profile

Advanced

U-Boot loading compressed uImage

Posted by ricke 
U-Boot loading compressed uImage
December 13, 2013 02:46PM
What compression does u-boot 2013.11 support for uImage if any?, i tried lzma2 and it didn't boot.



Edited 1 time(s). Last edit at 12/13/2013 02:48PM by ricke.
Re: U-Boot loading compressed uImage
December 13, 2013 04:32PM
ricke Wrote:
-------------------------------------------------------
> What compression does u-boot 2013.11 support for
> uImage if any?, i tried lzma2 and it didn't boot.
I dont think 2013.11 has been released yet! Which uBoot are you running?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot loading compressed uImage
December 14, 2013 05:34PM
bodhi Wrote:
-------------------------------------------------------
> I dont think 2013.11 has been released yet! Which
> uBoot are you running?


Yes sorry, its 2013.10. How can i find out what compressed formats it supports for uImage?



Edited 1 time(s). Last edit at 12/14/2013 05:35PM by ricke.
Re: U-Boot loading compressed uImage
December 14, 2013 06:07PM
An interesting question at that point is:
What file do you use as a basis for creating the Uboot uImage?
I'm asking this, because most of the time, it's zImage for example, which is already compressed. Trying to recompress that doesn't gain much. So, creating the uImage with the compression option "none" could yield the exactly same results (worst case) as using a specific compression setting there.
Possible conclusion:
Maybe it's an option to use a XZ-compressed zImage and a Uboot uImage compression setting of "none". Just as an example! This way UBoot doesn't have to do any decompression, but the kernel uses its own algorithms to decompress its content into RAM.
Re: U-Boot loading compressed uImage
December 14, 2013 06:38PM
Thank you Ingemar, I'll try doing a xz compressed zImage instead of compressed uImage wich does not seem to be supported by u-boot. I was using vmlinuz as base for uImage so it should not already be compressed?



Edited 2 time(s). Last edit at 12/14/2013 06:45PM by ricke.
Re: U-Boot loading compressed uImage
December 17, 2013 09:02AM
Arch Linux uses an lzma compressed zImage to make the uImage, as the performance has come out on top.
Re: U-Boot loading compressed uImage
December 18, 2013 09:04AM
@ricke:
Vmlinuz should indicate the use of a compression algorithm. I would guess gzip, but you should be able to find out exactly with the help of some tools. "file" perhaps?

@WarheadsSE:
Thank you for the useful information!
I didn't do extensive tests yet and just used xz as an example above.
One thing, though:
Isn't there special ARM-asm code for some selected compression algorithms in recent kernel sources?
Could be interesting to see the influence of that code, in comparison to the default.
Re: U-Boot loading compressed uImage
December 18, 2013 12:07PM
@ingmar_k :
Yes, there is. That information should be searchable on the net. google "linux kernel arm compression" although I need to check the compression algorithm again. I think we changed it a bit ago.



Edited 1 time(s). Last edit at 12/18/2013 12:09PM by WarheadsSE.
Re: U-Boot loading compressed uImage
February 08, 2018 04:38AM
LZMA2 is faster for 4-threads, if you compress big file (more than 256 MB), so 7-Zip will be able to split it to blocks. LZMA2 was created for XZ format and it includes changes that are good for that stream compression format. Also LZMA2 is better than LZMA, if you compress already compressed data. LZMA decoder is simple. But PPMd decoder is complex. So now I don't like the idea of PPMd / LZMA mixing.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: