public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Flat Image Tree and boot arguments
@ 2014-10-29 14:22 Weiß Christoph
  2014-10-29 15:14 ` Jagan Teki
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Weiß Christoph @ 2014-10-29 14:22 UTC (permalink / raw)
  To: u-boot

Dear all,

I am trying to get my own build of U-Boot to boot Linux on a Jetson TK1 board. As we are pushing for verified boot I am using the Flat Image Tree (unifying kernel image, device tree blob, ...) to describe my system. U-Boot can load the ITB file and tries to start the kernel but the system hangs after this message.

I assume that this is because no boot arguments are passed to the kernel (the original startup adds loads of arguments) but I am a little dumbfounded on how to pass the arguments to the kernel. I tried setting the bootargs environment variable but this did not change the situation.

How do I pass kernel arguments to the kernel when using an ITB file?

Command line arguments (taken from the APPEND command of the examples extlinux.conf):

    console=ttyS0,115200n8 console=tty1 no_console_suspend=1
    lp0_vec=2064 at 0xf46ff000 video=tegrafb mem=1862M at 2048M memtype=255 ddr_die=2048M at 2048M
    section=256M pmuboard=0x0177:0x0000:0x02:0x43:0x00 vpr=151M at 3945M tsec=32M at 3913M
    otf_key=c75e5bb91eb3bd947560357b64422f85 usbcore.old_scheme_first=1 core_edp_mv=1150
    core_edp_ma=4000 tegraid=40.1.1.0.0 debug_uartport=lsport,3 power_supply=Adapter
    audio_codec=rt5640 modem_id=0 android.kerneltype=normal usb_port_owner_info=0
    fbcon=map:1 commchip_id=0 usb_port_owner_info=0 lane_owner_info=6 emc_max_dvfs=0
    touch_id=0 at 0 tegra_fbmem=32899072 at 0xad012000 board_info=0x0177:0x0000:0x02:0x43:0x00
    root=/dev/mmcblk0p1 rw rootwait tegraboot=sdmmc gpt

Content of ITS file:

    /dts-v1/;

    / {
                description = "Simple image with single Linux kernel and FDT blob";
                #address-cells = <1>;

                images {
                               kernel at 1 {
                                               description = "Vanilla Linux kernel";
                                               data = /incbin/("./zImage");
                                               type = "kernel";
                                               arch = "arm";
                                               os = "linux";
                                               compression = "none";
                                               load = <0x81008000>;
                                               entry = <0x81008000>;
                                               hash at 1 {
                                                               algo = "crc32";
                                               };
                                               hash at 2 {
                                                               algo = "sha1";
                                               };
                               };
                               fdt at 1 {
                                               description = "Flattened Device Tree blob";
                                               data = /incbin/("./tegra124-pm375.dtb");
                                               type = "flat_dt";
                                               arch = "arm";
                                               compression = "none";
                                               hash at 1 {
                                                               algo = "crc32";
                                               };
                                               hash at 2 {
                                                               algo = "sha1";
                                               };
                               };
                };

                configurations {
                               default = "conf at 1";
                               conf at 1 {
                                               description = "Boot Linux kernel with FDT blob";
                                               kernel = "kernel at 1";
                                               fdt = "fdt at 1";
                               };
                };
    };

U-Boot Output:

    Tegra124 (Jetson TK1) # fatload mmc 1 0x90000000 /kernel_fdt.itb
    reading /kernel_fdt.itb
    5946200 bytes read in 497 ms (11.4 MiB/s)
    Tegra124 (Jetson TK1) # bootm 0x90000000
    ## Loading kernel from FIT Image at 90000000 ...
       Using 'conf at 1' configuration
       Verifying Hash Integrity ... OK
       Trying 'kernel at 1' kernel subimage
         Description:  Vanilla Linux kernel
         Type:         Kernel Image
         Compression:  uncompressed
         Data Start:   0x900000ec
         Data Size:    5910168 Bytes = 5.6 MiB
         Architecture: ARM
         OS:           Linux
         Load Address: 0x00000000
         Entry Point:  0x00000000
         Hash algo:    crc32
         Hash value:   c5b4b377
         Hash algo:    sha1
         Hash value:   f001007efe83f563425bfe0659186a32395c946c
       Verifying Hash Integrity ... crc32+ sha1+ OK
    ## Loading fdt from FIT Image at 90000000 ...
       Using 'conf at 1' configuration
       Trying 'fdt at 1' fdt subimage
         Description:  Flattened Device Tree blob
         Type:         Flat Device Tree
         Compression:  uncompressed
         Data Start:   0x905a30ac
         Data Size:    34678 Bytes = 33.9 KiB
         Architecture: ARM
         Hash algo:    crc32
         Hash value:   e466b23e
         Hash algo:    sha1
         Hash value:   ec909ae16e62233d0ed1e1f4c909085abc9b5879
       Verifying Hash Integrity ... crc32+ sha1+ OK
       Booting using the fdt blob at 0x905a30ac
       Loading Kernel Image ... OK
       Using Device Tree in place at 905a30ac, end 905ae821

    Starting kernel ...


Thanks in advance,
Best regards


CHRISTOPH WEISS
Engineer
Safety & Security Department
Video and Security Technology

AIT Austrian Institute of Technology GmbH
Donau-City-Stra?e 1  |  1220 Vienna  | Austria
T +43 50550-4179 | M +43 664 883906749
christoph.weiss at ait.ac.at<mailto:christoph.weiss@ait.ac.at> | http://www.ait.ac.at<http://www.ait.ac.at/>

FN: 115980 i HG Wien  |  UID: ATU14703506
www.ait.ac.at/Email-Disclaimer<http://www.ait.ac.at/Email-Disclaimer>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Flat Image Tree and boot arguments
  2014-10-29 14:22 [U-Boot] Flat Image Tree and boot arguments Weiß Christoph
@ 2014-10-29 15:14 ` Jagan Teki
  2014-10-29 16:36 ` Stephen Warren
  2014-11-01 15:13 ` Simon Glass
  2 siblings, 0 replies; 6+ messages in thread
From: Jagan Teki @ 2014-10-29 15:14 UTC (permalink / raw)
  To: u-boot

On 29 October 2014 19:52, Wei? Christoph <Christoph.Weiss@ait.ac.at> wrote:
> Dear all,
>
> I am trying to get my own build of U-Boot to boot Linux on a Jetson TK1 board. As we are pushing for verified boot I am using the Flat Image Tree (unifying kernel image, device tree blob, ...) to describe my system. U-Boot can load the ITB file and tries to start the kernel but the system hangs after this message.
>
> I assume that this is because no boot arguments are passed to the kernel (the original startup adds loads of arguments) but I am a little dumbfounded on how to pass the arguments to the kernel. I tried setting the bootargs environment variable but this did not change the situation.
>
> How do I pass kernel arguments to the kernel when using an ITB file?

Usually bootargs is part of dts itself check it on chosen node.
No need to set it on u-boot if you use it from there.

>
> Command line arguments (taken from the APPEND command of the examples extlinux.conf):
>
>     console=ttyS0,115200n8 console=tty1 no_console_suspend=1
>     lp0_vec=2064 at 0xf46ff000 video=tegrafb mem=1862M at 2048M memtype=255 ddr_die=2048M at 2048M
>     section=256M pmuboard=0x0177:0x0000:0x02:0x43:0x00 vpr=151M at 3945M tsec=32M at 3913M
>     otf_key=c75e5bb91eb3bd947560357b64422f85 usbcore.old_scheme_first=1 core_edp_mv=1150
>     core_edp_ma=4000 tegraid=40.1.1.0.0 debug_uartport=lsport,3 power_supply=Adapter
>     audio_codec=rt5640 modem_id=0 android.kerneltype=normal usb_port_owner_info=0
>     fbcon=map:1 commchip_id=0 usb_port_owner_info=0 lane_owner_info=6 emc_max_dvfs=0
>     touch_id=0 at 0 tegra_fbmem=32899072 at 0xad012000 board_info=0x0177:0x0000:0x02:0x43:0x00
>     root=/dev/mmcblk0p1 rw rootwait tegraboot=sdmmc gpt
>
> Content of ITS file:
>
>     /dts-v1/;
>
>     / {
>                 description = "Simple image with single Linux kernel and FDT blob";
>                 #address-cells = <1>;
>
>                 images {
>                                kernel at 1 {
>                                                description = "Vanilla Linux kernel";
>                                                data = /incbin/("./zImage");
>                                                type = "kernel";
>                                                arch = "arm";
>                                                os = "linux";
>                                                compression = "none";
>                                                load = <0x81008000>;
>                                                entry = <0x81008000>;
>                                                hash at 1 {
>                                                                algo = "crc32";
>                                                };
>                                                hash at 2 {
>                                                                algo = "sha1";
>                                                };
>                                };
>                                fdt at 1 {
>                                                description = "Flattened Device Tree blob";
>                                                data = /incbin/("./tegra124-pm375.dtb");
>                                                type = "flat_dt";
>                                                arch = "arm";
>                                                compression = "none";
>                                                hash at 1 {
>                                                                algo = "crc32";
>                                                };
>                                                hash at 2 {
>                                                                algo = "sha1";
>                                                };
>                                };
>                 };
>
>                 configurations {
>                                default = "conf at 1";
>                                conf at 1 {
>                                                description = "Boot Linux kernel with FDT blob";
>                                                kernel = "kernel at 1";
>                                                fdt = "fdt at 1";
>                                };
>                 };
>     };
>
> U-Boot Output:
>
>     Tegra124 (Jetson TK1) # fatload mmc 1 0x90000000 /kernel_fdt.itb
>     reading /kernel_fdt.itb
>     5946200 bytes read in 497 ms (11.4 MiB/s)
>     Tegra124 (Jetson TK1) # bootm 0x90000000
>     ## Loading kernel from FIT Image at 90000000 ...
>        Using 'conf at 1' configuration
>        Verifying Hash Integrity ... OK
>        Trying 'kernel at 1' kernel subimage
>          Description:  Vanilla Linux kernel
>          Type:         Kernel Image
>          Compression:  uncompressed
>          Data Start:   0x900000ec
>          Data Size:    5910168 Bytes = 5.6 MiB
>          Architecture: ARM
>          OS:           Linux
>          Load Address: 0x00000000
>          Entry Point:  0x00000000

