Skip to content

Tegra & Uboot Flattened Image Tree (FIT image)

Dan Walkes edited this page Mar 27, 2021 · 6 revisions

This wiki page contains instructions to demonstrate the u-boot FIT image for verified boot in Jetson Platforms which support u-boot (nano, and tx2).

Please use our stable branch dunfell-l4t-r32.4.3 that have the complete feature for Jetson's platform that support u-boot.

L4T 32.4.3 is included as part of JetPack 4.4.

Additional machines

Machine Name Description
jetson-tx2-cot Jetson TX2 with FIT-image support
jetson-nano-qspi-sd-cot Jetson Nano (SDcard version) with FIT-image support
jetson-nano-emmc-cot Jetson Nano (eMMC version) with FIT-image support

Setting up the build environment

  • The steps below are dedicated for Jetson Nano (eMMC version), please follow the same logic when using a different machine
$ git clone https://github.com/OE4T/tegra-demo-distro.git -b dunfell-l4t-r32.4.3
$ cd tegra-demo-distro
$ git submodule update --init --recursive
$ unset NVIDIA_DEVNET_MIRROR
$ export NVIDIA_DEVNET_MIRROR="/PATH/TO/JETPACK_4.4/nvidia/sdkm_downloads"
$ . ./setup-env --machine jetson-nano-emmc-cot --distro tegrademo build_jetson_nano

Enable FIT image signing (optional)

Generate key pair and certificate

$ mkdir keys 
$ openssl genrsa -F4 -out keys/dev.key 2048
$ openssl req -batch -new -x509 -key keys/dev.key -out keys/dev.crt

Add the following lines into conf/local.conf

UBOOT_SIGN_KEYDIR = "/PATH/TO/keys"
UBOOT_SIGN_KEYNAME = "dev"
UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"
UBOOT_SIGN_ENABLE = "1"

build

  • All is ready now, let's start the build
$ bitbake demo-image-base 

Note: The FIT-image is supported only for tegrademo distro, it will be available soon for the tegrademo-mender

Console output

Unsigned FIT image

U-Boot 2020.04 (Feb 22 2021 - 12:10:38 +0000)

SoC: tegra210
Model: NVIDIA Jetson Nano Developer Kit
Board: NVIDIA P3450-0002
DRAM:  4 GiB
MMC:   sdhci@700b0000: 1, sdhci@700b0600: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  0 
12128448 bytes read in 282 ms (41 MiB/s)
## Loading kernel from FIT Image at 90000000 ...
   Using 'conf@' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x90000118
     Data Size:    12126757 Bytes = 11.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x80080000
     Entry Point:  0x80080000
     Hash algo:    sha256
     Hash value:   a6b66f30ff9cc165419f704b69092d12cfbb52b85e6d88bc0fcbd0facc7c1347
   Verifying Hash Integrity ... sha256+ OK
## Flattened Device Tree blob at 83100000
   Booting using the fdt blob at 0x83100000
   Uncompressing Kernel Image
ERROR: reserving fdt memory region failed (addr=0 size=0)
ERROR: reserving fdt memory region failed (addr=0 size=0)
   Using Device Tree in place at 0000000083100000, end 00000000831777ff
copying carveout for /host1x@50000000/dc@54200000...
copying carveout for /host1x@50000000/dc@54240000...

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.140-l4t-r32.4+g166b394331e2 (oe-user@oe-host) (gcc version 8.3.0 (GCC) ) #1 SMP PREEMPT Thu Jan 28 12:25:47 UTC 2021
[    0.000000] Boot CPU: AArch64 Processor [411fd071]

Signed FIT image

U-Boot 2020.04 (Feb 22 2021 - 12:10:38 +0000)
SoC: tegra210
Model: NVIDIA Jetson Nano Developer Kit
Board: NVIDIA P3450-0002
DRAM:  4 GiB
MMC:   sdhci@700b0000: 1, sdhci@700b0600: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  0 
12128634 bytes read in 281 ms (41.2 MiB/s)
## Loading kernel from FIT Image at 90000000 ...
   Using 'conf@' configuration
   Verifying Hash Integrity ... sha256,rsa2048:dev+ OK
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x90000118
     Data Size:    12126757 Bytes = 11.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x80080000
     Entry Point:  0x80080000
     Hash algo:    sha256
     Hash value:   5f4fd410d9a7bb34cadcb456f10b69905f5bb93298dcae5e9a5b6057886912d7
   Verifying Hash Integrity ... sha256+ OK
## Flattened Device Tree blob at 83100000
   Booting using the fdt blob at 0x83100000
   Uncompressing Kernel Image
ERROR: reserving fdt memory region failed (addr=0 size=0)
ERROR: reserving fdt memory region failed (addr=0 size=0)
   Using Device Tree in place at 0000000083100000, end 00000000831777ff
copying carveout for /host1x@50000000/dc@54200000...
copying carveout for /host1x@50000000/dc@54240000...
Starting kernel ...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.140-l4t-r32.4+g166b394331e2 (oe-user@oe-host) (gcc version 8.3.0 (GCC) ) #1 SMP PREEMPT Thu Jan 28 12:25:47 UTC 2021
[    0.000000] Boot CPU: AArch64 Processor [411fd071]