Ultimately I want to use the verified boot features of the uImage (FIT) and u-boot, but I want to start by just booting a regular uImage file. I am not having any luck and I am hoping someone has some ideas, or a recipe to get this working.
Note, it appears that I am trying to do something similar to the following other individuals (for tk1) but the answers don’t seem sufficient to unblock me:
https://stackoverflow.com/questions/26626471/linux-boot-arguments-with-u-boot-and-flat-image-tree-fit
https://unix.stackexchange.com/questions/367048/linux-cannot-boot-with-u-boot-and-fitflatten-image-tree/367586
Okay, here is what I did. I started with L4T 28.1 First rebuilt u-boot with the following additions to the u-boot configuration:
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
CONFIG_RSA=y
Then I used the following “.its” file to make a uImage (using the kernel Image and ftb from JetPack 3.1)
/dts-v1/;
/ {
description = "OS kernel image with one or more FDT blobs";
#address-cells = <1>;
images {
kernel@1 {
description = "Kernel";
data = /incbin/("./Image");
type = "kernel";
arch = "arm64";
os = "linux";
compression = "none";
load = <0x80080000>;
entry = <0x80080000>;
kernel-version = <1>;
hash@1 {
algo = "sha1";
};
};
fdt@1 {
description = "Device Tree";
data = /incbin/("./tegra186-quill-p3310-1000-c03-00-base.dtb");
type = "flat_dt";
arch = "arm64";
compression = "none";
fdt-version = <1>;
hash@1 {
algo = "sha1";
};
};
};
configurations {
default = "conf@1";
conf@1 {
description = "Linux Kernel, FDT blob.";
kernel = "kernel@1";
fdt = "fdt@1";
};
};
};
When I tried to boot the resulting image via bootm or sysboot I get the error:
Loading Kernel Image ... Image too large: increase CONFIG_SYS_BOOTM_LEN
So then in the file “p2771-0000.h” I added the line
#define CONFIG_SYS_BOOTM_LEN (22 << 20)
Then if I attempt a boot using “bootm” I get stalled at “Starting kernel …”:
Tegra186 (P2771-0000-500-DN) # load mmc 1:1 0x90000000 /boot/tx2_nosig.itb
20550003 bytes read in 2371 ms (8.3 MiB/s)
Tegra186 (P2771-0000-500-DN) # setenv bootargs ${cbootargs}
Tegra186 (P2771-0000-500-DN) # bootm 0x90000000
## Loading kernel from FIT Image at 90000000 ...
Using 'conf@1' configuration
Verifying Hash Integrity ... OK
Trying 'kernel@1' kernel subimage
Description: Kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x900000d4
Data Size: 20280368 Bytes = 19.3 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x80080000
Entry Point: 0x80080000
Hash algo: sha1
Hash value: 338323b244ba0128447646e7af8728f20056f690
Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 90000000 ...
Using 'conf@1' configuration
Trying 'fdt@1' fdt subimage
Description: Device Tree
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x913575fc
Data Size: 267812 Bytes = 261.5 KiB
Architecture: AArch64
Hash algo: sha1
Hash value: 7d5d421d71951d312266e04c9bb9017752097346
Verifying Hash Integrity ... sha1+ OK
Booting using the fdt blob at 0x913575fc
Loading Kernel Image ... OK
reserving fdt memory region: addr=80000000 size=10000
Using Device Tree in place at 00000000913575fc, end 000000009139bc1f
Starting kernel ...
If I take the ftb config out of the “its” I get a different error:
Tegra186 (P2771-0000-500-DN) # setenv bootargs ${cbootargs}
Tegra186 (P2771-0000-500-DN) # load mmc 1:1 0x90000000 /boot/tx2_nosign2.itb
20281983 bytes read in 2347 ms (8.2 MiB/s)
Tegra186 (P2771-0000-500-DN) # bootm 0x90000000
## Loading kernel from FIT Image at 90000000 ...
Using 'conf@1' configuration
Verifying Hash Integrity ... OK
Trying 'kernel@1' kernel subimage
Description: Kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x900000d4
Data Size: 20280368 Bytes = 19.3 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x80080000
Entry Point: 0x80080000
Hash algo: sha1
Hash value: 338323b244ba0128447646e7af8728f20056f690
Verifying Hash Integrity ... sha1+ OK
Loading Kernel Image ... OK
"Synchronous Abort" handler, esr 0x96000044
ELR: eff33910
LR: eff33904
x0 : 00000003967fc074 x1 : 00000000e59ff018
x2 : 0000000000000175 x3 : 0000000000000000
x4 : 0000000000000000 x5 : 00000000eff8a3b6
x6 : ffffffffffffffff x7 : 00000000004d5140
x8 : 00000000813d7430 x9 : 0000000000000008
x10: 9f57402aaf8728f2 x11: 7c8680580056f690
x12: 11d9f43ea0ed1fba x13: 59636207a9934acf
x14: c9255b0cccf5d145 x15: 000c92b7e4afdd77
x16: 0002865c7d1a7e0c x17: c151402a338323b2
x18: 00000000efb2ede0 x19: 00000000effa9500
x20: 00000000effa9500 x21: 000000000000070f
x22: 0000000000000000 x23: 00000000efb32dd8
x24: 00000000eff33924 x25: 0000000000000000
x26: 00000000eff9c700 x27: 0000000000000000
x28: 00000000900000d4 x29: 00000000efb2be60
I even tried referencing the uImage from the extlinux.conf file and using sysboot, but that resulted in yet a different failure. Can anyone give me some hints on what to try next?