This looks odd - I guess host you created itb might have an issue.
Check itb on host itself once you create through mkimage tool

$ mkimage -l kernel_fdt.itb

>          Hash algo:    crc32
>          Hash value:   c5b4b377
>          Hash algo:    sha1
>          Hash value:   f001007efe83f563425bfe0659186a32395c946c
>        Verifying Hash Integrity ... crc32+ sha1+ OK
>     ## Loading fdt from FIT Image at 90000000 ...
>        Using 'conf at 1' configuration
>        Trying 'fdt at 1' fdt subimage
>          Description:  Flattened Device Tree blob
>          Type:         Flat Device Tree
>          Compression:  uncompressed
>          Data Start:   0x905a30ac
>          Data Size:    34678 Bytes = 33.9 KiB
>          Architecture: ARM
>          Hash algo:    crc32
>          Hash value:   e466b23e
>          Hash algo:    sha1
>          Hash value:   ec909ae16e62233d0ed1e1f4c909085abc9b5879
>        Verifying Hash Integrity ... crc32+ sha1+ OK
>        Booting using the fdt blob at 0x905a30ac
>        Loading Kernel Image ... OK
>        Using Device Tree in place at 905a30ac, end 905ae821
>
>     Starting kernel ...

thanks!
-- 
Jagan.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Flat Image Tree and boot arguments
  2014-10-29 14:22 [U-Boot] Flat Image Tree and boot arguments Weiß Christoph
  2014-10-29 15:14 ` Jagan Teki
@ 2014-10-29 16:36 ` Stephen Warren
  2014-10-31  8:05   ` Weiß Christoph
  2014-11-01 15:13 ` Simon Glass
  2 siblings, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2014-10-29 16:36 UTC (permalink / raw)
  To: u-boot

