[U-Boot] [PATCH] fit: Do not automatically decompress ramdisk images

Rasmus Villemoes rasmus.villemoes at prevas.dk
Tue Feb 4 00:05:53 CET 2020


On 08/08/2019 05.16, Tom Rini wrote:
> On Fri, Aug 02, 2019 at 03:52:28PM -0700, Julius Werner wrote:
> 
>> The Linux ramdisk should always be decompressed by the kernel itself,
>> not by U-Boot. Therefore, the 'compression' node in the FIT image should
>> always be set to "none" for ramdisk images, since the only point of
>> using that node is if you want U-Boot to do the decompression itself.
>>
>> Yet some systems populate the node to the compression algorithm used by
>> the kernel instead. This used to be ignored, but now that we support
>> decompression of all image types it becomes a problem. Since ramdisks
>> should never be decompressed by U-Boot anyway, this patch adds a special
>> exception for them to avoid these issues. Still, setting the
>> 'compression' node like that is wrong in the first place, so we still
>> want to print out a warning so that third-party distributions doing this
>> can notice and fix it.
>>
>> Signed-off-by: Julius Werner <jwerner at chromium.org>
>> Reviewed-by: Heiko Schocher <hs at denx.de>
>> Tested-by: Heiko Schocher <hs at denx.de>
>> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>

This part

+	if (image_type == IH_TYPE_RAMDISK && comp != IH_COMP_NONE)
+		puts("WARNING: 'compression' nodes for ramdisks are deprecated,"
+		     " please fix your .its file!\n");
+

ends up being a little confusing, because when one dutifully removes the
compression = "foo" property, the warning is still there (because comp
ends up being (u8)-1) - the only way to silence it is by actually
_having_ a 'compression = "none"' property. (It also says node instead
of property).

So, what is the intention? Should ramdisk images not have a compression
property at all, or must it be present but set to "none", or are either
acceptable?

Rasmus


More information about the U-Boot mailing list