5.2 Configuring U-Boot
Since U-Boot is extremely flexible, many features should be carefully evaluated to help ensure security. One configuration setting, CONFIG_FIT_SIGNATURE, allows image signature verification and is at the heart of U-Boot’s Verified Boot methodology. Without the CONFIG_FIT_SIGNATURE setting, it is not possible to verify or even generate a properly signed FIT file.
Buildroot provides an easy mechanism to configure packages using the following syntax:
$ make <package name>-menuconfig
$ make uboot-menuconfigThe following menuconfig screenshots show the various parameters that will be modified for Secure Boot mode.
- To set CONFIG_FIT_SIGNATURE, select Boot options > Boot images >
Flattened Image Tree (FIT) > Enable signature verification of FIT
uImages.

- Under Command Line Interface > Boot commands, make sure the bootm and
Flattened Device Tree utility commands options are selected.

- Under Library routines > Security support, enable Use RSA
Library.

- Select Save and press Enter.
- In the Save configuration window, click Ok.
- In the Configuration written to .config window, select Exit and press Enter.
- Select Exit and press Enter repeatedly until the uboot-menuconfig window closes.
- Launch the build with the command below:
$ make
Hit any key to stop autoboot: 0
5687416 bytes read in 252 ms (21.5 MiB/s)
## Loading kernel from FIT Image at 24000000 ...
Using 'kernel_dtb' configuration
Verifying Hash Integrity ... OK
Trying 'kernel' kernel subimage
Description: Linux4SAM Linux kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x240000dc
Data Size: 5585416 Bytes = 5.3 MiB
Architecture: ARM
OS: Linux
Load Address: 0x22000000
Entry Point: 0x22000000
Hash algo: crc32
Hash value: 4f0bcbe7
Hash algo: sha1
Hash value: 00de2cecefac6b01395bb8ee4be44e51e44cfada
Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 24000000 ...
Using 'kernel_dtb' configuration
Verifying Hash Integrity ... OK
Trying 'base_fdt' fdt subimage
Description: SAM9X75-Curiosity Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x24553c24
Data Size: 41552 Bytes = 40.6 KiB
Architecture: ARM
Load Address: 0x23000000
Hash algo: crc32
Hash value: 80f013cd
Hash algo: sha1
Hash value: 6adf457e9a4dfc8f3827a5b1f5fd6f654cbbd287
Verifying Hash Integrity ... crc32+ sha1+ OK
Loading fdt from 0x24553c24 to 0x23000000
## Loading fdt from FIT Image at 24000000 ...
Using 'lan8840' configuration
Verifying Hash Integrity ... OK
Trying 'fdt_gmac_lan8840' fdt subimage
Description: Device Tree blob for LAN8840 RGMII PHY overlay
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x24561d74
Data Size: 2193 Bytes = 2.1 KiB
Architecture: ARM
Load Address: 0x23120000
Hash algo: crc32
Hash value: 8fefe6b7
Hash algo: sha1
Hash value: 6a06d90dc79fcdaddc7cddbad312b7a64f8d6b99
Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 24000000 ...
Using 'wilc' configuration
Verifying Hash Integrity ... OK
Trying 'fdt_wilcs02' fdt subimage
Description: Device Tree blob WILCS02 overlay
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x2456bbac
Data Size: 746 Bytes = 746 Bytes
Architecture: ARM
Load Address: 0x23170000
Hash algo: crc32
Hash value: fc2342dd
Hash algo: sha1
Hash value: 2c3df54af7c89034bae25fe844b9cba036354feb
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x23000000
Working FDT set to 23000000
Loading Kernel Image to 22000000
Loading Device Tree to 2fee7000, end 2fef46d0 ... OK
Working FDT set to 2fee7000
Starting kernel ...
