Re: [U-Boot] Need help with verified u-boot on Tegra TX2

2019-10-21 Thread Simon Glass
Hi Rayees,

On Sat, 19 Oct 2019 at 20:14, Rayees Shamsuddin
 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 8eff
> setenv fdt_high 8eff
>
> Initially it was set to
> fdt_high=
> initrd_high=
>
> I haven’t quite understood why this change caused the kernel to load. Is it 
> because initrd_high= 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=8000 size=1
>Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
>Loading Device Tree to 8ea5a000, end 8eab0fd2 ... OK
>
> Starting kernel ...
>
> [0.00] 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@1 {
> description = "Linux kernel";
> data = /incbin/("Image");
> arch = "arm64";
> os = "linux";
> type = "kernel";
> compression = "none";
> load = <0x8028>;
> entry = <0x8028>;
> hash@1 {
> algo = "sha256";
> };
> };
> fdt@1 {
> description = "DTB for Tegra TX2";
> data = /incbin/("tegra186-quill-p3310-1000-c03-00-base.dtb");
> type = "flat_dt";
> arch = "arm64";
> compression = "none";
> hash@1 {
> algo = "sha256";
> };
> };
> ramdisk@1 {
> description = "Ramdisk Image for Tegra TX2";
> data = /incbin/("initrd");
> type = "ramdisk";
> arch = "arm64";
> os = "linux";
> compression = "gzip";
> load = <0x82a0>;
> entry = <0x82a0>;
> hash@1 {
>  algo = "sha256";
> };
> };
> };
> configurations {
> default = "conf@1";
> conf@1 {
> description = "Boot Linux kernel, FDT blob and ramdisk";
> kernel = "kernel@1";
> fdt = "fdt@1";
> ramdisk = "ramdisk@1";
> signature@1 {
> algo = "sha256,rsa4096";
> key-name-hint = "tx2_key";
> sign-images = "fdt", "kernel", "ramdisk";
> };
> };
> };
> };
>
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] Need help with verified u-boot on Tegra TX2

2019-10-19 Thread Rayees Shamsuddin
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 8eff
setenv fdt_high 8eff

Initially it was set to
fdt_high=
initrd_high=

I haven't quite understood why this change caused the kernel to load. Is it 
because initrd_high= 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=8000 size=1
   Loading Ramdisk to 8eab1000, end 8efffaa2 ... OK
   Loading Device Tree to 8ea5a000, end 8eab0fd2 ... OK

Starting kernel ...

[0.00] 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@1 {
description = "Linux kernel";
data = /incbin/("Image");
arch = "arm64";
os = "linux";
type = "kernel";
compression = "none";
load = <0x8028>;
entry = <0x8028>;
hash@1 {
algo = "sha256";
};
};
fdt@1 {
description = "DTB for Tegra TX2";
data = /incbin/("tegra186-quill-p3310-1000-c03-00-base.dtb");
type = "flat_dt";
arch = "arm64";
compression = "none";
hash@1 {
algo = "sha256";
};
};
ramdisk@1 {
description = "Ramdisk Image for Tegra TX2";
data = /incbin/("initrd");
type = "ramdisk";
arch = "arm64";
os = "linux";
compression = "gzip";
load = <0x82a0>;
entry = <0x82a0>;
hash@1 {
 algo = "sha256";
};
};
};
configurations {
default = "conf@1";
conf@1 {
description = "Boot Linux kernel, FDT blob and ramdisk";
kernel = "kernel@1";
fdt = "fdt@1";
ramdisk = "ramdisk@1";
signature@1 {
algo = "sha256,rsa4096";
key-name-hint = "tx2_key";
sign-images = "fdt", "kernel", "ramdisk";
};
};
};
};


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot