Hi,
We have Jetson Orin NX on Jetson Xavier NX Developer Kit Carrier Board installed with Jetson Linux R35.4.1 and enabled UEFI Secure Boot.
When we created BUP in Jetson Linux R35.6.0 environment and executed Capsule Update, UEFI Secure Boot was disabled and the UEFI variables we had set, such as PK, KEK, and DB, were cleared.
- When Capsule Update was executed using BUP created with R35.4.1 after installing R35.4.1, UEFI Secure Boot was not disabled.
- When Capsule Update was executed using BUP created with R35.6.0 after installing R35.6.0, UEFI Secure Boot was not disabled.
When Capsule Update was executed using BUP created with R35.6.0 after installing R35.4.1, is it expected that UEFI Secure Boot and UEFI variables are initialized?
The steps we took are listed below.
- Write R35.4.1 with l4t_initrd_flash.sh
- Enable UEFI Secure Boot with the attached script
enable_uefi-secureboot.zip (4.8 KB)
$ sudo apt update
$ unzip enable_uefi-secureboot.zip
$ cd enable_uefi-secureboot
$ ./enable-secureboot.sh
$ sudo reboot
- After rebooting, check that UEFI Secure Boot is enabled with efivar
$ efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-SecureBoot
GUID: 8be4df61-93ca-11d2-aa0d-00e098032b8c
Name: "SecureBoot"
Attributes:
Boot Service Access
Runtime Service Access
Value:
00000000 01
$ efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-PK
GUID: 8be4df61-93ca-11d2-aa0d-00e098032b8c
Name: "PK"
Attributes:
Non-Volatile
Boot Service Access
Runtime Service Access
Time-Based Authenticated Write Access
Value:
00000000 ...
$ efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-KEK
GUID: 8be4df61-93ca-11d2-aa0d-00e098032b8c
Name: "KEK"
Attributes:
Non-Volatile
Boot Service Access
Runtime Service Access
Time-Based Authenticated Write Access
Value:
00000000 ...
$ efivar -n d719b2cb-3d3a-4596-a3bc-dad00e67656f-db
GUID: d719b2cb-3d3a-4596-a3bc-dad00e67656f
Name: "db"
Attributes:
Non-Volatile
Boot Service Access
Runtime Service Access
Time-Based Authenticated Write Access
Value:
00000000 ...
- Create UEFI variables for testing with efivar
$ printf "\x07\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x01" | sudo dd of=/sys/firmware/efi/efivars/Test-39b68c46-f7fb-441b-b6ec-16b0f69821f3 bs=12;sync
$ efivar -n 39b68c46-f7fb-441b-b6ec-16b0f69821f3-Test
GUID: 39b68c46-f7fb-441b-b6ec-16b0f69821f3
Name: "Test"
Attributes:
Non-Volatile
Boot Service Access
Runtime Service Access
Value:
00000000 04 00 00 00 00 00 00 01 |........ |
- Create BUP with R35.6.0*
*: Replace eks_t234.img with Linux_for_Tegra/bootloader in the file attached below. This eks_t234.img is a fix for the problem of UEFI Secure Boot failing in R35.6.0.
new_eks.zip (504 Bytes)
$ cd Linux_for_Tegra
$ sudo FAB=000 BOARDID=3767 FUSELEVEL=fuselevel_production BOARDSKU=0000 ./build_l4t_bup.sh --bup-type bl p3509-a02+p3767-0000 internal
$ ./generate_capsule/l4t_generate_soc_capsule.sh -i bootloader/payloads_t23x/bl_only_payload -o ./TEGRA_BL.Cap t234
- Replace BOOTAA64.efi and executed CapsuleUpdate using TEGRA_BL.Cap with R35.6.0 using the attached script
$ ls
BOOTAA64.efi TEGRA_BL.Cap enable_uefi-secureboot enable_uefi-secureboot.zip setup_update.zip
$ unzip setup_update.zip
$ cd setup_update/
$ ./setup-update.sh
$ sudo reboot
- After rebooting, confirm that CapsuleUpdate is executed using BUP
Image of Capsule Update:
Check results after reboot:
$ sudo nvbootctrl dump-slots-info
[sudo] password for jetson:
Current version: 35.6.0
Capsule update status: 0
Current bootloader slot: B
Active bootloader slot: B
num_slots: 2
slot: 0, status: normal
slot: 1, status: normal
- Confirm that UEFI Secure Boot is disabled with efivar
$ efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-SecureBoot
GUID: 8be4df61-93ca-11d2-aa0d-00e098032b8c
Name: "SecureBoot"
Attributes:
Boot Service Access
Runtime Service Access
Value:
00000000 00
$ efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-PK
efivar: show variable: No such file or directory
$ efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-KEK
efivar: show variable: No such file or directory
$ efivar -n d719b2cb-3d3a-4596-a3bc-dad00e67656f-db
efivar: show variable: No such file or directory
- Confirm that the UEFI variables for testing have been deleted
$ efivar -n 39b68c46-f7fb-441b-b6ec-16b0f69821f3-Test
efivar: show variable: No such file or directory
FYI: Execute enable-secureboot.sh again to enable UEFI Secure Boot.
$ cd enable_uefi-secureboot/
$ rm BOOTAA64.efi*
$ ./enable-secureboot.sh
$ sudo reboot