On 10/29/2014 08:22 AM, Wei? Christoph wrote:
> Dear all,
>
> I am trying to get my own build of U-Boot to boot Linux on a Jetson TK1 board. As we are pushing for verified boot I am using the Flat Image Tree (unifying kernel image, device tree blob, ...) to describe my system. U-Boot can load the ITB file and tries to start the kernel but the system hangs after this message.
>
...
>                  images {
>                                 kernel at 1 {
...
>                                                 load = <0x81008000>;
>                                                 entry = <0x81008000>;

That looks plausible, but ...

...
>      Tegra124 (Jetson TK1) # bootm 0x90000000
>      ## Loading kernel from FIT Image at 90000000 ...
>         Using 'conf at 1' configuration
>         Verifying Hash Integrity ... OK
>         Trying 'kernel at 1' kernel subimage
...
>           Load Address: 0x00000000
>           Entry Point:  0x00000000

That looks like it's copying the kernel to address 0, which isn't RAM on 
this system. You'd need to track down why the wrong address is being used.

BTW, you may want to contact linux-tegra-bugs at nvidia.com for support 
with L4T. That said, this aspect of L4T U-Boot should be identical to 
upstream U-Boot, since the L4T version is so close to upstream now.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Flat Image Tree and boot arguments
  2014-10-29 16:36 ` Stephen Warren
@ 2014-10-31  8:05   ` Weiß Christoph
  0 siblings, 0 replies; 6+ messages in thread
From: Weiß Christoph @ 2014-10-31  8:05 UTC (permalink / raw)
  To: u-boot

Hello,

Thanks for your answer. 

I recreated the ITB file and it then showed the load address and entry point given in the IST during boot execution. This however did not change anything.
Strangely enough a newly compiled kernel image did the trick (although the original image worked in all other boot methods except for use in an image tree blob) .

Anyways, thanks again.
Cheers, Chris

-----Urspr?ngliche Nachricht-----
Von: Stephen Warren [mailto:swarren at wwwdotorg.org] 
Gesendet: Mittwoch, 29. Oktober 2014 17:36
An: Wei? Christoph; u-boot at lists.denx.de
Cc: Tom Warren
Betreff: Re: [U-Boot] Flat Image Tree and boot arguments

On 10/29/2014 08:22 AM, Wei? Christoph wrote:
> Dear all,
>
> I am trying to get my own build of U-Boot to boot Linux on a Jetson TK1 board. As we are pushing for verified boot I am using the Flat Image Tree (unifying kernel image, device tree blob, ...) to describe my system. U-Boot can load the ITB file and tries to start the kernel but the system hangs after this message.
>
...
>                  images {
>                                 kernel at 1 {
...
>                                                 load = <0x81008000>;
>                                                 entry = <0x81008000>;

That looks plausible, but ...

...
>      Tegra124 (Jetson TK1) # bootm 0x90000000
>      ## Loading kernel from FIT Image at 90000000 ...
>         Using 'conf at 1' configuration
>         Verifying Hash Integrity ... OK
>         Trying 'kernel at 1' kernel subimage
...
>           Load Address: 0x00000000
>           Entry Point:  0x00000000

That looks like it's copying the kernel to address 0, which isn't RAM on this system. You'd need to track down why the wrong address is being used.

BTW, you may want to contact linux-tegra-bugs at nvidia.com for support with L4T. That said, this aspect of L4T U-Boot should be identical to upstream U-Boot, since the L4T version is so close to upstream now.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Flat Image Tree and boot arguments
  2014-10-29 14:22 [U-Boot] Flat Image Tree and boot arguments Weiß Christoph
  2014-10-29 15:14 ` Jagan Teki
  2014-10-29 16:36 ` Stephen Warren
@ 2014-11-01 15:13 ` Simon Glass
       [not found]   ` <910058E0AFC89142822B093FD70D46220C65FC3E@S0MSMAIL112.arc.local>
  2 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2014-11-01 15:13 UTC (permalink / raw)
  To: u-boot

Hi,

(trying again)

On 29 October 2014 08:22, Wei? Christoph <Christoph.Weiss@ait.ac.at> wrote:
> Dear all,
>
> I am trying to get my own build of U-Boot to boot Linux on a Jetson TK1 board. As we are pushing for verified boot I am using the Flat Image Tree (unifying kernel image, device tree blob, ...) to describe my system. U-Boot can load the ITB file and tries to start the kernel but the system hangs after this message.
>
> I assume that this is because no boot arguments are passed to the kernel (the original startup adds loads of arguments) but I am a little dumbfounded on how to pass the arguments to the kernel. I tried setting the bootargs environment variable but this did not change the situation.
>
> How do I pass kernel arguments to the kernel when using an ITB file?
>
> Command line arguments (taken from the APPEND command of the examples extlinux.conf):
>
>     console=ttyS0,115200n8 console=tty1 no_console_suspend=1
>     lp0_vec=2064 at 0xf46ff000 video=tegrafb mem=1862M at 2048M memtype=255 ddr_die=2048M at 2048M
>     section=256M pmuboard=0x0177:0x0000:0x02:0x43:0x00 vpr=151M at 3945M tsec=32M at 3913M
>     otf_key=c75e5bb91eb3bd947560357b64422f85 usbcore.old_scheme_first=1 core_edp_mv=1150
>     core_edp_ma=4000 tegraid=40.1.1.0.0 debug_uartport=lsport,3 power_supply=Adapter
>     audio_codec=rt5640 modem_id=0 android.kerneltype=normal usb_port_owner_info=0
>     fbcon=map:1 commchip_id=0 usb_port_owner_info=0 lane_owner_info=6 emc_max_dvfs=0
>     touch_id=0 at 0 tegra_fbmem=32899072 at 0xad012000 board_info=0x0177:0x0000:0x02:0x43:0x00
>     root=/dev/mmcblk0p1 rw rootwait tegraboot=sdmmc gpt
>
> Content of ITS file:
>
>     /dts-v1/;
>
>     / {
>                 description = "Simple image with single Linux kernel and FDT blob";
>                 #address-cells = <1>;
>
>                 images {
>                                kernel at 1 {
>                                                description = "Vanilla Linux kernel";
>                                                data = /incbin/("./zImage");
>                                                type = "kernel";

Should this be kernel_noload?

Stephen is the expert...


>                                                arch = "arm";
>                                                os = "linux";
>                                                compression = "none";
>                                                load = <0x81008000>;
>                                                entry = <0x81008000>;
>                                                hash at 1 {
>                                                                algo = "crc32";
>                                                };
>                                                hash at 2 {
>                                                                algo = "sha1";
>                                                };
>                                };
>                                fdt at 1 {
>                                                description = "Flattened Device Tree blob";
>                                                data = /incbin/("./tegra124-pm375.dtb");
>                                                type = "flat_dt";
>                                                arch = "arm";
>                                                compression = "none";
>                                                hash at 1 {
>                                                                algo = "crc32";
>                                                };
>                                                hash at 2 {
>                                                                algo = "sha1";
>                                                };
>                                };
>                 };
>
>                 configurations {
>                                default = "conf at 1";
>                                conf at 1 {
>                                                description = "Boot Linux kernel with FDT blob";
>                                                kernel = "kernel at 1";
>                                                fdt = "fdt at 1";
>                                };
>                 };
>     };
>
[snip}

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] Flat Image Tree and boot arguments
       [not found]   ` <910058E0AFC89142822B093FD70D46220C65FC3E@S0MSMAIL112.arc.local>
@ 2014-11-13  3:08     ` Simon Glass
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2014-11-13  3:08 UTC (permalink / raw)
  To: u-boot

Hi,

On 4 November 2014 08:21, Wei? Christoph <Christoph.Weiss@ait.ac.at> wrote:
> Well, for me it works with type kernel and loading it to a higher RAM address than the load address and entry point. I'm not exactly sure if kernel_noload is supported with Tegra. Is type kernel completely wrong?

I'm just not sure why you want U-Boot to load it to a new address, if
the kernel itself self-decompresses and moves to a place it has
decided on.

>
> I finally managed to execute a verified boot on the Tegra  with the help of the tegra-uboot-flasher scripts and your Beaglebone vboot documentation, which was very very helpful.

Great!
> Thanks :)
>
> Cheers, Chris
>
[snip]

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-13  3:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29 14:22 [U-Boot] Flat Image Tree and boot arguments Weiß Christoph
2014-10-29 15:14 ` Jagan Teki
2014-10-29 16:36 ` Stephen Warren
2014-10-31  8:05   ` Weiß Christoph
2014-11-01 15:13 ` Simon Glass
     [not found]   ` <910058E0AFC89142822B093FD70D46220C65FC3E@S0MSMAIL112.arc.local>
2014-11-13  3:08     ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox