Capsule update fails when flashed with custom xml

Hi,

I’m trying to make the UEFI capsule update method to work on a system flashed with a custom xml file - i.e XML is passed to flash.sh during provisioning. I’m doing this when migrating from 35.2 to 35.3, with a local build of uefi, if that matters. I’ve used the same uefi_jetson.bin during initial flashing and while generating the capsule. I’m using a local build to include symlinks support if that matters.

Problem is that uefi refuses to apply the capsule, with a debug build I got:

dce-fw not found in package: Not Found
FmpDxe(NVIDIA System Firmware): CheckTheImage() - FmpDeviceLib CheckImage failed. Status = Aborted
FmpDxe(NVIDIA System Firmware): SetTheImage() - Check The Image failed with Aborted.
FmpDxe(NVIDIA System Firmware): SetTheImage() - Check The Image returned that the Image was not valid for update.  Updatable value = 0x2.
HandleCapsules: capsule update complete, resetting ...
PROGRESS CODE: V0311100A I0
����Shutdown state requested 1
Rebooting system ...

Removing further checks in the uefi firmware to try to force the update yielded no results so far:

FwPackageValidateImageInfo WARNING: image info for 'BCT' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'BCT' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'BCT_A' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'BCT_A' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'BCT_B' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'BCT_B' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'BCT-boot-chain_backup' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'BCT-boot-chain_backup' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'mb1' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'mb1' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'psc_bl1' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'MB1_BCT' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'MB1_BCT' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'MEM_BCT' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'MEM_BCT' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'nvdec' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'mb2' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'mb2' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'bpmp-fw' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'bpmp-fw' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'bpmp-fw-dtb' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'bpmp-fw-dtb' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'psc-fw' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'mts-mce' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'sc7' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'pscrf' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'mb2rf' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'cpu-bootloader' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'cpu-bootloader' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'secure-os' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'eks' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'dce-fw' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'dce-fw' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'spe-fw' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'rce-fw' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'adsp-fw' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'VER' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'VER' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'xusb-fw' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'secondary_gpt' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'secondary_gpt' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'secondary_gpt_backup' has version=13617, expected=0
FwPackageValidateImageInfo WARNING: image info for 'secondary_gpt_backup' has version=13617, expected=0
dce-fw not found in package: Not Found
FmpDxe(NVIDIA System Firmware): CheckTheImage() - FmpDeviceLib CheckImage failed. Status = Aborted
FmpDxe(NVIDIA System Firmware): SetTheImage() - Check The Image failed with Aborted.

Update Progress -   5% **++++++++++++++++++++++++++++++++++++++++++++++++dce-fw not found in package: Not Found
FmpDxe(NVIDIA System Firmware): SetTheImage() SetImage from FmpDeviceLib failed. Status =  Aborted.
HandleCapsules: capsule update complete, resetting ...
PROGRESS CODE: V0311100A I0
����Shutdown state requested 1
Rebooting system ...

I also tried replacing the xml with my custom one (the one I passed to flash.sh) in both BASE_BSP and TARGET_BSP prior to generating the capsule, so that it gets used, but still no luck, the firmware refuses to apply the capsule.

Any suggestions on what I could do to make the UEFI capsule work with custom builds given the logs above? I’m not passing any key for signing the capsule, nor during flashing.

Thank you

Hi AlexCo,

Do you refer to the steps in Generating the Capsule Update Payload?

Does your issue occur at generating or triggering capsule update?

May I know what’s the use case for you using capsule update instead of just replacing with new uefi_jetson.bin in BSP package and flash?

What do you modify in XML?

Hi @KevinFFF ,

The issue occurs after triggering the capsule update, on next boot in UEFI firmware.
I remove the APP partition and add my own OS partitions that have different partition names.

The use-case for having a replaced uefi_jetson.bin is to include symlinks support, which has been merged in a newer edk2 revision, and I want to use the capsule update to update the uefi firmware OTA, i.e from jumping from L4T 35.2.1 to 35.3.1, etc.

