I am attempting to run Mainline U-Boot (on eMMC) with Archlinuxarm aarch64 mainline kernel (on SD). I am confident in configuring the latter and the initramfs to make everything work, however the former being flashed onto eMMC is giving me some issues since I cannot see a way to flash only U-Boot on the internal eMMC.
This is necessary due to the scheme that I want to use, we are adding more and newer devices to the boad, and since the U-Boot that comes in Tegra seems to be missing functionality and has some issues with the SD card. As can be seen in the below output where trying to read the card gives a voltage select error, and sata / nand commands do not exist (please do correct me if I am being silly anywhere with HUSH or U-Boot its not my particular forte).
Tegra186 (P3636-0001) # version
U-Boot 2020.04-g4335beb (Apr 17 2022 - 02:21:01 -0700)
aarch64-linux-gnu-gcc (Linaro GCC 7.3-2018.05) 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701]
GNU ld (Linaro_Binutils-2018.05) 2.28.2.20170706
Tegra186 (P3636-0001) # mmc rescan
Tegra186 (P3636-0001) # mmc list
sdhci@3400000: 1
sdhci@3460000: 0 (eMMC)
Tegra186 (P3636-0001) # ls mmc 0:1
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
<DIR> 4096 boot
<DIR> 4096 bin
<DIR> 4096 dev
<DIR> 12288 etc
<DIR> 4096 home
<DIR> 4096 lib
<DIR> 4096 media
<DIR> 4096 mnt
<DIR> 4096 opt
<DIR> 4096 proc
<DIR> 4096 root
<DIR> 4096 run
<DIR> 4096 sbin
<DIR> 4096 snap
<DIR> 4096 srv
<DIR> 4096 sys
<DIR> 4096 tmp
<DIR> 4096 usr
<DIR> 4096 var
Tegra186 (P3636-0001) # ls mmc 1:1
Card did not respond to voltage select!
Tegra186 (P3636-0001) # ls mmc 1:0
Card did not respond to voltage select!
Tegra186 (P3636-0001) # sata
Unknown command 'sata' - try 'help'
Tegra186 (P3636-0001) # nand
Unknown command 'nand' - try 'help'
I am flashing the TX2-NX board (forecr) using the flash script from https://developer.nvidia.com/embedded/jetson-linux-archive v32.7.2.
Also if there is a more standard Linux way to flash these boards that would be amazing, although im not sure dd etc would work here to flash the eMMC cleanly.
I have tried
A mixup of different posts from various places:
https://elinux.org/Jetson/Nano/Upstream
which both resolve to something like
sudo ./flash.sh -K <PATH-TO>/u-boot.bin -r jetson-xavier-nx-devkit-tx2-nx mmcblk0p1
The flash completes with the following log, however it does not seem to have flashed with the version of U-Boot I am expecting:
###############################################################################
# L4T BSP Information:
# R32 , REVISION: 7.2
###############################################################################
# Target Board Information:
# Name: jetson-xavier-nx-devkit-tx2-nx, Board Family: t186ref, SoC: Tegra 186,
# OpMode: production, Boot Authentication: NS,
# Disk encryption: disabled ,
###############################################################################
./tegraflash.py --chip 0x18 --applet "/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin" --skipuid --cmd "dump eeprom boardinfo cvm.bin"
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.0030 ] Generating RCM messages
[ 0.0046 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm /home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin 0 0
[ 0.0049 ] RCM 0 is saved as rcm_0.rcm
[ 0.0052 ] RCM 1 is saved as rcm_1.rcm
[ 0.0052 ] List of rcm files are saved in rcm_list.xml
[ 0.0052 ]
[ 0.0052 ] Signing RCM messages
[ 0.0070 ] tegrasign_v3.py --key None --list rcm_list.xml --pubkeyhash pub_key.key
[ 0.0070 ] Assuming zero filled SBK key
[ 0.0100 ] Copying signature to RCM mesages
[ 0.0113 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml
[ 0.0119 ]
[ 0.0119 ] Boot Rom communication
[ 0.0134 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_list_signed.xml --skipuid
[ 0.0137 ] RCM version 0X180001
[ 0.3908 ] Boot Rom communication completed
[ 1.3989 ]
[ 2.4017 ] tegrarcm_v2 --isapplet
[ 2.4020 ] Applet version 01.00.0000
[ 3.1725 ]
[ 3.1740 ] Retrieving EEPROM data
[ 3.1741 ] tegrarcm_v2 --oem platformdetails eeprom cvm /home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/cvm.bin
[ 3.1743 ] Applet version 01.00.0000
[ 3.9632 ] Saved platform info in /home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/cvm.bin
[ 4.0383 ]
Board ID(3636) version(300) sku(0001) revision(H.0)
copying bctfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-memcfg-p3636-0001-a01.cfg)... done.
copying misc_config(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-misc-si-l4t.cfg)... done.
copying pinmux_config(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pinmux-p3636-0001-a00.cfg)... done.
copying pmic_config(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pmic-p3636-0001-a00.cfg)... done.
copying pmc_config(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pad-p3636-0001-a00.cfg)... done.
copying prod_config(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-prod-p3636-0001-a00.cfg)... done.
copying scr_config(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/minimal_scr.cfg)... done.
copying scr_cold_boot_config(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/mobile_scr.cfg)... done.
copying bootrom_config(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-bootrom-p3636-0001-a00.cfg)... done.
copying dev_params(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/BCT/emmc.cfg)... done.
Existing bootloader(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
copying initrd(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/l4t_initrd.img)... done.
Making Boot image... done.
/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/tegraflash.py --chip 0x18 --key --cmd sign boot.img kernel
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.0003 ] Generating signature
[ 0.0022 ] tegrasign_v3.py --getmode mode.txt --key
[ 0.0022 ] Assuming zero filled SBK key : not reading
[ 0.0021 ] sign_type : 0
[ 0.0021 ] header_magic: 414e4452
[ 0.0036 ] tegrahost_v2 --chip 0x18 --align 1_boot.img
[ 0.0040 ]
[ 0.0055 ] tegrahost_v2 --chip 0x18 0 --appendsigheader 1_boot.img zerosbk
[ 0.0068 ]
[ 0.0090 ] tegrasign_v3.py --key --list 1_boot_sigheader.img_list.xml --pubkeyhash pub_key.key
[ 0.0090 ] Assuming zero filled SBK key : not reading
[ 0.0202 ] tegrahost_v2 --chip 0x18 0 --updatesigheader 1_boot_sigheader.img.encrypt 1_boot_sigheader.img.hash zerosbk
[ 0.0214 ]
[ 0.0218 ] Signed file: /home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/temp_user_dir/boot_sigheader.img.encrypt
l4t_sign_image.sh: Generate header for boot_sigheader.img.encrypt
l4t_sign_image.sh: chip 0x18: Don't need to do anything
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for boot_sigheader.img.encrypt
l4t_sign_image.sh: the signed file is /home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/temp_user_dir/boot_sigheader.img.encrypt
done.
Existing sosfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin) reused.
copying tegraboot(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/nvtboot.bin)... done.
Existing cpu_bootloader(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
Existing mb2blfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/nvtboot_recovery.bin) reused.
Existing mtspreboot(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/preboot_d15_prod_cr.bin) reused.
Existing mts(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/mce_mts_d15_prod_cr.bin) reused.
Existing mb1file(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/mb1_prod.bin) reused.
Existing bpffile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/bpmp.bin) reused.
copying bpfdtbfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/tegra186-bpmp-p3636-0001-a00-00.dtb)... done.
Existing scefile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/camera-rtcpu-sce.img) reused.
Existing spefile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/spe.bin) reused.
copying wb0boot(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/warmboot.bin)... done.
Existing tosfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/tos-trusty.img) reused.
Existing eksfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/eks.img) reused.
copying dtbfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/kernel/dtb/tegra186-p3636-0001-p3509-0000-a01.dtb)... done.
Copying nv_boot_control.conf to rootfs
/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/tegraflash.py --chip 0x18 --key --cmd sign kernel_tegra186-p3636-0001-p3509-0000-a01.dtb kernel_dtb
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.0004 ] Generating signature
[ 0.0023 ] tegrasign_v3.py --getmode mode.txt --key
[ 0.0023 ] Assuming zero filled SBK key : not reading
[ 0.0021 ] sign_type : 811674928
[ 0.0021 ] header_magic: d00dfeed
[ 0.0037 ] tegrahost_v2 --chip 0x18 --align 1_kernel_tegra186-p3636-0001-p3509-0000-a01.dtb
[ 0.0041 ]
[ 0.0056 ] tegrahost_v2 --chip 0x18 0 --appendsigheader 1_kernel_tegra186-p3636-0001-p3509-0000-a01.dtb zerosbk
[ 0.0063 ]
[ 0.0085 ] tegrasign_v3.py --key --list 1_kernel_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[ 0.0085 ] Assuming zero filled SBK key : not reading
[ 0.0130 ] tegrahost_v2 --chip 0x18 0 --updatesigheader 1_kernel_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb.encrypt 1_kernel_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb.hash zerosbk
[ 0.0136 ]
[ 0.0138 ] Signed file: /home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/temp_user_dir/kernel_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb.encrypt
l4t_sign_image.sh: Generate header for kernel_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb.encrypt
l4t_sign_image.sh: chip 0x18: Don't need to do anything
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for kernel_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb.encrypt
l4t_sign_image.sh: the signed file is /home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/temp_user_dir/kernel_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb.encrypt
done.
populating kernel to rootfs... done.
populating initrd to rootfs... done.
populating kernel_tegra186-p3636-0001-p3509-0000-a01.dtb to rootfs... done.
Existing tbcfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/cboot.bin) reused.
copying tbcdtbfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/kernel/dtb/tegra186-p3636-0001-p3509-0000-a01.dtb)... done.
copying cfgfile(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/t186ref/cfg/flash_l4t_t186.xml) to flash.xml... done.
Existing flasher(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/nvtboot_recovery_cpu.bin) reused.
Existing flashapp(/home/archer/git/fc-nano-base/trunk/Linux_for_Tegra/bootloader/tegraflash.py) reused.
*** Updating [cpu-bootloader] with cboot.bin ***
./tegraflash.py --bl nvtboot_recovery_cpu.bin --chip 0x18 --applet mb1_recovery_prod.bin --sdram_config tegra186-mb1-bct-memcfg-p3636-0001-a01.cfg --misc_config tegra186-mb1-bct-misc-si-l4t.cfg --pinmux_config tegra186-mb1-bct-pinmux-p3636-0001-a00.cfg --pmic_config tegra186-mb1-bct-pmic-p3636-0001-a00.cfg --pmc_config tegra186-mb1-bct-pad-p3636-0001-a00.cfg --prod_config tegra186-mb1-bct-prod-p3636-0001-a00.cfg --scr_config minimal_scr.cfg --scr_cold_boot_config mobile_scr.cfg --br_cmd_config tegra186-mb1-bct-bootrom-p3636-0001-a00.cfg --dev_params emmc.cfg --cfg flash.xml --bins "mb2_bootloader nvtboot_recovery.bin; mts_preboot preboot_d15_prod_cr.bin; mts_bootpack mce_mts_d15_prod_cr.bin; bpmp_fw bpmp.bin; bpmp_fw_dtb tegra186-bpmp-p3636-0001-a00-00.dtb; tlk tos-trusty.img; eks eks.img; bootloader_dtb tegra186-p3636-0001-p3509-0000-a01.dtb" --odmdata 0x2090000 --cmd "signwrite cpu-bootloader cboot.bin; reboot"
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.0066 ] tegrasign_v3.py --getmode mode.txt --key None
[ 0.0066 ] Assuming zero filled SBK key
[ 0.0064 ] sign_type : 3053453249
[ 0.0064 ] header_magic: 8000014
[ 0.0080 ] tegrahost_v2 --chip 0x18 --align 1_cboot.bin
[ 0.0084 ]
[ 0.0097 ] tegrahost_v2 --chip 0x18 0 --appendsigheader 1_cboot.bin zerosbk
[ 0.0106 ]
[ 0.0124 ] tegrasign_v3.py --key None --list 1_cboot_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 0.0125 ] Assuming zero filled SBK key
[ 0.0183 ] tegrahost_v2 --chip 0x18 0 --updatesigheader 1_cboot_sigheader.bin.encrypt 1_cboot_sigheader.bin.hash zerosbk
[ 0.0192 ]
[ 0.0192 ] Generating RCM messages
[ 0.0208 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 0 --download rcm mb1_recovery_prod.bin 0 0
[ 0.0211 ] RCM 0 is saved as rcm_0.rcm
[ 0.0214 ] RCM 1 is saved as rcm_1.rcm
[ 0.0214 ] List of rcm files are saved in rcm_list.xml
[ 0.0214 ]
[ 0.0214 ] Signing RCM messages
[ 0.0232 ] tegrasign_v3.py --key None --list rcm_list.xml --pubkeyhash pub_key.key
[ 0.0232 ] Assuming zero filled SBK key
[ 0.0263 ] Copying signature to RCM mesages
[ 0.0279 ] tegrarcm_v2 --chip 0x18 0 --updatesig rcm_list_signed.xml
[ 0.0285 ]
[ 0.0285 ] Boot Rom communication
[ 0.0300 ] tegrarcm_v2 --chip 0x18 0 --rcm rcm_list_signed.xml
[ 0.0303 ] BootRom is not running
[ 5.5200 ]
[ 6.5237 ] tegrarcm_v2 --isapplet
[ 6.5247 ] Applet version 01.00.0000
[ 7.2968 ]
[ 7.2986 ] tegrasign_v3.py --getmode mode.txt --key None
[ 7.2987 ] Assuming zero filled SBK key
[ 7.2985 ] Parsing partition layout
[ 7.3000 ] tegraparser_v2 --pt flash.xml.tmp
[ 7.3007 ]
[ 7.3008 ] Creating list of images to be signed
[ 7.3023 ] tegrahost_v2 --chip 0x18 0 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
[ 7.4185 ]
[ 7.4186 ] Generating signatures
[ 7.4214 ] tegrasign_v3.py --key None --list images_list.xml --pubkeyhash pub_key.key
[ 7.4214 ] Assuming zero filled SBK key
[ 7.6843 ] Reading BCT from device for further operations
[ 7.6843 ] Generating blob
[ 7.6862 ] tegrahost_v2 --chip 0x18 --align blob_nvtboot_recovery_cpu.bin
[ 7.6870 ]
[ 7.6888 ] tegrahost_v2 --chip 0x18 0 --appendsigheader blob_nvtboot_recovery_cpu.bin zerosbk
[ 7.6904 ]
[ 7.6928 ] tegrasign_v3.py --key None --list blob_nvtboot_recovery_cpu_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.6928 ] Assuming zero filled SBK key
[ 7.7015 ] tegrahost_v2 --chip 0x18 0 --updatesigheader blob_nvtboot_recovery_cpu_sigheader.bin.encrypt blob_nvtboot_recovery_cpu_sigheader.bin.hash zerosbk
[ 7.7022 ]
[ 7.7038 ] tegrahost_v2 --chip 0x18 --align blob_nvtboot_recovery.bin
[ 7.7042 ]
[ 7.7058 ] tegrahost_v2 --chip 0x18 0 --appendsigheader blob_nvtboot_recovery.bin zerosbk
[ 7.7065 ]
[ 7.7084 ] tegrasign_v3.py --key None --list blob_nvtboot_recovery_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.7084 ] Assuming zero filled SBK key
[ 7.7124 ] tegrahost_v2 --chip 0x18 0 --updatesigheader blob_nvtboot_recovery_sigheader.bin.encrypt blob_nvtboot_recovery_sigheader.bin.hash zerosbk
[ 7.7132 ]
[ 7.7148 ] tegrahost_v2 --chip 0x18 --align blob_preboot_d15_prod_cr.bin
[ 7.7152 ]
[ 7.7168 ] tegrahost_v2 --chip 0x18 0 --appendsigheader blob_preboot_d15_prod_cr.bin zerosbk
[ 7.7175 ]
[ 7.7195 ] tegrasign_v3.py --key None --list blob_preboot_d15_prod_cr_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.7195 ] Assuming zero filled SBK key
[ 7.7234 ] tegrahost_v2 --chip 0x18 0 --updatesigheader blob_preboot_d15_prod_cr_sigheader.bin.encrypt blob_preboot_d15_prod_cr_sigheader.bin.hash zerosbk
[ 7.7242 ]
[ 7.7259 ] tegrahost_v2 --chip 0x18 --align blob_mce_mts_d15_prod_cr.bin
[ 7.7265 ]
[ 7.7282 ] tegrahost_v2 --chip 0x18 0 --appendsigheader blob_mce_mts_d15_prod_cr.bin zerosbk
[ 7.7346 ]
[ 7.7370 ] tegrasign_v3.py --key None --list blob_mce_mts_d15_prod_cr_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.7370 ] Assuming zero filled SBK key
[ 7.7983 ] tegrahost_v2 --chip 0x18 0 --updatesigheader blob_mce_mts_d15_prod_cr_sigheader.bin.encrypt blob_mce_mts_d15_prod_cr_sigheader.bin.hash zerosbk
[ 7.8017 ]
[ 7.8034 ] tegrahost_v2 --chip 0x18 --align blob_bpmp.bin
[ 7.8038 ]
[ 7.8053 ] tegrahost_v2 --chip 0x18 0 --appendsigheader blob_bpmp.bin zerosbk
[ 7.8065 ]
[ 7.8085 ] tegrasign_v3.py --key None --list blob_bpmp_sigheader.bin_list.xml --pubkeyhash pub_key.key
[ 7.8085 ] Assuming zero filled SBK key
[ 7.8178 ] tegrahost_v2 --chip 0x18 0 --updatesigheader blob_bpmp_sigheader.bin.encrypt blob_bpmp_sigheader.bin.hash zerosbk
[ 7.8189 ]
[ 7.8206 ] tegrahost_v2 --chip 0x18 --align blob_tegra186-bpmp-p3636-0001-a00-00.dtb
[ 7.8210 ]
[ 7.8225 ] tegrahost_v2 --chip 0x18 0 --appendsigheader blob_tegra186-bpmp-p3636-0001-a00-00.dtb zerosbk
[ 7.8232 ]
[ 7.8251 ] tegrasign_v3.py --key None --list blob_tegra186-bpmp-p3636-0001-a00-00_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[ 7.8251 ] Assuming zero filled SBK key
[ 7.8290 ] tegrahost_v2 --chip 0x18 0 --updatesigheader blob_tegra186-bpmp-p3636-0001-a00-00_sigheader.dtb.encrypt blob_tegra186-bpmp-p3636-0001-a00-00_sigheader.dtb.hash zerosbk
[ 7.8296 ]
[ 7.8312 ] tegrahost_v2 --chip 0x18 --align blob_tos-trusty.img
[ 7.8316 ]
[ 7.8330 ] tegrahost_v2 --chip 0x18 0 --appendsigheader blob_tos-trusty.img zerosbk
[ 7.8342 ]
[ 7.8361 ] tegrasign_v3.py --key None --list blob_tos-trusty_sigheader.img_list.xml --pubkeyhash pub_key.key
[ 7.8362 ] Assuming zero filled SBK key
[ 7.8449 ] tegrahost_v2 --chip 0x18 0 --updatesigheader blob_tos-trusty_sigheader.img.encrypt blob_tos-trusty_sigheader.img.hash zerosbk
[ 7.8462 ]
[ 7.8480 ] tegrahost_v2 --chip 0x18 --align blob_eks.img
[ 7.8486 ]
[ 7.8502 ] tegrahost_v2 --chip 0x18 0 --appendsigheader blob_eks.img zerosbk
[ 7.8509 ]
[ 7.8532 ] tegrasign_v3.py --key None --list blob_eks_sigheader.img_list.xml --pubkeyhash pub_key.key
[ 7.8532 ] Assuming zero filled SBK key
[ 7.8567 ] tegrahost_v2 --chip 0x18 0 --updatesigheader blob_eks_sigheader.img.encrypt blob_eks_sigheader.img.hash zerosbk
[ 7.8576 ]
[ 7.8594 ] tegrahost_v2 --chip 0x18 --align blob_tegra186-p3636-0001-p3509-0000-a01.dtb
[ 7.8602 ]
[ 7.8620 ] tegrahost_v2 --chip 0x18 0 --appendsigheader blob_tegra186-p3636-0001-p3509-0000-a01.dtb zerosbk
[ 7.8638 ]
[ 7.8663 ] tegrasign_v3.py --key None --list blob_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[ 7.8663 ] Assuming zero filled SBK key
[ 7.8807 ] tegrahost_v2 --chip 0x18 0 --updatesigheader blob_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb.encrypt blob_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb.hash zerosbk
[ 7.8832 ]
[ 7.8862 ] tegrahost_v2 --chip 0x18 --generateblob blob.xml blob.bin
[ 7.8872 ] number of images in blob are 9
[ 7.8881 ] blobsize is 3888504
[ 7.8885 ] Added binary blob_nvtboot_recovery_cpu_sigheader.bin.encrypt of size 225168
[ 7.8951 ] Added binary blob_nvtboot_recovery_sigheader.bin.encrypt of size 122272
[ 7.8963 ] Added binary blob_preboot_d15_prod_cr_sigheader.bin.encrypt of size 58384
[ 7.8974 ] Added binary blob_mce_mts_d15_prod_cr_sigheader.bin.encrypt of size 2236640
[ 7.8996 ] Added binary blob_bpmp_sigheader.bin.encrypt of size 534816
[ 7.9011 ] Added binary blob_tegra186-bpmp-p3636-0001-a00-00_sigheader.dtb.encrypt of size 113648
[ 7.9025 ] Added binary blob_tos-trusty_sigheader.img.encrypt of size 403264
[ 7.9035 ] Added binary blob_eks_sigheader.img.encrypt of size 1440
[ 7.9044 ] Added binary blob_tegra186-p3636-0001-p3509-0000-a01_sigheader.dtb.encrypt of size 192720
[ 7.9100 ]
[ 7.9101 ] Sending bootloader and pre-requisite binaries
[ 7.9125 ] tegrarcm_v2 --download blob blob.bin
[ 7.9135 ] Applet version 01.00.0000
[ 8.6946 ] Sending blob
[ 8.6946 ] [............. ] 026%
[ 8.6946 ] [.......................... ] 053%
[ 8.6946 ] [........................................ ] 080%
[ 8.6946 ] [................................................] 100%
[ 9.2648 ]
[ 9.2665 ] tegrarcm_v2 --boot recovery
[ 9.2668 ] Applet version 01.00.0000
[ 10.0399 ]
[ 11.0428 ] tegrarcm_v2 --isapplet
[ 11.8164 ]
[ 11.8191 ] tegradevflash_v2 --iscpubl
[ 11.8203 ] Bootloader version 01.00.0000
[ 12.2055 ] Bootloader version 01.00.0000
[ 12.2068 ]
[ 12.2068 ] Writing partition
[ 12.2084 ] tegradevflash_v2 --write cpu-bootloader 1_cboot_sigheader.bin.encrypt
[ 12.2087 ] Bootloader version 01.00.0000
[ 12.6022 ] Writing partition cpu-bootloader with 1_cboot_sigheader.bin.encrypt
[ 12.6036 ] [................................................] 100%
[ 12.6321 ]
[ 12.6322 ] Coldbooting the device
[ 12.6349 ] tegradevflash_v2 --reboot coldboot
[ 12.6358 ] Bootloader version 01.00.0000
[ 13.0143 ]
*** The [cpu-bootloader] has been updated successfully. ***
Just in case I have compiled U-Boot wrongly (with the wrong configuration as I went with the closest match in Mainline https://github.com/u-boot/u-boot/tree/master/board/nvidia), are there dts files I can use to compile this specifically for this board that are known good? The closest I could find were https://sources.debian.org/src/linux/5.18.16-1~bpo11%2B1/arch/arm64/boot/dts/nvidia/tegra186-p3509-0000%2Bp3636-0001.dts/ but im not certain this is correct.
Scheme
My broad plan is to have the eMMC serve as U-Boot only, possibly two alternating U-Boot partitions so that I can update one or the other by turns.
This then loads the (dos) SD card which contains a 250M vfat partition for the boot directory (dtb, kernel, initramfs). The rest of the card is an ext4 fallback read-only archlinuxarm rootfs that can be easily replaced by virtue of SD replacement.
Finally the M.2 NVMe will be used as the default archlinuxarm rootfs which will in all likelihood take some use and abuse and be CryptLVM based.
U-Boot Compilation
Dockerfile I use to configure and compile U-Boot
ARG ARCH=arm64
ARG CROSS_COMPILE=aarch64-linux-gnu-
ARG UBOOT_TAG=v2022.07
FROM archlinux:latest as builder
ARG ARCH
ARG CROSS_COMPILE
# archlinux required packages
RUN rm -r /etc/pacman.d/gnupg && \
pacman-key --init && \
pacman-key --populate && \
pacman -Sy archlinux-keyring --noconfirm && pacman -Syyuu --noconfirm
RUN pacman -S --noconfirm \
aarch64-linux-gnu-gcc \
bash \
base-devel \
bc \
bison \
flex \
gawk \
gcc \
git \
make \
ncurses \
perl \
python \
texinfo \
xz
RUN mkdir -p ${HOME}/git/ && \
cd ${HOME}/git && \
git clone https://github.com/u-boot/u-boot.git && \
cd ${HOME}/git/u-boot && \
git fetch --tags && \
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) && \
git checkout ${UBOOT_TAG}
WORKDIR /root/git/u-boot
# creating the entrypoint file
COPY .config .config
RUN echo "#!/usr/bin/env bash" > entrypoint.sh && \
echo "ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} make p3450-0000_defconfig" >> entrypoint.sh && \
echo "make menuconfig" >> entrypoint.sh && \
echo "ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} make -j ${nproc}" >> entrypoint.sh && \
echo "cp u-boot* build/." >> entrypoint.sh && \
chmod 744 entrypoint.sh
CMD ./entrypoint.sh
Which can be run with the following while allowing you to change the configuration with menuconfig on the fly:
docker build -t uboot/compiler -f Dockerfile .
docker run --volume ${PWD}/build:/root/git/u-boot/build -it uboot/compiler
Thanks and apologies for the wall!
EDITED: to fix incorrect board name and consolodate to a clearer command and problem.