flash.sh not choosing custom u-boot

I am following the Development Guide (28.1 Release) U-Boot Customization chapter to attempt to add CONFIG_RESET_TO_RETRY and CONFIG_BOOT_RETRY_TIME to give access to the bootretry environment variable. These configs are discussed in README.autoboot

Building U-Boot seems relatively straightforward. I added these defines to include/configs/p2371-2180.h and built the binaries using p2371-2180_defconfig. I know they are being built because if I include CONFIG_BOOT_RETRY_TIME without CONFIG_RESET_TO_RETRY I get a warning about not including both variables.

The next step is to copy the resultant binaries into the bootloader folder:

cp <uboot_src_dir>/u-boot{,.bin,.dtb,-dtb.bin} \
<your_L4T_root>/Linux_for_Tegra/bootloader/t210ref/p2371-2180/

And now flash the board:

sudo ./flash.sh p2371-2180 mmcblk0p1

Everything works, the board is flashed, but U-Boot doesn’t change. There’s no bootretry variable, bootdelay isn’t set to the right default value, and querying “version” on the command line still returns that the binary was built 2 months ago.

I’ve even tried doing just the bootloader with the same result.

sudo ./flash.sh -k EBT p2371-2180 mmcblk0p1

This is the output of the above command. I see nothing to indicate that it’s using the binaries in <your_L4T_root>/Linux_for_Tegra/bootloader/t210ref/p2371-2180/. Am I missing something?

~/l4t/64_TX1/Linux_for_Tegra_64_tx1$ sudo ./flash.sh -k EBT p2371-2180 mmcblk0p1
copying bctfile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/t210ref/BCT/P2180_A00_LP4_DSC_204Mhz.cfg)... done.
copying bootloader(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/t210ref/cboot.bin)... done.
        populating kernel to rootfs... done.
        populating initrd to rootfs... done.
        populating extlinux.conf.emmc to rootfs... done.
        populating /home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/kernel/dtb/tegra210-jetson-cv-base-p2597-2180-a00.dtb to rootfs... done.
done.
Making Boot image... done.
copying bcffile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/t210ref/cfg/board_config_p2597.xml)... done.
Existing sosfile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/nvtboot_recovery.bin) reused.
copying tegraboot(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/t210ref/nvtboot.bin)... done.
Existing bpffile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/bpmp.bin) reused.
copying wb0boot(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/t210ref/warmboot.bin)... done.
Existing tosfile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/tos.img) reused.
Existing eksfile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/eks.img) reused.
copying dtbfile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/kernel/dtb/tegra210-jetson-cv-base-p2597-2180-a00.dtb)... done.
Existing tbcfile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/nvtboot_cpu.bin) reused.
copying tbcdtbfile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/kernel/dtb/tegra210-jetson-cv-base-p2597-2180-a00.dtb)... done.
copying cfgfile(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/t210ref/cfg/gnu_linux_tegraboot_emmc_full.xml) to flash.xml... done.
creating gpt(ppt.img)...

*** GPT Parameters ***
device size -------------- 31276924928
bootpart size ------------ 8388608
userpart size ------------ 31268536320
Erase Block Size --------- 2097152
sector size -------------- 4096
Partition Config file ---- flash.xml
Visible partition flag --- GP1
Primary GPT output ------- PPT->ppt.img
Secondary GPT output ----- GPT->gpt.img
Target device name ------- none