Do you have bootloader/display-t234-dce.bin in your BSP package?

@KevinFFF yes, I do:

[  19.5480 ] Retrieving storage infomation
[  19.5485 ] tegrarcm_v2 --chip 0x23 0 --oem platformdetails storage storage_info.bin
[  19.5488 ] MB2 version 01.00.0000
[  20.4732 ] Saved platform info in storage_info.bin
[  21.4785 ] tegrarcm_v2 --chip 0x23 0 --ismb2applet
[  21.9743 ] tegrarcm_v2 --chip 0x23 0 --ismb2
[  21.9746 ] MB2 version 01.00.0000
[  22.4899 ] Flashing the device
[  22.4903 ] tegraparser_v2 --storageinfo storage_info.bin --generategpt --pt flash.xml.bin
[  22.4906 ] gpt_secondary_3_0.bin:
[  22.4912 ] partition_id	partition_name			      StartingLba	EndingLba
[  22.4916 ]            1	BCT                                 	       0	    2047
[  22.4921 ]            2	A_mb1                               	    2048	    3071
[  22.4928 ]            3	A_psc_bl1                           	    3072	    3583
[  22.4933 ]            4	A_MB1_BCT                           	    3584	    3839
[  22.4940 ]            5	A_MEM_BCT                           	    3840	    4351
[  22.4948 ]            6	A_tsec-fw                           	    4352	    6399
[  22.4954 ]            7	A_nvdec                             	    6400	    8447
[  22.4956 ]            8	A_mb2                               	    8448	    9471
[  22.4957 ]            9	A_xusb-fw                           	    9472	    9983
[  22.4957 ]           10	A_bpmp-fw                           	    9984	   13055
[  22.4957 ]           11	A_bpmp-fw-dtb                       	   13056	   21247
[  22.4957 ]           12	A_psc-fw                            	   21248	   22783
[  22.4957 ]           13	A_mts-mce                           	   22784	   23807
[  22.4957 ]           14	A_sc7                               	   23808	   24191
[  22.4957 ]           15	A_pscrf                             	   24192	   24575
[  22.4957 ]           16	A_mb2rf                             	   24576	   24831
[  22.4957 ]           17	A_cpu-bootloader                    	   24832	   31999
[  22.4958 ]           18	A_secure-os                         	   32000	   40191
[  22.4958 ]           19	A_smm-fw                            	   40192	   44287
[  22.4958 ]           20	A_eks                               	   44288	   44799
[  22.4958 ]           21	A_dce-fw                            	   44800	   55039
[  22.4958 ]           22	A_spe-fw                            	   55040	   56191
[  22.4958 ]           23	A_rce-fw                            	   56192	   58239
[  22.4958 ]           24	A_adsp-fw                           	   58240	   62335
[  22.4958 ]           25	A_reserved_on_boot                  	   62336	   65023
[  22.4958 ]           26	B_mb1                               	   65024	   66047
[  22.4958 ]           27	B_psc_bl1                           	   66048	   66559
[  22.4958 ]           28	B_MB1_BCT                           	   66560	   66815
[  22.4958 ]           29	B_MEM_BCT                           	   66816	   67327
[  22.4958 ]           30	B_tsec-fw                           	   67328	   69375
[  22.4959 ]           31	B_nvdec                             	   69376	   71423
[  22.4959 ]           32	B_mb2                               	   71424	   72447
[  22.4959 ]           33	B_xusb-fw                           	   72448	   72959
[  22.4959 ]           34	B_bpmp-fw                           	   72960	   76031
[  22.4959 ]           35	B_bpmp-fw-dtb                       	   76032	   84223
[  22.4959 ]           36	B_psc-fw                            	   84224	   85759
[  22.4959 ]           37	B_mts-mce                           	   85760	   86783
[  22.4959 ]           38	B_sc7                               	   86784	   87167
[  22.4959 ]           39	B_pscrf                             	   87168	   87551
[  22.4959 ]           40	B_mb2rf                             	   87552	   87807
[  22.4959 ]           41	B_cpu-bootloader                    	   87808	   94975
[  22.4959 ]           42	B_secure-os                         	   94976	  103167
[  22.4959 ]           43	B_smm-fw                            	  103168	  107263
[  22.4960 ]           44	B_eks                               	  107264	  107775
[  22.4960 ]           45	B_dce-fw                            	  107776	  118015
[  22.4960 ]           46	B_spe-fw                            	  118016	  119167
[  22.4960 ]           47	B_rce-fw                            	  119168	  121215
[  22.4960 ]           48	B_adsp-fw                           	  121216	  125311
[  22.4960 ]           49	B_reserved_on_boot                  	  125312	  127999
[  22.4960 ]           50	uefi_variables                      	  128000	  128511
[  22.4960 ]           51	uefi_ftw                            	  128512	  129535
[  22.4960 ]           52	worm                                	  129920	  130303
[  22.4960 ]           53	BCT-boot-chain_backup               	  130304	  130431
[  22.4960 ]           54	reserved_partition                  	  130432	  130559
[  22.4961 ]           55	secondary_gpt_backup                	  130560	  130687
[  22.4961 ]           56	B_VER                               	  130688	  130815
[  22.4961 ]           57	A_VER                               	  130816	  130943
[  22.4961 ] gpt_primary_1_3.bin:
[  22.4961 ] partition_id	partition_name			      StartingLba	EndingLba
[  22.4961 ]            1	A_kernel                            	      40	  262183
[  22.4961 ]            2	A_kernel-dtb                        	  262184	  263719
[  22.4961 ]            3	B_kernel                            	  263720	  525863
[  22.4961 ]            4	B_kernel-dtb                        	  525864	  527399
[  22.4961 ]            5	esp                                 	  527400	  665087
[  22.4961 ]            6	resin-boot                          	  665088	  747007
[  22.4961 ]            7	resin-rootA                         	  747008	 2754047
[  22.4962 ]            8	resin-rootB                         	 2754048	 4761087
[  22.4962 ]            9	resin-state                         	 4761088	 4802047
[  22.4962 ]           10	resin-data                          	 4802048	124321758
[  22.4962 ] gpt_secondary_1_3.bin:
[  22.4962 ] partition_id	partition_name			      StartingLba	EndingLba
[  22.4962 ]            1	A_kernel                            	      40	  262183
[  22.4962 ]            2	A_kernel-dtb                        	  262184	  263719
[  22.4962 ]            3	B_kernel                            	  263720	  525863
[  22.4962 ]            4	B_kernel-dtb                        	  525864	  527399
[  22.4962 ]            5	esp                                 	  527400	  665087
[  22.4962 ]            6	resin-boot                          	  665088	  747007
[  22.4962 ]            7	resin-rootA                         	  747008	 2754047
[  22.4963 ]            8	resin-rootB                         	 2754048	 4761087
[  22.4963 ]            9	resin-state                         	 4761088	 4802047
[  22.4963 ]           10	resin-data                          	 4802048	124321758
[  22.4963 ] 
[  22.4963 ] Start flashing
[  22.5343 ] tegradevflash_v2 --pt flash.xml.bin --create
[  22.5349 ] Bootloader version 01.00.0000
[  23.0343 ] Erasing spi: 0 ......... [Done]
[ 224.0299 ] Writing partition secondary_gpt with gpt_secondary_3_0.bin [ 16896 bytes ]
[ 224.0305 ] [................................................] 100%

