All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Need help with verified u-boot on Tegra TX2
@ 2019-10-20  2:14 Rayees Shamsuddin
  2019-10-21 21:13 ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Rayees Shamsuddin @ 2019-10-20  2:14 UTC (permalink / raw)
  To: u-boot

Simon,

Thanks for all your great and pioneering effort on verified u-boot. I am benefiting a lot for your work. I am trying to implement verified u-boot on Tegra TX2.

Based on the wonderful documentation that you provided, I was able to successfully create a fit image and got the dtb and kernel to boot. But I ran into some issues when I incorporated ramdisk into the fit image. Initially, it would get stuck on "Starting kernel ...". Then I modified the environment as follows
setenv initrd_high 8effffff
setenv fdt_high 8effffff

Initially it was set to
fdt_high=ffffffffffffffff
initrd_high=ffffffffffffffff

I haven't quite understood why this change caused the kernel to load. Is it because initrd_high=ffffffffffffffff overwrites the relocatable u-boot code?

Anyway after this change, I got the kernel to boot, but with one caveat - the RAMDISK couldn't be loaded.

   Booting using the fdt blob at 0x920989cc
   Loading Kernel Image ... OK
   reserving fdt memory region: addr=80000000 size=10000
   Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
   Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x100

However, I saw the message
[    5.403174] RAMDISK: Couldn't find valid RAM disk image starting at 0.

I would be grateful if you could provide me some guidance on what might be causing this issue or how to go about resolving this.

Thanks and Regards
Rayees Shamsuddin
Product Security Engineer
Intuitive Surgical

Tegra.its

/dts-v1/;
/ {
    description = "fitImage for Tegra TX2";
    #address-cells = <1>;
    images {
        kernel at 1 {
            description = "Linux kernel";
            data = /incbin/("Image");
            arch = "arm64";
            os = "linux";
            type = "kernel";
            compression = "none";
            load = <0x80280000>;
            entry = <0x80280000>;
            hash at 1 {
                algo = "sha256";
            };
        };
        fdt at 1 {
            description = "DTB for Tegra TX2";
            data = /incbin/("tegra186-quill-p3310-1000-c03-00-base.dtb");
            type = "flat_dt";
            arch = "arm64";
            compression = "none";
            hash at 1 {
                algo = "sha256";
            };
        };
        ramdisk at 1 {
            description = "Ramdisk Image for Tegra TX2";
            data = /incbin/("initrd");
            type = "ramdisk";
            arch = "arm64";
            os = "linux";
            compression = "gzip";
            load = <0x82a00000>;
            entry = <0x82a00000>;
            hash at 1 {
                 algo = "sha256";
            };
        };
    };
    configurations {
        default = "conf at 1";
        conf at 1 {
            description = "Boot Linux kernel, FDT blob and ramdisk";
            kernel = "kernel at 1";
            fdt = "fdt at 1";
            ramdisk = "ramdisk at 1";
            signature at 1 {
                algo = "sha256,rsa4096";
                key-name-hint = "tx2_key";
                sign-images = "fdt", "kernel", "ramdisk";
            };
        };
    };
};

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

* [U-Boot] Need help with verified u-boot on Tegra TX2
  2019-10-20  2:14 [U-Boot] Need help with verified u-boot on Tegra TX2 Rayees Shamsuddin
@ 2019-10-21 21:13 ` Simon Glass
  2019-10-21 21:55   ` [U-Boot] [EXTERNAL] " Rayees Shamsuddin
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2019-10-21 21:13 UTC (permalink / raw)
  To: u-boot

Hi Rayees,

On Sat, 19 Oct 2019 at 20:14, Rayees Shamsuddin
<Rayees.Shamsuddin@intusurg.com> wrote:
>
> Simon,
>
> Thanks for all your great and pioneering effort on verified u-boot. I am benefiting a lot for your work. I am trying to implement verified u-boot on Tegra TX2.
>
> Based on the wonderful documentation that you provided, I was able to successfully create a fit image and got the dtb and kernel to boot. But I ran into some issues when I incorporated ramdisk into the fit image. Initially, it would get stuck on “Starting kernel …”. Then I modified the environment as follows
> setenv initrd_high 8effffff
> setenv fdt_high 8effffff
>
> Initially it was set to
> fdt_high=ffffffffffffffff
> initrd_high=ffffffffffffffff
>
> I haven’t quite understood why this change caused the kernel to load. Is it because initrd_high=ffffffffffffffff overwrites the relocatable u-boot code?
>
> Anyway after this change, I got the kernel to boot, but with one caveat – the RAMDISK couldn’t be loaded.
>
>    Booting using the fdt blob at 0x920989cc
>    Loading Kernel Image ... OK
>    reserving fdt memory region: addr=80000000 size=10000
>    Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
>    Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... OK
>
> Starting kernel ...
>
> [    0.000000] Booting Linux on physical CPU 0x100
>
> However, I saw the message
> [    5.403174] RAMDISK: Couldn't find valid RAM disk image starting at 0.
>
> I would be grateful if you could provide me some guidance on what might be causing this issue or how to go about resolving this.

Are you saying that it works correctly without verified boot?

Normally U-Boot should pass a pointer to the ramdisk to linux. That
should not change with vboot.

Regards,
Simon

>
> Thanks and Regards
> Rayees Shamsuddin
> Product Security Engineer
> Intuitive Surgical
>
> Tegra.its
>
> /dts-v1/;
> / {
>     description = "fitImage for Tegra TX2";
>     #address-cells = <1>;
>     images {
>         kernel at 1 {
>             description = "Linux kernel";
>             data = /incbin/("Image");
>             arch = "arm64";
>             os = "linux";
>             type = "kernel";
>             compression = "none";
>             load = <0x80280000>;
>             entry = <0x80280000>;
>             hash at 1 {
>                 algo = "sha256";
>             };
>         };
>         fdt at 1 {
>             description = "DTB for Tegra TX2";
>             data = /incbin/("tegra186-quill-p3310-1000-c03-00-base.dtb");
>             type = "flat_dt";
>             arch = "arm64";
>             compression = "none";
>             hash at 1 {
>                 algo = "sha256";
>             };
>         };
>         ramdisk at 1 {
>             description = "Ramdisk Image for Tegra TX2";
>             data = /incbin/("initrd");
>             type = "ramdisk";
>             arch = "arm64";
>             os = "linux";
>             compression = "gzip";
>             load = <0x82a00000>;
>             entry = <0x82a00000>;
>             hash at 1 {
>                  algo = "sha256";
>             };
>         };
>     };
>     configurations {
>         default = "conf at 1";
>         conf at 1 {
>             description = "Boot Linux kernel, FDT blob and ramdisk";
>             kernel = "kernel at 1";
>             fdt = "fdt at 1";
>             ramdisk = "ramdisk at 1";
>             signature at 1 {
>                 algo = "sha256,rsa4096";
>                 key-name-hint = "tx2_key";
>                 sign-images = "fdt", "kernel", "ramdisk";
>             };
>         };
>     };
> };
>
>

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

* [U-Boot] [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2
  2019-10-21 21:13 ` Simon Glass
@ 2019-10-21 21:55   ` Rayees Shamsuddin
  2019-10-21 22:54     ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Rayees Shamsuddin @ 2019-10-21 21:55 UTC (permalink / raw)
  To: u-boot

Hi Simon,

In the normal u-boot, they used extlinux to specify the ramdisk. I was using bootm to load the ramdisk.

This is the normal boot up terminal logs.

"MMC: no card present
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
727 bytes read in 105 ms (5.9 KiB/s)
L4T boot options
1:      primary kernel
Enter choice: 1:        primary kernel
Retrieving file: /boot/initrd
5565090 bytes read in 213 ms (24.9 MiB/s)
Retrieving file: /boot/Image
34179080 bytes read in 857 ms (38 MiB/s)
append: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1
## Flattened Device Tree blob at 80000000
   Booting using the fdt blob at 0x80000000
   reserving fdt memory region: addr=80000000 size=10000
   Using Device Tree in place at 0000000080000000, end 0000000080058f8e

Starting kernel ..."

My sequence with vboot was to set the bootargs first,then the initrd_high and fdt_high and then load to e-mmc and then call bootm. In the u-boot env, the following values were there. I am attaching the output of printenv here, if that could give some clues on what I am doing differently.

kernel_addr_r=80280000
kernel_addr_r_aliases=loadaddr
loadaddr=80280000
ramdisk_addr_r=82a00000

"U-Boot 2016.07-dirty (Oct 16 2019 - 16:12:24 -0700)

TEGRA186
Model: NVIDIA P2771-0000-500
DRAM:  7.8 GiB
MC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet at 2490000
Hit any key to stop autoboot:  0
Tegra186 (P2771-0000-500) # setenv bootargs root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1
Tegra186 (P2771-0000-500) # setenv initrd_high 8effffff
Tegra186 (P2771-0000-500) # setenv fdt_high 8effffff
Tegra186 (P2771-0000-500) # ext2load mmc 0 0x90000000 /boot/tegra.fit
40090346 bytes read in 1051 ms (36.4 MiB/s)
Tegra186 (P2771-0000-500) # bootm 0x90000000
## Loading kernel from FIT Image at 90000000 ...
   Using 'conf at 1' configuration
   Verifying Hash Integrity ... sha256,rsa4096:tx2_key+ OK
   Trying 'kernel at 1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x900000c8
     Data Size:    34179080 Bytes = 32.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x80280000
     Entry Point:  0x80280000
     Hash algo:    sha256
     Hash value:   417be59a15deda06283bdfdc2ef08911c27c0fbb3e4581fdf1f94f8ca7ee6193
   Verifying Hash Integrity ... sha256+ OK
## Loading ramdisk from FIT Image at 90000000 ...
   Using 'conf at 1' configuration
   Trying 'ramdisk at 1' ramdisk subimage
     Description:  Ramdisk Image for Tegra TX2
     Type:         RAMDisk Image
     Compression:  gzip compressed
     Data Start:   0x920eca74
     Data Size:    5565090 Bytes = 5.3 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x82a00000
     Entry Point:  0x82a00000
     Hash algo:    sha256
     Hash value:   b248b753bb8c599756c40fc3f11b9c418e6638872f6af3ee44243af69a4f0b3f
   Verifying Hash Integrity ... sha256+ OK
   Loading ramdisk from 0x920eca74 to 0x82a00000
## Loading fdt from FIT Image at 90000000 ...
   Using 'conf at 1' configuration
   Trying 'fdt at 1' fdt subimage
     Description:  DTB for Tegra TX2
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x920989cc
     Data Size:    344019 Bytes = 336 KiB
     Architecture: AArch64
     Hash algo:    sha256
     Hash value:   f2b4b8ac842eac0acfe25e129e102d9919ad16ce40499b079b4a73eb1f39f059
   Verifying Hash Integrity ... sha256+ OK
   Booting using the fdt blob at 0x920989cc
   Loading Kernel Image ... OK
   reserving fdt memory region: addr=80000000 size=10000
   Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
   Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... OK

Starting kernel ..."

Thanks again for your time.

- Rayees

-----Original Message-----
From: Simon Glass <sjg@chromium.org> 
Sent: Monday, October 21, 2019 2:13 PM
To: Rayees Shamsuddin <Rayees.Shamsuddin@intusurg.com>
Cc: u-boot at lists.denx.de
Subject: [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2

Hi Rayees,

On Sat, 19 Oct 2019 at 20:14, Rayees Shamsuddin <Rayees.Shamsuddin@intusurg.com> wrote:
>
> Simon,
>
> Thanks for all your great and pioneering effort on verified u-boot. I am benefiting a lot for your work. I am trying to implement verified u-boot on Tegra TX2.
>
> Based on the wonderful documentation that you provided, I was able to 
> successfully create a fit image and got the dtb and kernel to boot. 
> But I ran into some issues when I incorporated ramdisk into the fit 
> image. Initially, it would get stuck on “Starting kernel …”. Then I 
> modified the environment as follows setenv initrd_high 8effffff setenv 
> fdt_high 8effffff
>
> Initially it was set to
> fdt_high=ffffffffffffffff
> initrd_high=ffffffffffffffff
>
> I haven’t quite understood why this change caused the kernel to load. Is it because initrd_high=ffffffffffffffff overwrites the relocatable u-boot code?
>
> Anyway after this change, I got the kernel to boot, but with one caveat – the RAMDISK couldn’t be loaded.
>
>    Booting using the fdt blob at 0x920989cc
>    Loading Kernel Image ... OK
>    reserving fdt memory region: addr=80000000 size=10000
>    Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
>    Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... 
> OK
>
> Starting kernel ...
>
> [    0.000000] Booting Linux on physical CPU 0x100
>
> However, I saw the message
> [    5.403174] RAMDISK: Couldn't find valid RAM disk image starting at 0.
>
> I would be grateful if you could provide me some guidance on what might be causing this issue or how to go about resolving this.

Are you saying that it works correctly without verified boot?

Normally U-Boot should pass a pointer to the ramdisk to linux. That should not change with vboot.

Regards,
Simon

>
> Thanks and Regards
> Rayees Shamsuddin
> Product Security Engineer
> Intuitive Surgical
>
> Tegra.its
>
> /dts-v1/;
> / {
>     description = "fitImage for Tegra TX2";
>     #address-cells = <1>;
>     images {
>         kernel at 1 {
>             description = "Linux kernel";
>             data = /incbin/("Image");
>             arch = "arm64";
>             os = "linux";
>             type = "kernel";
>             compression = "none";
>             load = <0x80280000>;
>             entry = <0x80280000>;
>             hash at 1 {
>                 algo = "sha256";
>             };
>         };
>         fdt at 1 {
>             description = "DTB for Tegra TX2";
>             data = /incbin/("tegra186-quill-p3310-1000-c03-00-base.dtb");
>             type = "flat_dt";
>             arch = "arm64";
>             compression = "none";
>             hash at 1 {
>                 algo = "sha256";
>             };
>         };
>         ramdisk at 1 {
>             description = "Ramdisk Image for Tegra TX2";
>             data = /incbin/("initrd");
>             type = "ramdisk";
>             arch = "arm64";
>             os = "linux";
>             compression = "gzip";
>             load = <0x82a00000>;
>             entry = <0x82a00000>;
>             hash at 1 {
>                  algo = "sha256";
>             };
>         };
>     };
>     configurations {
>         default = "conf at 1";
>         conf at 1 {
>             description = "Boot Linux kernel, FDT blob and ramdisk";
>             kernel = "kernel at 1";
>             fdt = "fdt at 1";
>             ramdisk = "ramdisk at 1";
>             signature at 1 {
>                 algo = "sha256,rsa4096";
>                 key-name-hint = "tx2_key";
>                 sign-images = "fdt", "kernel", "ramdisk";
>             };
>         };
>     };
> };
>
>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NOTE THAT THIS EMAIL ORIGINATED FROM OUTSIDE OF INTUITIVE SURGICAL..
Be alert for fraudulent emails that spoof internal “@intusurg.com” email addresses.  Report these or other security threats to: ITHelpNow at intusurg.com.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: u-boot_env2.txt
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191021/6de20fe0/attachment.txt>

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

* [U-Boot] [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2
  2019-10-21 21:55   ` [U-Boot] [EXTERNAL] " Rayees Shamsuddin
@ 2019-10-21 22:54     ` Simon Glass
  2019-10-22  0:21       ` Rayees Shamsuddin
  2019-10-23  4:28       ` Rayees Shamsuddin
  0 siblings, 2 replies; 8+ messages in thread
From: Simon Glass @ 2019-10-21 22:54 UTC (permalink / raw)
  To: u-boot

Hi Rayees,

On Mon, 21 Oct 2019 at 15:55, Rayees Shamsuddin
<Rayees.Shamsuddin@intusurg.com> wrote:
>
> Hi Simon,
>
> In the normal u-boot, they used extlinux to specify the ramdisk. I was using bootm to load the ramdisk.
>
> This is the normal boot up terminal logs.
>
> "MMC: no card present
> switch to partitions #0, OK
> mmc0(part 0) is current device
> Scanning mmc 0:1...
> Found /boot/extlinux/extlinux.conf
> Retrieving file: /boot/extlinux/extlinux.conf
> 727 bytes read in 105 ms (5.9 KiB/s)
> L4T boot options
> 1:      primary kernel
> Enter choice: 1:        primary kernel
> Retrieving file: /boot/initrd
> 5565090 bytes read in 213 ms (24.9 MiB/s)
> Retrieving file: /boot/Image
> 34179080 bytes read in 857 ms (38 MiB/s)
> append: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1
> ## Flattened Device Tree blob at 80000000
>    Booting using the fdt blob at 0x80000000
>    reserving fdt memory region: addr=80000000 size=10000
>    Using Device Tree in place at 0000000080000000, end 0000000080058f8e
>
> Starting kernel ..."
>
> My sequence with vboot was to set the bootargs first,then the initrd_high and fdt_high and then load to e-mmc and then call bootm. In the u-boot env, the following values were there. I am attaching the output of printenv here, if that could give some clues on what I am doing differently.
>
> kernel_addr_r=80280000
> kernel_addr_r_aliases=loadaddr
> loadaddr=80280000
> ramdisk_addr_r=82a00000
>
> "U-Boot 2016.07-dirty (Oct 16 2019 - 16:12:24 -0700)
>
> TEGRA186
> Model: NVIDIA P2771-0000-500
> DRAM:  7.8 GiB
> MC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
> *** Warning - bad CRC, using default environment
>
> In:    serial
> Out:   serial
> Err:   serial
> Net:   eth0: ethernet at 2490000
> Hit any key to stop autoboot:  0
> Tegra186 (P2771-0000-500) # setenv bootargs root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1
> Tegra186 (P2771-0000-500) # setenv initrd_high 8effffff
> Tegra186 (P2771-0000-500) # setenv fdt_high 8effffff
> Tegra186 (P2771-0000-500) # ext2load mmc 0 0x90000000 /boot/tegra.fit
> 40090346 bytes read in 1051 ms (36.4 MiB/s)
> Tegra186 (P2771-0000-500) # bootm 0x90000000
> ## Loading kernel from FIT Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Verifying Hash Integrity ... sha256,rsa4096:tx2_key+ OK
>    Trying 'kernel at 1' kernel subimage
>      Description:  Linux kernel
>      Type:         Kernel Image
>      Compression:  uncompressed
>      Data Start:   0x900000c8
>      Data Size:    34179080 Bytes = 32.6 MiB
>      Architecture: AArch64
>      OS:           Linux
>      Load Address: 0x80280000
>      Entry Point:  0x80280000
>      Hash algo:    sha256
>      Hash value:   417be59a15deda06283bdfdc2ef08911c27c0fbb3e4581fdf1f94f8ca7ee6193
>    Verifying Hash Integrity ... sha256+ OK
> ## Loading ramdisk from FIT Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Trying 'ramdisk at 1' ramdisk subimage
>      Description:  Ramdisk Image for Tegra TX2
>      Type:         RAMDisk Image
>      Compression:  gzip compressed
>      Data Start:   0x920eca74
>      Data Size:    5565090 Bytes = 5.3 MiB
>      Architecture: AArch64
>      OS:           Linux
>      Load Address: 0x82a00000
>      Entry Point:  0x82a00000
>      Hash algo:    sha256
>      Hash value:   b248b753bb8c599756c40fc3f11b9c418e6638872f6af3ee44243af69a4f0b3f
>    Verifying Hash Integrity ... sha256+ OK
>    Loading ramdisk from 0x920eca74 to 0x82a00000
> ## Loading fdt from FIT Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Trying 'fdt at 1' fdt subimage
>      Description:  DTB for Tegra TX2
>      Type:         Flat Device Tree
>      Compression:  uncompressed
>      Data Start:   0x920989cc
>      Data Size:    344019 Bytes = 336 KiB
>      Architecture: AArch64
>      Hash algo:    sha256
>      Hash value:   f2b4b8ac842eac0acfe25e129e102d9919ad16ce40499b079b4a73eb1f39f059
>    Verifying Hash Integrity ... sha256+ OK
>    Booting using the fdt blob at 0x920989cc
>    Loading Kernel Image ... OK
>    reserving fdt memory region: addr=80000000 size=10000
>    Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
>    Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... OK
>
> Starting kernel ..."
>
> Thanks again for your time.

+Stephen Warren who may have some ideas.

I think that you should turn off vboot and get the FIT image running
without that, to eliminate any problems. To me it seems that U-Boot is
working correctly, but I'm not sure why the RAM disk cannot be found.

In terms of the U-Boot code:

image_setup_libfdt() sets up the device tree (which contains info
about the initrd)
fdt_initrd() is the function that actually writes the info to the DT

I suppose it is possible that the device tree does not have any spare
space in it, and the error handling is broken in some way so it is not
telling you. Other than that, I'm not sure.

Regards,
Simon

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

* [U-Boot] [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2
  2019-10-21 22:54     ` Simon Glass
@ 2019-10-22  0:21       ` Rayees Shamsuddin
  2019-10-23  4:28       ` Rayees Shamsuddin
  1 sibling, 0 replies; 8+ messages in thread
From: Rayees Shamsuddin @ 2019-10-22  0:21 UTC (permalink / raw)
  To: u-boot

Hi Simon,

Thanks again for all your help. The one thing I wasn't sure is regarding the compression type for the ramdisk. It is gzip compressed, but some commit comments indicated that I should keep compression type as none since the kernel should be uncompressing the ramdisk. 
https://gitlab.denx.de/u-boot/u-boot/commit/bddd985734653c366c8da073650930fb2e9b5003
The version of u-boot that I used doesn't support gzip compression. Hence I am assuming that u-boot doesn't do any decompression.

I can instrument the code in image_setup_libfdt() and see what address is used with the normal u-boot stock version from the Tegra bsp and try to mimic that.

I am not sure if you meant to cc Stephen - didn’t see Stephen cc'ed in the previous email.

- Rayees

-----Original Message-----
From: Simon Glass <sjg@chromium.org> 
Sent: Monday, October 21, 2019 3:54 PM
To: Rayees Shamsuddin <Rayees.Shamsuddin@intusurg.com>
Cc: u-boot at lists.denx.de
Subject: Re: [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2

Hi Rayees,

On Mon, 21 Oct 2019 at 15:55, Rayees Shamsuddin <Rayees.Shamsuddin@intusurg.com> wrote:
>
> Hi Simon,
>
> In the normal u-boot, they used extlinux to specify the ramdisk. I was using bootm to load the ramdisk.
>
> This is the normal boot up terminal logs.
>
> "MMC: no card present
> switch to partitions #0, OK
> mmc0(part 0) is current device
> Scanning mmc 0:1...
> Found /boot/extlinux/extlinux.conf
> Retrieving file: /boot/extlinux/extlinux.conf
> 727 bytes read in 105 ms (5.9 KiB/s)
> L4T boot options
> 1:      primary kernel
> Enter choice: 1:        primary kernel
> Retrieving file: /boot/initrd
> 5565090 bytes read in 213 ms (24.9 MiB/s) Retrieving file: /boot/Image
> 34179080 bytes read in 857 ms (38 MiB/s)
> append: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 
> console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1 ## Flattened Device Tree blob at 80000000
>    Booting using the fdt blob at 0x80000000
>    reserving fdt memory region: addr=80000000 size=10000
>    Using Device Tree in place at 0000000080000000, end 
> 0000000080058f8e
>
> Starting kernel ..."
>
> My sequence with vboot was to set the bootargs first,then the initrd_high and fdt_high and then load to e-mmc and then call bootm. In the u-boot env, the following values were there. I am attaching the output of printenv here, if that could give some clues on what I am doing differently.
>
> kernel_addr_r=80280000
> kernel_addr_r_aliases=loadaddr
> loadaddr=80280000
> ramdisk_addr_r=82a00000
>
> "U-Boot 2016.07-dirty (Oct 16 2019 - 16:12:24 -0700)
>
> TEGRA186
> Model: NVIDIA P2771-0000-500
> DRAM:  7.8 GiB
> MC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
> *** Warning - bad CRC, using default environment
>
> In:    serial
> Out:   serial
> Err:   serial
> Net:   eth0: ethernet at 2490000
> Hit any key to stop autoboot:  0
> Tegra186 (P2771-0000-500) # setenv bootargs root=/dev/mmcblk0p1 rw 
> rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 
> fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 
> earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt 
> usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 
> boot.slot_suffix= boot.ratchetvalues=0.2031647.1 
> bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1
> Tegra186 (P2771-0000-500) # setenv initrd_high 8effffff
> Tegra186 (P2771-0000-500) # setenv fdt_high 8effffff
> Tegra186 (P2771-0000-500) # ext2load mmc 0 0x90000000 /boot/tegra.fit
> 40090346 bytes read in 1051 ms (36.4 MiB/s)
> Tegra186 (P2771-0000-500) # bootm 0x90000000 ## Loading kernel from 
> FIT Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Verifying Hash Integrity ... sha256,rsa4096:tx2_key+ OK
>    Trying 'kernel at 1' kernel subimage
>      Description:  Linux kernel
>      Type:         Kernel Image
>      Compression:  uncompressed
>      Data Start:   0x900000c8
>      Data Size:    34179080 Bytes = 32.6 MiB
>      Architecture: AArch64
>      OS:           Linux
>      Load Address: 0x80280000
>      Entry Point:  0x80280000
>      Hash algo:    sha256
>      Hash value:   417be59a15deda06283bdfdc2ef08911c27c0fbb3e4581fdf1f94f8ca7ee6193
>    Verifying Hash Integrity ... sha256+ OK ## Loading ramdisk from FIT 
> Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Trying 'ramdisk at 1' ramdisk subimage
>      Description:  Ramdisk Image for Tegra TX2
>      Type:         RAMDisk Image
>      Compression:  gzip compressed
>      Data Start:   0x920eca74
>      Data Size:    5565090 Bytes = 5.3 MiB
>      Architecture: AArch64
>      OS:           Linux
>      Load Address: 0x82a00000
>      Entry Point:  0x82a00000
>      Hash algo:    sha256
>      Hash value:   b248b753bb8c599756c40fc3f11b9c418e6638872f6af3ee44243af69a4f0b3f
>    Verifying Hash Integrity ... sha256+ OK
>    Loading ramdisk from 0x920eca74 to 0x82a00000 ## Loading fdt from 
> FIT Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Trying 'fdt at 1' fdt subimage
>      Description:  DTB for Tegra TX2
>      Type:         Flat Device Tree
>      Compression:  uncompressed
>      Data Start:   0x920989cc
>      Data Size:    344019 Bytes = 336 KiB
>      Architecture: AArch64
>      Hash algo:    sha256
>      Hash value:   f2b4b8ac842eac0acfe25e129e102d9919ad16ce40499b079b4a73eb1f39f059
>    Verifying Hash Integrity ... sha256+ OK
>    Booting using the fdt blob at 0x920989cc
>    Loading Kernel Image ... OK
>    reserving fdt memory region: addr=80000000 size=10000
>    Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
>    Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... 
> OK
>
> Starting kernel ..."
>
> Thanks again for your time.

+Stephen Warren who may have some ideas.

I think that you should turn off vboot and get the FIT image running without that, to eliminate any problems. To me it seems that U-Boot is working correctly, but I'm not sure why the RAM disk cannot be found.

In terms of the U-Boot code:

image_setup_libfdt() sets up the device tree (which contains info about the initrd)
fdt_initrd() is the function that actually writes the info to the DT

I suppose it is possible that the device tree does not have any spare space in it, and the error handling is broken in some way so it is not telling you. Other than that, I'm not sure.

Regards,
Simon

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

* [U-Boot] [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2
  2019-10-21 22:54     ` Simon Glass
  2019-10-22  0:21       ` Rayees Shamsuddin
@ 2019-10-23  4:28       ` Rayees Shamsuddin
  2019-10-24  0:51         ` Rayees Shamsuddin
  1 sibling, 1 reply; 8+ messages in thread
From: Rayees Shamsuddin @ 2019-10-23  4:28 UTC (permalink / raw)
  To: u-boot

Hi Simon,

I got some more information by instrumenting the u-boot functions that you suggested and made appropriate modifications, but still the kernel logs show RAMDISK error.
"RAMDISK: Couldn't find valid RAM disk image starting at 0."

This is with the normal u-boot from Tegra
INFO_RAYEES: *initrd_start is 82a00000, initrd_end is 82f4eaa2

I got this with the fit image (setenv initrd_high 8effffff; setenv fdt_high 8effffff)
INFO_RAYEES: *initrd_start is 8eab1000, initrd_end is 8efffaa2

Then I adjusted the initrd_high and fdt_high to be 82F4EFFF which yielded:
INFO_RAYEES: *initrd_start is 82a00000, initrd_end is 82f4eaa2

This is similar to the normal u-boot, yet has the same RAMDISK error. I am surprised that I had to change the initrd_high and fdt_high to achieve this load address.
I had specified the load address for ramdisk, wondering why it didn’t take effect?

The other difference I can see is in the FDT address:

Normal u-boot
## Flattened Device Tree blob at 80000000
   Booting using the fdt blob at 0x80000000
   reserving fdt memory region: addr=80000000 size=10000
   Using Device Tree in place at 0000000080000000, end 0000000080058f8e

With FIT image
   Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... OK

Can I specify the load address for FDT blob as well in the fit image? Does it matter?

- Rayees

-----Original Message-----
From: Simon Glass <sjg@chromium.org> 
Sent: Monday, October 21, 2019 3:54 PM
To: Rayees Shamsuddin <Rayees.Shamsuddin@intusurg.com>
Cc: u-boot at lists.denx.de
Subject: Re: [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2

Hi Rayees,

On Mon, 21 Oct 2019 at 15:55, Rayees Shamsuddin <Rayees.Shamsuddin@intusurg.com> wrote:
>
> Hi Simon,
>
> In the normal u-boot, they used extlinux to specify the ramdisk. I was using bootm to load the ramdisk.
>
> This is the normal boot up terminal logs.
>
> "MMC: no card present
> switch to partitions #0, OK
> mmc0(part 0) is current device
> Scanning mmc 0:1...
> Found /boot/extlinux/extlinux.conf
> Retrieving file: /boot/extlinux/extlinux.conf
> 727 bytes read in 105 ms (5.9 KiB/s)
> L4T boot options
> 1:      primary kernel
> Enter choice: 1:        primary kernel
> Retrieving file: /boot/initrd
> 5565090 bytes read in 213 ms (24.9 MiB/s) Retrieving file: /boot/Image
> 34179080 bytes read in 857 ms (38 MiB/s)
> append: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 
> console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1 ## Flattened Device Tree blob at 80000000
>    Booting using the fdt blob at 0x80000000
>    reserving fdt memory region: addr=80000000 size=10000
>    Using Device Tree in place at 0000000080000000, end 
> 0000000080058f8e
>
> Starting kernel ..."
>
> My sequence with vboot was to set the bootargs first,then the initrd_high and fdt_high and then load to e-mmc and then call bootm. In the u-boot env, the following values were there. I am attaching the output of printenv here, if that could give some clues on what I am doing differently.
>
> kernel_addr_r=80280000
> kernel_addr_r_aliases=loadaddr
> loadaddr=80280000
> ramdisk_addr_r=82a00000
>
> "U-Boot 2016.07-dirty (Oct 16 2019 - 16:12:24 -0700)
>
> TEGRA186
> Model: NVIDIA P2771-0000-500
> DRAM:  7.8 GiB
> MC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
> *** Warning - bad CRC, using default environment
>
> In:    serial
> Out:   serial
> Err:   serial
> Net:   eth0: ethernet at 2490000
> Hit any key to stop autoboot:  0
> Tegra186 (P2771-0000-500) # setenv bootargs root=/dev/mmcblk0p1 rw 
> rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 
> fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 
> earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt 
> usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 
> boot.slot_suffix= boot.ratchetvalues=0.2031647.1 
> bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1
> Tegra186 (P2771-0000-500) # setenv initrd_high 8effffff
> Tegra186 (P2771-0000-500) # setenv fdt_high 8effffff
> Tegra186 (P2771-0000-500) # ext2load mmc 0 0x90000000 /boot/tegra.fit
> 40090346 bytes read in 1051 ms (36.4 MiB/s)
> Tegra186 (P2771-0000-500) # bootm 0x90000000 ## Loading kernel from 
> FIT Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Verifying Hash Integrity ... sha256,rsa4096:tx2_key+ OK
>    Trying 'kernel at 1' kernel subimage
>      Description:  Linux kernel
>      Type:         Kernel Image
>      Compression:  uncompressed
>      Data Start:   0x900000c8
>      Data Size:    34179080 Bytes = 32.6 MiB
>      Architecture: AArch64
>      OS:           Linux
>      Load Address: 0x80280000
>      Entry Point:  0x80280000
>      Hash algo:    sha256
>      Hash value:   417be59a15deda06283bdfdc2ef08911c27c0fbb3e4581fdf1f94f8ca7ee6193
>    Verifying Hash Integrity ... sha256+ OK ## Loading ramdisk from FIT 
> Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Trying 'ramdisk at 1' ramdisk subimage
>      Description:  Ramdisk Image for Tegra TX2
>      Type:         RAMDisk Image
>      Compression:  gzip compressed
>      Data Start:   0x920eca74
>      Data Size:    5565090 Bytes = 5.3 MiB
>      Architecture: AArch64
>      OS:           Linux
>      Load Address: 0x82a00000
>      Entry Point:  0x82a00000
>      Hash algo:    sha256
>      Hash value:   b248b753bb8c599756c40fc3f11b9c418e6638872f6af3ee44243af69a4f0b3f
>    Verifying Hash Integrity ... sha256+ OK
>    Loading ramdisk from 0x920eca74 to 0x82a00000 ## Loading fdt from 
> FIT Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Trying 'fdt at 1' fdt subimage
>      Description:  DTB for Tegra TX2
>      Type:         Flat Device Tree
>      Compression:  uncompressed
>      Data Start:   0x920989cc
>      Data Size:    344019 Bytes = 336 KiB
>      Architecture: AArch64
>      Hash algo:    sha256
>      Hash value:   f2b4b8ac842eac0acfe25e129e102d9919ad16ce40499b079b4a73eb1f39f059
>    Verifying Hash Integrity ... sha256+ OK
>    Booting using the fdt blob at 0x920989cc
>    Loading Kernel Image ... OK
>    reserving fdt memory region: addr=80000000 size=10000
>    Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
>    Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... 
> OK
>
> Starting kernel ..."
>
> Thanks again for your time.

+Stephen Warren who may have some ideas.

I think that you should turn off vboot and get the FIT image running without that, to eliminate any problems. To me it seems that U-Boot is working correctly, but I'm not sure why the RAM disk cannot be found.

In terms of the U-Boot code:

image_setup_libfdt() sets up the device tree (which contains info about the initrd)
fdt_initrd() is the function that actually writes the info to the DT

I suppose it is possible that the device tree does not have any spare space in it, and the error handling is broken in some way so it is not telling you. Other than that, I'm not sure.

Regards,
Simon

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

* [U-Boot] [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2
  2019-10-23  4:28       ` Rayees Shamsuddin
@ 2019-10-24  0:51         ` Rayees Shamsuddin
  2019-10-30  1:49           ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Rayees Shamsuddin @ 2019-10-24  0:51 UTC (permalink / raw)
  To: u-boot

Hi Simon,

I got the ramdisk loading problem sorted out by modifying values of initrd_high and fdt_high
setenv initrd_high 82F4EFFF; setenv fdt_high 824FFFFF

This resulted in:
   ramdisk load start = 0x82a00000, ramdisk load end = 0x82f4eaa2
## device tree at 00000000920989cc ... 00000000920ec99e (len=356307 [0x56FD3])
   Loading Device Tree to 00000000824a9000, end 00000000824fffd2 ... OK

Thanks for all your guidance and pointers.

- Rayees

-----Original Message-----
From: Rayees Shamsuddin 
Sent: Tuesday, October 22, 2019 9:29 PM
To: Simon Glass <sjg@chromium.org>
Cc: u-boot at lists.denx.de
Subject: RE: [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2

Hi Simon,

I got some more information by instrumenting the u-boot functions that you suggested and made appropriate modifications, but still the kernel logs show RAMDISK error.
"RAMDISK: Couldn't find valid RAM disk image starting at 0."

This is with the normal u-boot from Tegra
INFO_RAYEES: *initrd_start is 82a00000, initrd_end is 82f4eaa2

I got this with the fit image (setenv initrd_high 8effffff; setenv fdt_high 8effffff)
INFO_RAYEES: *initrd_start is 8eab1000, initrd_end is 8efffaa2

Then I adjusted the initrd_high and fdt_high to be 82F4EFFF which yielded:
INFO_RAYEES: *initrd_start is 82a00000, initrd_end is 82f4eaa2

This is similar to the normal u-boot, yet has the same RAMDISK error. I am surprised that I had to change the initrd_high and fdt_high to achieve this load address.
I had specified the load address for ramdisk, wondering why it didn’t take effect?

The other difference I can see is in the FDT address:

Normal u-boot
## Flattened Device Tree blob at 80000000
   Booting using the fdt blob at 0x80000000
   reserving fdt memory region: addr=80000000 size=10000
   Using Device Tree in place at 0000000080000000, end 0000000080058f8e

With FIT image
   Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... OK

Can I specify the load address for FDT blob as well in the fit image? Does it matter?

- Rayees

-----Original Message-----
From: Simon Glass <sjg@chromium.org>
Sent: Monday, October 21, 2019 3:54 PM
To: Rayees Shamsuddin <Rayees.Shamsuddin@intusurg.com>
Cc: u-boot at lists.denx.de
Subject: Re: [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2

Hi Rayees,

On Mon, 21 Oct 2019 at 15:55, Rayees Shamsuddin <Rayees.Shamsuddin@intusurg.com> wrote:
>
> Hi Simon,
>
> In the normal u-boot, they used extlinux to specify the ramdisk. I was using bootm to load the ramdisk.
>
> This is the normal boot up terminal logs.
>
> "MMC: no card present
> switch to partitions #0, OK
> mmc0(part 0) is current device
> Scanning mmc 0:1...
> Found /boot/extlinux/extlinux.conf
> Retrieving file: /boot/extlinux/extlinux.conf
> 727 bytes read in 105 ms (5.9 KiB/s)
> L4T boot options
> 1:      primary kernel
> Enter choice: 1:        primary kernel
> Retrieving file: /boot/initrd
> 5565090 bytes read in 213 ms (24.9 MiB/s) Retrieving file: /boot/Image
> 34179080 bytes read in 857 ms (38 MiB/s)
> append: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
> console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix= boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1 ## Flattened Device Tree blob at 80000000
>    Booting using the fdt blob at 0x80000000
>    reserving fdt memory region: addr=80000000 size=10000
>    Using Device Tree in place at 0000000080000000, end 
> 0000000080058f8e
>
> Starting kernel ..."
>
> My sequence with vboot was to set the bootargs first,then the initrd_high and fdt_high and then load to e-mmc and then call bootm. In the u-boot env, the following values were there. I am attaching the output of printenv here, if that could give some clues on what I am doing differently.
>
> kernel_addr_r=80280000
> kernel_addr_r_aliases=loadaddr
> loadaddr=80280000
> ramdisk_addr_r=82a00000
>
> "U-Boot 2016.07-dirty (Oct 16 2019 - 16:12:24 -0700)
>
> TEGRA186
> Model: NVIDIA P2771-0000-500
> DRAM:  7.8 GiB
> MC:   Tegra SD/MMC: 0, Tegra SD/MMC: 1
> *** Warning - bad CRC, using default environment
>
> In:    serial
> Out:   serial
> Err:   serial
> Net:   eth0: ethernet at 2490000
> Hit any key to stop autoboot:  0
> Tegra186 (P2771-0000-500) # setenv bootargs root=/dev/mmcblk0p1 rw 
> rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0
> fbcon=map:0 net.ifnames=0 video=tegrafb no_console_suspend=1
> earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000 gpt
> usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 
> boot.slot_suffix= boot.ratchetvalues=0.2031647.1
> bl_prof_dataptr=0x10000 at 0x275840000 sdhci_tegra.en_boot_part_access=1
> Tegra186 (P2771-0000-500) # setenv initrd_high 8effffff
> Tegra186 (P2771-0000-500) # setenv fdt_high 8effffff
> Tegra186 (P2771-0000-500) # ext2load mmc 0 0x90000000 /boot/tegra.fit
> 40090346 bytes read in 1051 ms (36.4 MiB/s)
> Tegra186 (P2771-0000-500) # bootm 0x90000000 ## Loading kernel from 
> FIT Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Verifying Hash Integrity ... sha256,rsa4096:tx2_key+ OK
>    Trying 'kernel at 1' kernel subimage
>      Description:  Linux kernel
>      Type:         Kernel Image
>      Compression:  uncompressed
>      Data Start:   0x900000c8
>      Data Size:    34179080 Bytes = 32.6 MiB
>      Architecture: AArch64
>      OS:           Linux
>      Load Address: 0x80280000
>      Entry Point:  0x80280000
>      Hash algo:    sha256
>      Hash value:   417be59a15deda06283bdfdc2ef08911c27c0fbb3e4581fdf1f94f8ca7ee6193
>    Verifying Hash Integrity ... sha256+ OK ## Loading ramdisk from FIT 
> Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Trying 'ramdisk at 1' ramdisk subimage
>      Description:  Ramdisk Image for Tegra TX2
>      Type:         RAMDisk Image
>      Compression:  gzip compressed
>      Data Start:   0x920eca74
>      Data Size:    5565090 Bytes = 5.3 MiB
>      Architecture: AArch64
>      OS:           Linux
>      Load Address: 0x82a00000
>      Entry Point:  0x82a00000
>      Hash algo:    sha256
>      Hash value:   b248b753bb8c599756c40fc3f11b9c418e6638872f6af3ee44243af69a4f0b3f
>    Verifying Hash Integrity ... sha256+ OK
>    Loading ramdisk from 0x920eca74 to 0x82a00000 ## Loading fdt from 
> FIT Image at 90000000 ...
>    Using 'conf at 1' configuration
>    Trying 'fdt at 1' fdt subimage
>      Description:  DTB for Tegra TX2
>      Type:         Flat Device Tree
>      Compression:  uncompressed
>      Data Start:   0x920989cc
>      Data Size:    344019 Bytes = 336 KiB
>      Architecture: AArch64
>      Hash algo:    sha256
>      Hash value:   f2b4b8ac842eac0acfe25e129e102d9919ad16ce40499b079b4a73eb1f39f059
>    Verifying Hash Integrity ... sha256+ OK
>    Booting using the fdt blob at 0x920989cc
>    Loading Kernel Image ... OK
>    reserving fdt memory region: addr=80000000 size=10000
>    Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
>    Loading Device Tree to 000000008ea5a000, end 000000008eab0fd2 ... 
> OK
>
> Starting kernel ..."
>
> Thanks again for your time.

+Stephen Warren who may have some ideas.

I think that you should turn off vboot and get the FIT image running without that, to eliminate any problems. To me it seems that U-Boot is working correctly, but I'm not sure why the RAM disk cannot be found.

In terms of the U-Boot code:

image_setup_libfdt() sets up the device tree (which contains info about the initrd)
fdt_initrd() is the function that actually writes the info to the DT

I suppose it is possible that the device tree does not have any spare space in it, and the error handling is broken in some way so it is not telling you. Other than that, I'm not sure.

Regards,
Simon

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

* [U-Boot] [EXTERNAL] Re: Need help with verified u-boot on Tegra TX2
  2019-10-24  0:51         ` Rayees Shamsuddin
@ 2019-10-30  1:49           ` Simon Glass
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2019-10-30  1:49 UTC (permalink / raw)
  To: u-boot

Hi Rayees,

On Wed, 23 Oct 2019 at 18:51, Rayees Shamsuddin
<Rayees.Shamsuddin@intusurg.com> wrote:
>
> Hi Simon,
>
> I got the ramdisk loading problem sorted out by modifying values of initrd_high and fdt_high
> setenv initrd_high 82F4EFFF; setenv fdt_high 824FFFFF
>
> This resulted in:
>    ramdisk load start = 0x82a00000, ramdisk load end = 0x82f4eaa2
> ## device tree at 00000000920989cc ... 00000000920ec99e (len=356307 [0x56FD3])
>    Loading Device Tree to 00000000824a9000, end 00000000824fffd2 ... OK
>
> Thanks for all your guidance and pointers.

OK that's great! Hopefully vboot is doing the right thing now...

Regards,
SImon

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

end of thread, other threads:[~2019-10-30  1:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-20  2:14 [U-Boot] Need help with verified u-boot on Tegra TX2 Rayees Shamsuddin
2019-10-21 21:13 ` Simon Glass
2019-10-21 21:55   ` [U-Boot] [EXTERNAL] " Rayees Shamsuddin
2019-10-21 22:54     ` Simon Glass
2019-10-22  0:21       ` Rayees Shamsuddin
2019-10-23  4:28       ` Rayees Shamsuddin
2019-10-24  0:51         ` Rayees Shamsuddin
2019-10-30  1:49           ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.