*** PARTITION LAYOUT(23 partitions) ***
[     BCT] BH            0         8191       4.0MiB
[     NVC] BH         8192        16383       4.0MiB nvtboot.bin
[     PPT] UH            0         4095       2.0MiB
[     GP1] UH         4096         8191       2.0MiB
[     APP] UH         8192     29368319   14336.0MiB system.img
[     TBC] UV     29368320     29372415       2.0MiB nvtboot_cpu.bin
[     EBT] UV     29372416     29380607       4.0MiB cboot.bin
[     BPF] UV     29380608     29384703       2.0MiB bpmp.bin
[     WB0] UV     29384704     29396991       6.0MiB warmboot.bin
[     RP1] UV     29396992     29405183       4.0MiB tegra210-jetson-cv-base-p2597-2180-a00.dtb
[     TOS] UV     29405184     29417471       6.0MiB tos.img
[     EKS] UV     29417472     29421567       2.0MiB eks.img
[      FX] UV     29421568     29425663       2.0MiB
[     SOS] UV     29425664     29466623      20.0MiB
[     EXI] UV     29466624     29597695      64.0MiB
[     LNX] UV     29597696     29728767      64.0MiB boot.img
[     DTB] UV     29728768     29736959       4.0MiB tegra210-jetson-cv-base-p2597-2180-a00.dtb
[     NXT] UV     29736960     29741055       2.0MiB
[     MXB] UV     29741056     29753343       6.0MiB
[     MXP] UV     29753344     29765631       6.0MiB
[     USP] UV     29765632     29769727       2.0MiB
[     UDA] UV     29769728     61067263   15282.0MiB
[     GPT] UH     61067264     61071359       2.0MiB
copying flasher(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/t210ref/cboot.bin)... done.
Existing flashapp(/home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/tegraflash.py) reused.
*** Updating :EBT with cboot.bin ***
./tegraflash.py  --bl cboot.bin --bldtb tegra210-jetson-cv-base-p2597-2180-a00.dtb   --chip 0x21 --applet nvtboot_recovery.bin  --cfg flash.xml  --bct  P2180_A00_LP4_DSC_204Mhz.cfg --bct  P2180_A00_LP4_DSC_204Mhz.cfg  --cfg  flash.xml   --cmd "sign; write EBT ./signed/cboot.bin.encrypt;"
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands

[   0.0076 ] Generating RCM messages
[   0.0087 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 --download rcm nvtboot_recovery.bin 0 0
[   0.0098 ] RCM 0 is saved as rcm_0.rcm
[   0.0104 ] RCM 1 is saved as rcm_1.rcm
[   0.0104 ] List of rcm files are saved in rcm_list.xml
[   0.0104 ]
[   0.0104 ] Signing RCM messages
[   0.0114 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.0123 ] Assuming zero filled SBK key
[   0.0209 ]
[   0.0209 ] Copying signature to RCM mesages
[   0.0221 ] tegrarcm --chip 0x21 --updatesig rcm_list_signed.xml
[   0.0241 ]
[   0.0241 ] Parsing partition layout
[   0.0252 ] tegraparser --pt flash.xml.tmp
[   0.0269 ]
[   0.0270 ] Creating list of images to be signed
[   0.0282 ] tegrahost --chip 0x21 --partitionlayout flash.xml.bin --list images_list.xml
[   0.0321 ]
[   0.0322 ] Generating signatures
[   0.0336 ] tegrasign --key None --list images_list.xml --pubkeyhash pub_key.key
[   0.0349 ] Assuming zero filled SBK key
[   0.0601 ]
[   0.0601 ] Generating br-bct
[   0.0615 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.cfg --chip 0x21
[   0.0628 ] Copying Sdram info from 1 to 2 set
[   0.0675 ] Copying Sdram info from 2 to 3 set
[   0.0675 ]
[   0.0675 ] Updating boot device parameters
[   0.0687 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatedevparam flash.xml.bin
[   0.0701 ] Warning: No sdram params
[   0.0704 ]
[   0.0705 ] Updating bl info
[   0.0719 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   0.0740 ]
[   0.0741 ] Updating secondary storage information into bct
[   0.0752 ] tegraparser --pt flash.xml.bin --chip 0x21 --updatecustinfo P2180_A00_LP4_DSC_204Mhz.bct
[   0.0766 ]
[   0.0766 ] Get Signed section bct
[   0.0780 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --listbct bct_list.xml
[   0.0794 ]
[   0.0794 ] Signing BCT
[   0.0814 ] tegrasign --key None --list bct_list.xml --pubkeyhash pub_key.key
[   0.0828 ] Assuming zero filled SBK key
[   0.0839 ]
[   0.0839 ] Updating BCT with signature
[   0.0853 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatesig bct_list_signed.xml
[   0.0870 ]
[   0.0870 ] Copying signatures
[   0.0885 ] tegrahost --chip 0x21 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[   0.0898 ] Run tegrabct to update tboot signature in bct
[   0.0926 ]
[   0.0927 ] Copying signed file in /home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/signed
[   0.1033 ] Generating RCM messages
[   0.1046 ] tegrarcm --listrcm rcm_list.xml --chip 0x21 --download rcm nvtboot_recovery.bin 0 0
[   0.1061 ] RCM 0 is saved as rcm_0.rcm
[   0.1072 ] RCM 1 is saved as rcm_1.rcm
[   0.1073 ] List of rcm files are saved in rcm_list.xml
[   0.1073 ]
[   0.1073 ] Signing RCM messages
[   0.1088 ] tegrasign --key None --list rcm_list.xml --pubkeyhash pub_key.key
[   0.1102 ] Assuming zero filled SBK key
[   0.1197 ]
[   0.1198 ] Copying signature to RCM mesages
[   0.1210 ] tegrarcm --chip 0x21 --updatesig rcm_list_signed.xml
[   0.1227 ]
[   0.1227 ] Boot Rom communication
[   0.1238 ] tegrarcm --chip 0x21 --rcm rcm_list_signed.xml
[   0.1247 ] BootRom is not running
[   0.1682 ]
[   0.1683 ] Parsing partition layout
[   0.1700 ] tegraparser --pt flash.xml.tmp
[   0.1718 ]
[   0.1719 ] Creating list of images to be signed
[   0.1734 ] tegrahost --chip 0x21 --partitionlayout flash.xml.bin --list images_list.xml
[   0.1769 ]
[   0.1770 ] Generating signatures
[   0.1786 ] tegrasign --key None --list images_list.xml --pubkeyhash pub_key.key
[   0.1801 ] Assuming zero filled SBK key
[   0.2057 ]
[   0.2058 ] Send BCT from Host
[   0.2058 ] Generating br-bct
[   0.2069 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.cfg --chip 0x21
[   0.2078 ] Copying Sdram info from 1 to 2 set
[   0.2102 ] Copying Sdram info from 2 to 3 set
[   0.2102 ]
[   0.2102 ] Updating boot device parameters
[   0.2112 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatedevparam flash.xml.bin
[   0.2121 ] Warning: No sdram params
[   0.2123 ]
[   0.2124 ] Updating bl info
[   0.2133 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updateblinfo flash.xml.bin --updatesig images_list_signed.xml
[   0.2146 ]
[   0.2147 ] Updating secondary storage information into bct
[   0.2156 ] tegraparser --pt flash.xml.bin --chip 0x21 --updatecustinfo P2180_A00_LP4_DSC_204Mhz.bct
[   0.2171 ]
[   0.2171 ] Get Signed section bct
[   0.2181 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --listbct bct_list.xml
[   0.2194 ]
[   0.2195 ] Signing BCT
[   0.2220 ] tegrasign --key None --list bct_list.xml --pubkeyhash pub_key.key
[   0.2232 ] Assuming zero filled SBK key
[   0.2242 ]
[   0.2243 ] Updating BCT with signature
[   0.2255 ] tegrabct --bct P2180_A00_LP4_DSC_204Mhz.bct --chip 0x21 --updatesig bct_list_signed.xml
[   0.2270 ]
[   0.2271 ] Sending BCTs
[   0.2284 ] tegrarcm --download bct P2180_A00_LP4_DSC_204Mhz.bct
[   0.2294 ] Applet is not running on device. Continue with Bootloader
[   0.2460 ]
[   0.2461 ] Sending bootloader and pre-requisite binaries
[   0.2478 ] tegrarcm --download ebt cboot.bin 0 0 --download rp1 tegra210-jetson-cv-base-p2597-2180-a00.dtb 0
[   0.2494 ] Applet is not running on device. Continue with Bootloader
[   0.2854 ]
[   0.2867 ] tegrarcm --boot recovery
[   0.2877 ] Applet is not running on device. Continue with Bootloader
[   0.3217 ]
[   0.3217 ] Writing partition
[   0.3234 ] tegradevflash --write EBT /home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/signed/cboot.bin.encrypt
[   0.3247 ] Cboot version 00.01.0000
[   0.3422 ] Writing partition EBT with /home/ww/l4t/64_TX1/Linux_for_Tegra_64_tx1/bootloader/signed/cboot.bin.encrypt
[   0.3444 ] [................................................] 100%
[   0.3785 ]
*** The :EBT has been updated successfully. ***

Hi Ater,

The command to update u-boot is

sudo ./flash.sh –k LNX jetson-tx1 mmcblk0p1

Do you put the new u-boot to the correct directory?

That did it thanks!

I didn’t read ahead far enough to see the note in the development guide: