[U-Boot] fit image: boot gzipped ramdisk does not work anymore

Heiko Schocher hs at denx.de
Thu Aug 1 08:06:41 UTC 2019


Hello Julius,

since your commit (just gone into mainline):

b1307f884a91 ("fit: Support compression for non-kernel components (e.g. FDT)")

I see on an imx6ull based board when booting (FIT image with kernel, dtb
and initramdisk), fit image source created from yocto, see [1]:

## Loading kernel from FIT Image at 84000000 ...
    Using 'conf at imx6ull-k30rf.dtb' configuration
    Trying 'kernel at 1' kernel subimage
      Description:  Linux kernel
      Type:         Kernel Image
      Compression:  uncompressed
      Data Start:   0x840000e8
      Data Size:    5154568 Bytes = 4.9 MiB
      Architecture: ARM
      OS:           Linux
      Load Address: 0x82000000
      Entry Point:  0x82000000
      Hash algo:    sha1
      Hash value:   a3ba8a09b197c0d1acab834c69c5aea677d4a092
    Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 84000000 ...
    Using 'conf at imx6ull-k30rf.dtb' configuration
    Trying 'ramdisk at 1' ramdisk subimage
      Description:  k30rf-image-initramfs
      Type:         RAMDisk Image
      Compression:  gzip compressed
      Data Start:   0x844f0cf8
      Data Size:    6769496 Bytes = 6.5 MiB
      Architecture: ARM
      OS:           Linux
      Load Address: unavailable
      Entry Point:  unavailable
      Hash algo:    sha1
      Hash value:   507d8b20b18f9bca0e9178c48f634df5da720f65
    Verifying Hash Integrity ... sha1+ OK
    Uncompressing RAMDisk Image
Error: Bad gzipped data
Error decompressing ramdisk
Ramdisk image is corrupt or invalid
=>

I found your commit with "git bisect":

hs at xmglap:u-boot  [(kein Branch, binäre Suche begonnen bei master)] $ git bisect good
b1307f884a913f52a201491053b6d221c4204f60 is the first bad commit
commit b1307f884a913f52a201491053b6d221c4204f60
Author: Julius Werner <jwerner at chromium.org>
Date:   Wed Jul 24 19:37:55 2019 -0700

     fit: Support compression for non-kernel components (e.g. FDT)

     This patch adds support for compressing non-kernel image nodes in a FIT
     image (kernel nodes could already be compressed previously). This can
     reduce the size of FIT images and therefore improve boot times
     (especially when an image bundles many different kernel FDTs). The
     images will automatically be decompressed on load.

     This patch does not support extracting compatible strings from
     compressed FDTs, so it's not very helpful in conjunction with
     CONFIG_FIT_BEST_MATCH yet, but it can already be used in environments
     that select the configuration to load explicitly.

     Signed-off-by: Julius Werner <jwerner at chromium.org>
     Reviewed-by: Simon Glass <sjg at chromium.org>
     Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>

:040000 040000 6280a41241c1c25a28845fa526c5c958e448e347 e3f8ed43853541f868676f077924e7ab242d4da6 M 
    common
:040000 040000 406b0c50c03633bad9d4a576d5662f4fa483fc6f 601624cee600c1c06640858519d93188cc312544 M 
    test
hs at xmglap:u-boot  [(kein Branch, binäre Suche begonnen bei master)] $ git bisect log
git bisect start
# bad: [bbaf56eda0e63d6d28fbccae0f112ef88203eb4d] Merge tag 'u-boot-amlogic-20190731' of 
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic
git bisect bad bbaf56eda0e63d6d28fbccae0f112ef88203eb4d
# good: [a9aa4c5700c68c070d63a391b51ea8d341b6e8a6] Merge branch '2019-07-24-master-imports'
git bisect good a9aa4c5700c68c070d63a391b51ea8d341b6e8a6
# good: [75551c8bfc9545e31ec2ce238cac3857904007b8] Merge branch '2019-07-26-ti-imports'
git bisect good 75551c8bfc9545e31ec2ce238cac3857904007b8
# bad: [333755ef7b6f824366eed37ae068c20a4f25a123] Merge branch '2019-07-29-ti-imports'
git bisect bad 333755ef7b6f824366eed37ae068c20a4f25a123
# good: [26008cd42b590dc71ee9c1ca667a218542aab342] rockchip: rv1108: Migrate to use common board file
git bisect good 26008cd42b590dc71ee9c1ca667a218542aab342
# good: [92430b8fc8aac3b4ab92e9ca8a09d83c4788c609] Merge 
https://gitlab.denx.de/u-boot/custodians/u-boot-socfpga
git bisect good 92430b8fc8aac3b4ab92e9ca8a09d83c4788c609
# bad: [2d64a0f7e952f54375702fb2b854461e402ded9d] Merge branch '2019-07-29-master-imports'
git bisect bad 2d64a0f7e952f54375702fb2b854461e402ded9d
# bad: [49b10cb4926285b856b207c1f5bb40c75487f08b] gpio: fixes for gpio-hog support
git bisect bad 49b10cb4926285b856b207c1f5bb40c75487f08b
# bad: [e35d533c79c75e9ad68a2e78da52c8ce58e6ce0d] tools/logos: remove black background of U-Boot logo
git bisect bad e35d533c79c75e9ad68a2e78da52c8ce58e6ce0d
# bad: [b1307f884a913f52a201491053b6d221c4204f60] fit: Support compression for non-kernel components 
(e.g. FDT)
git bisect bad b1307f884a913f52a201491053b6d221c4204f60
# good: [2090854cd2f228bab546f2718ccdbe1664830d3c] common: Move bootm_decomp_image() to image.c (as 
image_decomp())
git bisect good 2090854cd2f228bab546f2718ccdbe1664830d3c
# first bad commit: [b1307f884a913f52a201491053b6d221c4204f60] fit: Support compression for 
non-kernel components (e.g. FDT)
hs at xmglap:u-boot  [(kein Branch, binäre Suche begonnen bei master)] $

base was current master:
*   bbaf56eda0 - Merge tag 'u-boot-amlogic-20190731' of 
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic


I am currently not in my office to dig deeper into it ... may you have an idea?

Thanks!

bye,
Heiko

[1] fit image source (created from yocto)
/dts-v1/;

/ {
         description = "U-Boot fitImage for Poky (Yocto Project Reference Distro)/4.19.59/k30rf";
         #address-cells = <1>;

         images {
[...]
                 ramdisk at 1 {
                         description = "k30rf-image-initramfs";
                         data = 
/incbin/("/work/hs/tbot2go/k30rf/repo/k30rf/build_k30rf/tmp/deploy/images/k30rf/k30rf-image-initramfs-k30rf.cpio.gz");
                         type = "ramdisk";
                         arch = "arm";
                         os = "linux";
                         compression = "gzip";


-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list