[U-Boot] Question about FIT images with uboot 1.3.4

Remy Bohmer linux at bohmer.net
Sun Aug 24 10:28:05 CEST 2008


Hello Grant,

Thanks for your answer.
Apparently I used the right version of the dtc tool already, because
you have it working...

>    Fit image detected...
> ....
>         Architecture: PowerPC
>         OS:           Linux
>         Architecture: PowerPC
>         Hash algo:    crc32

I notice that you use FIT images on powerpc (probably just like everybody else).
I want to use it on ARM. Maybe you have seen it working on ARM once?

I know the image itself is correct. mkimage -l shows correct
information, but when copied to the target, the target detects a FIT
header but complains that it cannot find the description section.
Legacy images work properly.
Tomorrow I will hook up the debugger and get this problem tackled.

Kind Regards,

Remy


2008/8/23 Grant Erickson <gerickson at nuovations.com>:
> On 8/23/08 3:31 AM, Remy Bohmer wrote:
>> Which version of DTC must be used to get a working FIT image?
>> Release 1.2.0 understands the example doc/uImage.FIT/kernel.its, but
>> delivers an unbootable image. It fails on line 2285 ("Wrong FIT
>> format: no description\n") in common/image.c at
>>
>> int fit_check_format (const void *fit)
>> {
>>        /* mandatory / node 'description' property */
>>        if (fdt_getprop (fit, 0, FIT_DESC_PROP, NULL) == NULL) {
>>                debug ("Wrong FIT format: no description\n");
>>                return 0;
>>        }
>>
>> Version 1.1.0 of DTC complains about the format of the
>> doc/uImage.FIT/kernel.its file at the line:
>> data = /incbin/("./vmlinux.bin.gz");
>>
>> So, at this moment FIT does not work at all...
>>
>> So, does anybody knows what I need to do to get FIT images working on 1.3.4 ?
>> (Except debugging and patching the bug, which I can do later on when I
>> at least have something working to begin with)
>
> Remy:
>
> An unpatched v1.1.0 of DTC will not work since it does not understand the
> '/incbin/' grammar. You'll need to either patch v1.1.0 or, better yet, just
> grab v1.2.0 from http://www.jdl.com/software/dtc-v1.2.0.tgz.
>
> While I cannot speak to v1.3.4, I've had this successfully working for
> several months now against u-boot v1.3.3 with both a patched v1.1.0 of DTC
> to allow binary includes as well as with the aforementioned release v1.2.0
> of DTC:
>
>    % make
>    ${BuildRoot}/src/tools/host/i686-pc-linux-gnu/bin/dtc -b 0 -S 0x3000 -I
> dts -O dtb -o
> ${BuildRoot}/src/results/haleakala/denx/eldk/4.1/boot/haleakala.dtb
> ${BuildRoot}/src/results/haleakala/denx/eldk/4.1/linux/haleakala.dts
>    DTC: dts->dtb  on file
> "${BuildRoot}/src/results/haleakala/denx/eldk/4.1/linux/haleakala.dts"
>    Translating (ppc_4xx-objcopy denx/eldk/4.1)
> "${BuildRoot}/src/results/haleakala/denx/eldk/4.1/linux/vmlinux"
>    ${ToolRoot}/eldk/4.1/usr/bin/ppc_4xx-objcopy -O binary
> ${BuildRoot}/src/results/haleakala/denx/eldk/4.1/linux/vmlinux
> build/haleakala/denx/eldk/4.1/vmlinux.bin
>    Compressing (gzip) "build/haleakala/denx/eldk/4.1/vmlinux.bin"
>    gzip -f -9 -c build/haleakala/denx/eldk/4.1/vmlinux.bin >
> ${BuildRoot}/src/results/haleakala/denx/eldk/4.1/boot/vmlinux.bin.gz
>    sed \
>        -e s, at ARCH@,powerpc,g \
>        -e
> s, at FDT@,${BuildRoot}/src/results/haleakala/denx/eldk/4.1/boot/haleakala.dtb,
> g \
>        -e
> s, at KERNEL@,${BuildRoot}/src/results/haleakala/denx/eldk/4.1/boot/vmlinux.bin
> .gz,g \
>        -e s, at OS@,linux,g \
>        < boot.its.in > build/haleakala/denx/eldk/4.1/boot.its
>    ${BuildRoot}/src/u-boot/build/haleakala/denx/eldk/4.1/tools/mkimage -f
> build/haleakala/denx/eldk/4.1/boot.its
> ${BuildRoot}/src/results/haleakala/denx/eldk/4.1/boot/boot.itb
>    FIT format handling
>    Trying to execute "dtc -I dts -O dtb -p 500
> build/haleakala/denx/eldk/4.1/boot.its >
> ${BuildRoot}/src/results/haleakala/denx/eldk/4.1/boot/boot.itb.tmp"
>    DTC: dts->dtb  on file "build/haleakala/denx/eldk/4.1/boot.its"
>    Added timestamp successfully
>    rm build/haleakala/denx/eldk/4.1/boot.its
>
> The contents of boot.its.in are:
>
>    / {
>        description = "Linux Kernel with Device Tree";
>
>        #address-cells = <1>;
>
>        images {
>            kernel at 1 {
>                description = "Kernel";
>                data = /incbin/("@KERNEL@");
>                type = "kernel";
>                arch = "@ARCH@";
>                os = "@OS@";
>                compression = "gzip";
>                load = <00000000>;
>                entry = <00000000>;
>                hash at 1 {
>                    algo = "crc32";
>                };
>            };
>            fdt at 1 {
>                description = "Device Tree";
>                data = /incbin/("@FDT@");
>                type = "flat_dt";
>                arch = "@ARCH@";
>                compression = "none";
>                hash at 1 {
>                    algo = "crc32";
>                };
>            };
>        };
>
>        configurations {
>            default = "config at 1";
>
>            config at 1 {
>                description = "Kernel with Device Tree";
>                kernel = "kernel at 1";
>                fdt = "fdt at 1";
>            };
>        };
>    };
>
> Back on the target board:
>
>    => version
>    U-Boot 1.3.3 (Jul 18 2008 - 13:09:15)
>    => run boot0
>    Loading from NAND 64MiB 3,3V 8-bit, offset 0x0
>    Fit image detected...
>       FIT description: Linux Kernel with Device Tree
>        Image 0 (kernel at 1)
>         Description:  Kernel
>         Type:         Kernel Image
>         Compression:  gzip compressed
>         Data Start:   0x008000c8
>         Data Size:    1295427 Bytes =  1.2 MB
>         Architecture: PowerPC
>         OS:           Linux
>         Load Address: 0x00000000
>         Entry Point:  0x00000000
>         Hash algo:    crc32
>         Hash value:   403f3fdd
>        Image 1 (fdt at 1)
>         Description:  Device Tree
>         Type:         Flat Device Tree
>         Compression:  uncompressed
>         Data Start:   0x0093c5e4
>         Data Size:    12288 Bytes = 12 kB
>         Architecture: PowerPC
>         Hash algo:    crc32
>         Hash value:   d726e662
>        Default Configuration: 'config at 1'
>        Configuration 0 (config at 1)
>         Description:  Kernel with Device Tree
>         Kernel:       kernel at 1
>         FDT:          fdt at 1
>    ## Booting kernel from FIT Image at 00800000 ...
>       Using 'config at 1' configuration
>       Trying 'kernel at 1' kernel subimage
>         Description:  Kernel
>         Type:         Kernel Image
>         Compression:  gzip compressed
>         Data Start:   0x008000c8
>         Data Size:    1295427 Bytes =  1.2 MB
>         Architecture: PowerPC
>         OS:           Linux
>         Load Address: 0x00000000
>         Entry Point:  0x00000000
>         Hash algo:    crc32
>         Hash value:   403f3fdd
>       Verifying Hash Integrity ... crc32+ OK
>       Uncompressing Kernel Image ... OK
>    ## Flattened Device Tree from FIT Image at 00800000
>       Using 'config at 1' configuration
>       Trying 'fdt at 1' FDT blob subimage
>         Description:  Device Tree
>         Type:         Flat Device Tree
>         Compression:  uncompressed
>         Data Start:   0x0093c5e4
>         Data Size:    12288 Bytes = 12 kB
>         Architecture: PowerPC
>         Hash algo:    crc32
>         Hash value:   d726e662
>       Verifying Hash Integrity ... crc32+ OK
>       Booting using the fdt blob at 0x93c5e4
>       Loading Device Tree to 007fd000, end 007fffff ... OK
>
> Regards,
>
> Grant Erickson
>
> --
> Principal
> Nuovation System Designs, LLC
>
>
>


More information about the U-Boot mailing list