[ 224.2484 ] Erasing sdmmc_user: 3 ......... [Done]
[ 226.0284 ] Writing partition master_boot_record with mbr_1_3.bin [ 512 bytes ]
[ 226.0292 ] [................................................] 100%
[ 226.0317 ] Writing partition primary_gpt with gpt_primary_1_3.bin [ 16896 bytes ]
[ 226.0333 ] [................................................] 100%
[ 226.0367 ] Writing partition secondary_gpt with gpt_secondary_1_3.bin [ 16896 bytes ]
[ 226.0445 ] [................................................] 100%

[ 226.0543 ] Writing partition A_mb1 with mb1_t234_prod_aligned_sigheader.bin.encrypt [ 259296 bytes ]
[ 226.0552 ] [................................................] 100%
[ 226.0652 ] Writing partition A_psc_bl1 with psc_bl1_t234_prod_aligned_sigheader.bin.encrypt [ 119296 bytes ]
[ 229.2536 ] [................................................] 100%
[ 229.2599 ] Writing partition A_nvdec with nvdec_t234_prod_sigheader.fw.encrypt [ 294912 bytes ]
[ 230.7263 ] [................................................] 100%
[ 230.7375 ] Writing partition A_mb2 with mb2_t234_with_mb2_cold_boot_bct_MB2_sigheader.bin.encrypt [ 437760 bytes ]
[ 234.3571 ] [................................................] 100%
[ 234.3740 ] Writing partition A_xusb-fw with xusb_t234_prod_sigheader.bin.encrypt [ 164352 bytes ]
[ 239.7453 ] [................................................] 100%
[ 239.7529 ] Writing partition A_bpmp-fw with bpmp_t234-TE990M-A1_prod_sigheader.bin.encrypt [ 1047616 bytes ]
[ 241.7720 ] [................................................] 100%
[ 241.8040 ] Writing partition A_bpmp-fw-dtb with tegra234-bpmp-3701-0000-3737-0000_with_odm_sigheader.dtb.encrypt [ 140416 bytes ]
[ 254.6615 ] [................................................] 100%
[ 254.6682 ] Writing partition A_psc-fw with pscfw_t234_prod_sigheader.bin.encrypt [ 375168 bytes ]
[ 256.4006 ] [................................................] 100%
[ 256.4139 ] Writing partition A_mts-mce with mce_flash_o10_cr_prod_sigheader.bin.encrypt [ 190592 bytes ]
[ 261.0215 ] [................................................] 100%
[ 261.0293 ] Writing partition A_sc7 with sc7_t234_prod_sigheader.bin.encrypt [ 164384 bytes ]
[ 263.3770 ] [................................................] 100%
[ 263.3852 ] Writing partition A_pscrf with psc_rf_t234_prod_sigheader.bin.encrypt [ 118784 bytes ]
[ 265.4121 ] [................................................] 100%
[ 265.4183 ] Writing partition A_mb2rf with mb2rf_t234_sigheader.bin.encrypt [ 122784 bytes ]
[ 266.8785 ] [................................................] 100%
[ 266.8845 ] Writing partition A_cpu-bootloader with uefi_jetson_with_dtb_sigheader.bin.encrypt [ 3394448 bytes ]
[ 268.3971 ] [................................................] 100%
[ 307.0915 ] Writing partition A_secure-os with tos-optee_t234_sigheader.img.encrypt [ 1064752 bytes ]
[ 310.1482 ] [................................................] 100%
[ 323.0446 ] Writing partition A_eks with eks_t234_sigheader.img.encrypt [ 9232 bytes ]
[ 323.2509 ] [................................................] 100%
[ 323.2541 ] Writing partition A_dce-fw with display-t234-dce_with_kernel_tegra234-p3701-0000-p3737-0000_aligned_blob_w_bin_sigheader.bin.encrypt [ 753632 bytes ]
[ 323.3797 ] [................................................] 100%
[ 323.4054 ] Writing partition A_spe-fw with spe_t234_sigheader.bin.encrypt [ 270336 bytes ]
[ 332.6524 ] [................................................] 100%
[ 332.6629 ] Writing partition A_rce-fw with camera-rtcpu-t234-rce_sigheader.img.encrypt [ 537952 bytes ]
[ 335.9810 ] [................................................] 100%
[ 335.9991 ] Writing partition A_adsp-fw with adsp-fw_sigheader.bin.encrypt [ 400944 bytes ]
[ 342.6033 ] [................................................] 100%
[ 342.6183 ] Writing partition B_mb1 with mb1_t234_prod_aligned_sigheader.bin.encrypt [ 259296 bytes ]
[ 347.5462 ] [................................................] 100%
[ 347.5553 ] Writing partition B_psc_bl1 with psc_bl1_t234_prod_aligned_sigheader.bin.encrypt [ 119296 bytes ]
[ 350.7442 ] [................................................] 100%
[ 350.7501 ] Writing partition B_nvdec with nvdec_t234_prod_sigheader.fw.encrypt [ 294912 bytes ]
[ 352.2159 ] [................................................] 100%
[ 352.2273 ] Writing partition B_mb2 with mb2_t234_with_mb2_cold_boot_bct_MB2_sigheader.bin.encrypt [ 437760 bytes ]
[ 355.8471 ] [................................................] 100%
[ 355.8622 ] Writing partition B_xusb-fw with xusb_t234_prod_sigheader.bin.encrypt [ 164352 bytes ]
[ 361.2338 ] [................................................] 100%
[ 361.2410 ] Writing partition B_bpmp-fw with bpmp_t234-TE990M-A1_prod_sigheader.bin.encrypt [ 1047616 bytes ]
[ 363.2603 ] [................................................] 100%
[ 363.2937 ] Writing partition B_bpmp-fw-dtb with tegra234-bpmp-3701-0000-3737-0000_with_odm_sigheader.dtb.encrypt [ 140416 bytes ]
[ 376.1512 ] [................................................] 100%
[ 376.1581 ] Writing partition B_psc-fw with pscfw_t234_prod_sigheader.bin.encrypt [ 375168 bytes ]
[ 377.8908 ] [................................................] 100%
[ 377.9051 ] Writing partition B_mts-mce with mce_flash_o10_cr_prod_sigheader.bin.encrypt [ 190592 bytes ]
[ 382.5128 ] [................................................] 100%
[ 382.5221 ] Writing partition B_sc7 with sc7_t234_prod_sigheader.bin.encrypt [ 164384 bytes ]
[ 384.8692 ] [................................................] 100%
[ 384.8764 ] Writing partition B_pscrf with psc_rf_t234_prod_sigheader.bin.encrypt [ 118784 bytes ]
[ 386.9039 ] [................................................] 100%
[ 386.9100 ] Writing partition B_mb2rf with mb2rf_t234_sigheader.bin.encrypt [ 122784 bytes ]
[ 388.3699 ] [................................................] 100%
[ 388.3767 ] Writing partition B_cpu-bootloader with uefi_jetson_with_dtb_sigheader.bin.encrypt [ 3394448 bytes ]
[ 389.8893 ] [................................................] 100%
[ 428.5860 ] Writing partition B_secure-os with tos-optee_t234_sigheader.img.encrypt [ 1064752 bytes ]
[ 431.6429 ] [................................................] 100%
[ 444.5384 ] Writing partition B_eks with eks_t234_sigheader.img.encrypt [ 9232 bytes ]
[ 444.7449 ] [................................................] 100%
[ 444.7480 ] Writing partition B_dce-fw with display-t234-dce_with_kernel_tegra234-p3701-0000-p3737-0000_aligned_blob_w_bin_sigheader.bin.encrypt [ 753632 bytes ]
[ 444.8730 ] [................................................] 100%
[ 444.8958 ] Writing partition B_spe-fw with spe_t234_sigheader.bin.encrypt [ 270336 bytes ]
[ 454.1433 ] [................................................] 100%
[ 454.1539 ] Writing partition B_rce-fw with camera-rtcpu-t234-rce_sigheader.img.encrypt [ 537952 bytes ]
[ 457.4725 ] [................................................] 100%
[ 457.4906 ] Writing partition B_adsp-fw with adsp-fw_sigheader.bin.encrypt [ 400944 bytes ]
[ 464.0949 ] [................................................] 100%
[ 464.1084 ] Writing partition B_VER with qspi_bootblob_ver.txt [ 109 bytes ]
[ 469.0364 ] [................................................] 100%
[ 469.0396 ] Writing partition A_VER with qspi_bootblob_ver.txt [ 109 bytes ]
[ 469.0491 ] [................................................] 100%
[ 469.0525 ] Writing partition master_boot_record with mbr_1_3.bin [ 512 bytes ]
[ 469.0615 ] [................................................] 100%
[ 469.0644 ] Writing partition A_kernel-dtb with kernel_tegra234-p3701-0000-p3737-0000.dtb [ 418727 bytes ]
[ 469.0707 ] [................................................] 100%
[ 469.0861 ] Writing partition B_kernel-dtb with kernel_tegra234-p3701-0000-p3737-0000.dtb [ 418727 bytes ]
[ 469.0902 ] [................................................] 100%
[ 469.1055 ] Writing partition resin-boot with resin-boot [ 41943040 bytes ]
[ 469.1106 ] [................................................] 100%
[ 470.5545 ] Writing partition resin-rootA with resin-rootA [ 1027604480 bytes ]
[ 470.5603 ] [................................................] 100%
[ 505.9100 ] Writing partition resin-rootB with resin-rootB [ 1027604480 bytes ]
[ 505.9156 ] [................................................] 100%
[ 540.7217 ] Writing partition resin-state with resin-state [ 20971520 bytes ]
[ 540.7270 ] [................................................] 100%
[ 541.4555 ] Writing partition resin-data with resin-data [ 212860928 bytes ]
[ 541.4611 ] [................................................] 100%
[ 548.7223 ] tegradevflash_v2 --write secondary_gpt_backup gpt_secondary_3_0.bin
[ 548.7226 ] Bootloader version 01.00.0000
[ 548.9979 ] Writing partition secondary_gpt_backup with gpt_secondary_3_0.bin [ 16896 bytes ]
[ 548.9984 ] [................................................] 100%
[ 549.2136 ] tegradevflash_v2 --write BCT br_bct_BR.bct
[ 549.2140 ] Bootloader version 01.00.0000
[ 549.4438 ] Writing partition BCT with br_bct_BR.bct [ 8192 bytes ]
[ 549.4442 ] [................................................] 100%
[ 556.0115 ] tegradevflash_v2 --write BCT-boot-chain_backup bct_backup.img
[ 556.0119 ] Bootloader version 01.00.0000
[ 556.6261 ] Writing partition BCT-boot-chain_backup with bct_backup.img [ 32768 bytes ]
[ 556.6267 ] [................................................] 100%
[ 557.0375 ] tegradevflash_v2 --write A_MB1_BCT mb1_cold_boot_bct_MB1_sigheader.bct.encrypt
[ 557.0379 ] Bootloader version 01.00.0000
[ 557.5343 ] Writing partition A_MB1_BCT with mb1_cold_boot_bct_MB1_sigheader.bct.encrypt [ 17776 bytes ]
[ 557.5350 ] [................................................] 100%
[ 557.7637 ] tegradevflash_v2 --write B_MB1_BCT mb1_cold_boot_bct_MB1_sigheader.bct.encrypt
[ 557.7640 ] Bootloader version 01.00.0000
[ 558.2662 ] Writing partition B_MB1_BCT with mb1_cold_boot_bct_MB1_sigheader.bct.encrypt [ 17776 bytes ]
[ 558.2670 ] [................................................] 100%
[ 558.4966 ] tegradevflash_v2 --write A_MEM_BCT mem_coldboot_sigheader.bct.encrypt
[ 558.4970 ] Bootloader version 01.00.0000
[ 558.9942 ] Writing partition A_MEM_BCT with mem_coldboot_sigheader.bct.encrypt [ 243712 bytes ]
[ 558.9948 ] [................................................] 100%
[ 561.9969 ] tegradevflash_v2 --write B_MEM_BCT mem_coldboot_sigheader.bct.encrypt
[ 561.9973 ] Bootloader version 01.00.0000
[ 562.6142 ] Writing partition B_MEM_BCT with mem_coldboot_sigheader.bct.encrypt [ 243712 bytes ]
[ 562.6149 ] [................................................] 100%
[ 565.6164 ] Flashing completed

[ 565.6164 ] Coldbooting the device
[ 565.6169 ] tegrarcm_v2 --chip 0x23 0 --ismb2
[ 565.6172 ] MB2 version 01.00.0000
[ 566.2379 ] Coldbooting the device
[ 566.2383 ] tegrarcm_v2 --chip 0x23 0 --reboot coldboot
[ 566.2387 ] MB2 version 01.00.0000
*** The target t186ref has been flashed successfully. ***
Reset the board to boot from internal eMMC.

and inside ota_package.tar, in the flash.idx file I have:

20, 3:0:A_dce-fw, 22937600, 5242880, display-t234-dce_with_kernel_tegra234-p3701-0000-p3737-0000_aligned_blob_w_bin_sigheader.bin.encrypt, 754672, fixed-<reserved>-21, 1499a86a41644d130c13d566b83fd9a34f6de742
....
44, 3:0:B_dce-fw, 55181312, 5242880, display-t234-dce_with_kernel_tegra234-p3701-0000-p3737-0000_aligned_blob_w_bin_sigheader.bin.encrypt, 754672, fixed-<reserved>-45, 1499a86a41644d130c13d566b83fd9a34f6de742

Also, during initial flashing, in the logs I see:

[  25.5096 ]           21	A_dce-fw                            	   44800	   55039
...
[  25.5136 ]           45	B_dce-fw                            	  107776	  118015

so the start LBAs 44800 and 107776 match the ones in the BUP flash.idx, 22937600 and 55181312.

If it makes any difference, I’m using the same XML for flashing, in the L4T 35.2.1 BASE_BSP and in the L4T 35.3.1 TARGET_BSP.

Which XML are you using?

@KevinFFF this one: gist:85c43f3d9b42b664aa1b003880a11d99 · GitHub

In it I have both ubuntu & my OS. But after more testing of various scenarios I’m starting to suspect that it’s not the XML causing the problem. You see, in the XML I have both the Ubuntu rootfs and my rootfs named resin-rootA.

If I boot Ubuntu first, via the cmdline, i.e root=/dev/mmcblk0p14, right after flashing, and trigger a bootloader update, it works.
if I boot my OS first right after flashing (i.e root=LABEL=resin-rootA) and trigger the update, it fails. Same dce-fw not found, the usual error.

If however I boot Ubuntu first right after flashing, trigger the update, let it run to 6% in UEFI then reboot in my OS, I can then also trigger the update from my OS successfully.

I haven’t tried yet but I will boot Ubuntu first without triggering any capsule update from UEFI, then boot my OS, see if it still works.

Which makes me believe that either:

  1. The Ubuntu rootfs has some service that does something, i.e talks to the kernel, that further allows updates to be performed, marks the first boot after provisioning as successful, etc. OR
  2. The BOOTAA64.efi that comes pre-compiled in the BSP archive does something special on the first boot right after flashing.

Maybe you could tell me if that’s the case and point me to the edk2 sources or to the roofs file where this is done?

Thank you

I haven’t tried yet but I will boot Ubuntu first without triggering any capsule update from UEFI, then boot my OS, see if it still works.

Yes, so simply booting into the Ubuntu rootfs once, without any other action, and then booting my OS and triggering the UEFI update does the job. Must be something in the rootfs then, some marking of a successful boot or slot perhaps

Looks like the script /opt/nvidia/l4t-bootloader-config/nv-l4t-bootloader-config.sh -v is run on startup in Ubuntu, and is the one that allows for updates to be triggered. It creates and updates some platform & platform compat spec UEFI variables in /sys/efi/efivars/. Not having those set was causing the update failure.

After it’s run, the dce-fw error is no longer present and the uefi firmware proceeds to apply the capsule update.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.