public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "André Przywara" <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Booting kernel/dtb with FIT image
Date: Fri, 13 Jan 2017 22:39:28 +0000	[thread overview]
Message-ID: <9980ea85-e364-7f74-37df-e2a0049f1622@arm.com> (raw)
In-Reply-To: <CAJZhe_j9PJnfWZKaAMchSVJoeTvAE-jA=_6bM-eMBcGvAz7w0w@mail.gmail.com>

On 13/01/17 17:13, Nicolas le bayon wrote:
> Hi,
> 
> Here is a problem I presently meet, any help or track to follow would be
> welcome.
> 
> My U-boot (2016.09) loads a kernel and a dtb, and "bootm" all this. This is
> my reference, and this is correctly running.
> 
> From this, I'm trying to implement FIT image management, so I enabled
> CONFIG_FIT.
> 
> On the other side, I constructed the ITS FILE from my kernel and my dtb, as
> described below:
> 
> */dts-v1/;*
> */ {*
> *    description = "Simple image with single Linux kernel and FDT blob";*
> *    #address-cells = <0x1>;*
> *    images {*
> *        kernel at 1 {*
> *            description = "My Linux kernel";*
> *            data = /incbin/("./uImage");*

uImage is usually the name of a kernel wrapped into a _legacy U-Boot
image_. Now you are using the new FIT image, so I would use zImage as
the source here instead, otherwise you will have it double wrapped. I
guess U-Boot can't cope with that, also it would be a bit weird.
So copy arch/arm/boot/zImage and use that instead.

Cheers,
Andre.

> *            type = "kernel";*
> *            arch = "arm";*
> *            os = "linux";*
> *            compression = "none";*
> *            load = <0x40008000>;*
> *            entry = <0x40008000>;*
> *            hash at 1 {*
> *                algo = "md5";*
> *            };*
> *            hash at 2 {*
> *                algo = "sha1";*
> *            };*
> *        };*
> *        fdt at 1 {*
> *            description = "My Flattened Device Tree blob";*
> *            data = /incbin/("./mydtb.dtb");*
> *            type = "flat_dt";*
> *            arch = "arm";*
> *            compression = "none";*
> *            hash at 1 {*
> *                algo = "md5";*
> *            };*
> *            hash at 2 {*
> *                algo = "sha1";*
> *            };*
> *        };*
> *    };*
> */* a notable concept of FIT, configurations */*
> *    configurations {*
> *        default = "conf at 1";*
> *        conf at 1 {*
> *            description = "Boot Linux kernel with FDT blob";*
> *            kernel = "kernel at 1";*
> *            fdt = "fdt at 1";*
> *        };*
> *    };*
> *};*
> 
> I managed to construct the ITB (using the mkimage of my u-boot, in tools
> directory) and to store it on my target.
> 
> I load this ITB at 0x60000000 address of memory.
> 
> The "bootm 0x60000000" gives the following error: "Ramdisk image is corrupt
> or invalid". Indeed I have no ramdisk. Not what was described in tutorials.
> 
> The "bootm 0x60000000 - " gives a better result:
> *## Loading kernel from FIT Image at 60000000 ...*
> *   Using 'conf at 1' configuration*
> *   Trying 'kernel at 1' kernel subimage*
> *     Description:  My Linux kernel*
> *     Type:         Kernel Image*
> *     Compression:  uncompressed*
> *     Data Start:   0x600000e4*
> *     Data Size:    5568600 Bytes = 5.3 MiB (Note: same size as the
> original file!)*
> *     Architecture: ARM*
> *     OS:           Linux*
> *     Load Address: 0x40008000*
> *     Entry Point:  0x40008000*
> *     Hash algo:    md5*
> *     Hash value:   0cccb060e1c4f50e98d8f6c8ed61242e*
> *     Hash algo:    sha1*
> *     Hash value:   f0442dd1b8c4f006b25533c3148df2742fc8a7ad*
> *   Verifying Hash Integrity ... md5+ sha1+ OK*
> *## Loading fdt from FIT Image at 60000000 ...*
> *   Using 'conf at 1' configuration*
> *   Trying 'fdt at 1' fdt subimage*
> *     Description:  My Flattened Device Tree blob*
> *     Type:         Flat Device Tree*
> *     Compression:  uncompressed*
> *     Data Start:   0x6054fa70*
> *     Data Size:    55154 Bytes = 53.9 KiB **(Note: same size as the
> original file!)*
> *     Architecture: ARM*
> *     Hash algo:    md5*
> *     Hash value:   a201db29486c7c70b707e085d0196fda*
> *     Hash algo:    sha1*
> *     Hash value:   adb751ba04c1aed120a329bb4812a9c8f0bb68a7*
> *   Verifying Hash Integrity ... md5+ sha1+ OK*
> *   Booting using the fdt blob at 0x6054fa70*
> *   Loading Kernel Image ... OK*
> *   Using Device Tree in place at 6054fa70, end 605601e1*
> 
> *Starting kernel ...*
> 
> And unfortunately nothing else after.
> 
> I have the feeling to be in the same conditions, but I do not have the same
> result.
> 
> If you have any idea of what could be wrong, please let me know, it would
> be welcomed.
> Maybe some corrections have been pushed in this domain since v2016.09?
> Thanks in advance.
> 
> Best Regards
> Nicolas
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 

  parent reply	other threads:[~2017-01-13 22:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 17:13 [U-Boot] Booting kernel/dtb with FIT image Nicolas le bayon
2017-01-13 17:43 ` Jagan Teki
2017-01-13 22:39 ` André Przywara [this message]
2017-01-16  9:10   ` Nicolas le bayon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9980ea85-e364-7f74-37df-e2a0049f1622@arm.com \
    --to=andre.przywara@arm.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox