In download mode, the host sends rcm_blob.bin via tegrarcm_v2 to boot the board into a minimal system. Now we need to add driver files to this minimal system, so weβd like to ask: where does the kernel and filesystem included in rcm_blob.bin come from?
am I understand youβre going to boot into initrd without flashing the internal storage?
you may try.. $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --initrd <board> mmcblk0p1 to boot into initrd without flashing root file system.
please dig into $OUT/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh.
please check generate_flash_initrd() function for how it is updated.
When flashing an empty board, the host sends several img files via the tegrarcm_v2 command to get Thor up and running first. As can be seen from the serial port, the system is already operational at this point.
Currently, we need to know: where do the kernel and file system of these img files come from? And how are they packaged?
I didnβt see the packaging process of these files in the compilation log.
itβs created by flash script, you may adding --no-flash options for generating flash package. all RCM required files will be save in rcmboot_blob folder.
for instance, $ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash p3834-0005-p3971-0000 external
kernel and file system were flashing to external storage, such as NVMe.
you may see-also.. $OUT/Linux_for_Tegra/tools/kernel_flash/flash_l4t_t264_nvme.xml
itβs A_kernel/B_kernel partition for kernel image, and itβs APP partition for file system.
let me re-cap Thorβs flashing message as below for your reference.
[flash_bsp_jetson-t264_die0]: [FlashUsingADB(1067)] : [nvme0n1] Flashing for Partition A_kernel
[flash_bsp_jetson-t264_die0]: [SendFileUsingADB(634)] : Flashing Partition - A_kernel of size 134217728 of File boot.img of size 63236096
[flash_bsp_jetson-t264_die0]: [FlashUsingADB(1067)] : [nvme0n1] Flashing for Partition APP
[flash_bsp_jetson-t264_die0]: [SendFileUsingADB(634)] : Flashing Partition - APP of size 1021388820480 of File system.img.raw of size 8752148480
please refer to To Flash the Jetson Developer Kit Operating Software.
youβve download release package and sample file system to your host machine, and, itβs apply_binaries.sh for setting up the environment,
Jerry:
Sorry, no more detailed explanations were found in the relevant links.
Based on the current compilation log: rcm_blob.bin is generated according to the files in blob.xml.
However, during the compilation process, there are boot.img files in multiple directories, and their contents are different.
So I would like to know how blob.xml specifies the path of blob_boot.img come from? Thank you very much.
./tegraflash.py --bl uefi_t26x_general.bin --overlay_dtb L4TConfiguration.dtbo,tegra264-p4071-0000+p3834-xxxx-dynamic.dtbo, --bldtb tegra264-mi-ultron.dtb --applet applet_t264.bin --cmd " rcmboot" --rcmboot_pt_layout flash.xml --chip "0x26" --concat_cpubl_bldtb --cpubl uefi_t26x_general.bin --coldboot_bct_cfg bct_cfg.xml --rcmboot_bct_cfg rcmboot_bct_cfg.xml --minratchet_config tegra264-mb1-bct-ratchet-p3834-xxxx-p4071-0000.dts --bct_flags_file platform_config_profile.yaml --bins "mb2_bootloader mb2_t264.bin; xusb_fw xusb_t264_prod.bin; pva_fw nvpva_030.fw; dce_fw display-t264-dce.bin; bpmp_fw bpmp_t264-TA1090SA-A1_prod.bin; bpmp_fw_dtb tegra264-bpmp-3834-0008-4071-xxxx.dtb; rce_fw camera-rtcpu-t264-rce.img; eks eks_t264.img; kernel boot.img; kernel_dtb tegra264-mi-ultron.dtb; bootloader_dtb tegra264-mi-ultron.dtb" --boot_chain A --no_pva 0 --ramcode 12 --no_flash
+ eval './tegraflash.py --bl uefi_t26x_general.bin --overlay_dtb L4TConfiguration.dtbo,tegra264-p4071-0000+p3834-xxxx-dynamic.dtbo, --bldtb tegra264-mi-ultron.dtb --applet applet_t264.bin --cmd " rcmboot" --rcmboot_pt_layout flash.xml --chip "0x26" --concat_cpubl_bldtb --cpubl uefi_t26x_general.bin --coldboot_bct_cfg bct_cfg.xml --rcmboot_bct_cfg rcmboot_bct_cfg.xml --minratchet_config tegra264-mb1-bct-ratchet-p3834-xxxx-p4071-0000.dts --bct_flags_file platform_config_profile.yaml --bins "mb2_bootloader mb2_t264.bin; xusb_fw xusb_t264_prod.bin; pva_fw nvpva_030.fw; dce_fw display-t264-dce.bin; bpmp_fw bpmp_t264-TA1090SA-A1_prod.bin; bpmp_fw_dtb tegra264-bpmp-3834-0008-4071-xxxx.dtb; rce_fw camera-rtcpu-t264-rce.img; eks eks_t264.img; kernel boot.img; kernel_dtb tegra264-mi-ultron.dtb; bootloader_dtb tegra264-mi-ultron.dtb" --boot_chain A --no_pva 0 --ramcode 12 --no_flash'
++ ./tegraflash.py --bl uefi_t26x_general.bin --overlay_dtb L4TConfiguration.dtbo,tegra264-p4071-0000+p3834-xxxx-dynamic.dtbo, --bldtb tegra264-mi-ultron.dtb --applet applet_t264.bin --cmd ' rcmboot' --rcmboot_pt_layout flash.xml --chip 0x26 --concat_cpubl_bldtb --cpubl uefi_t26x_general.bin --coldboot_bct_cfg bct_cfg.xml --rcmboot_bct_cfg rcmboot_bct_cfg.xml --minratchet_config tegra264-mb1-bct-ratchet-p3834-xxxx-p4071-0000.dts --bct_flags_file platform_config_profile.yaml --bins 'mb2_bootloader mb2_t264.bin; xusb_fw xusb_t264_prod.bin; pva_fw nvpva_030.fw; dce_fw display-t264-dce.bin; bpmp_fw bpmp_t264-TA1090SA-A1_prod.bin; bpmp_fw_dtb tegra264-bpmp-3834-0008-4071-xxxx.dtb; rce_fw camera-rtcpu-t264-rce.img; eks eks_t264.img; kernel boot.img; kernel_dtb tegra264-mi-ultron.dtb; bootloader_dtb tegra264-mi-ultron.dtb' --boot_chain A --no_pva 0 --ramcode 12 --no_flash
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
Entering RCM boot
[ 0.0174 ] tegrasign_v3.py --key None --getmode mode.txt
[ 6.6212 ] **tegrahost_v2 --chip 0x26 0 --generateblob blob.xml blob.bin**
[ 6.6217 ] The number of images in blob is 29
[ 6.6225 ] blobsize is 107656032
[ 6.6227 ] Added binary blob_uefi_t26x_general_with_dtb_sigheader.bin.encrypt of size 3510400
[ 6.6710 ] Added binary blob_tsec_t264_prod_sigheader.bin.encrypt of size 192768
[ 6.6714 ] Added binary blob_bpmp_mem_cfg_sigheader.bin.encrypt of size 74304
[ 6.6715 ] Added binary blob_mb2_t264_with_mb2_bct_MB2_sigheader.bin.encrypt of size 688128
[ 6.6717 ] Added binary blob_xusb_t264_prod_sigheader.bin.encrypt of size 185408
[ 6.6719 ] Added binary blob_applet_t264_sigheader.bin.encrypt of size 283136
[ 6.6719 ] Not supported type: mb2_applet
[ 6.6720 ] Added binary blob_bpmp_t264-TA1090SA-A1_prod_sigheader.bin.encrypt of size 1283264
[ 6.6724 ] Added binary blob_tegra264-bpmp-3834-0008-4071-xxxx_sigheader.dtb.encrypt of size 21696
[ 6.6725 ] Added binary blob_pscfw_t264_prod_sigheader.bin.encrypt of size 455744
[ 6.6726 ] Added binary blob_igbfw_gb10b_gsc_package_prod_sigheader.bin.encrypt of size 409344
[ 6.6729 ] Added binary blob_hpse_t264_aligned_sigheader.pkg of size 444848
[ 6.6730 ] Added binary blob_sb_t264_aligned_sigheader.pkg of size 442656
[ 6.6732 ] Added binary blob_display-t264-dce_with_tegra264-mi-ultron.dtb_sigheader.bin.encrypt of size 12386432
[ 6.6780 ] Added binary blob_uefi_t26x_general_with_dtb_sigheader.bin.encrypt of size 3510400
[ 6.6805 ] Added binary blob_bl31_t264_sigheader.fip.encrypt of size 156096
[ 6.6808 ] Added binary blob_camera-rtcpu-t264-rce_sigheader.img.encrypt of size 598912
[ 6.6810 ] Added binary blob_nv-rce1-t264_sigheader.bin.encrypt of size 181056
[ 6.6811 ] Added binary blob_nvpva_030_sigheader.fw.encrypt of size 2161088
[ 6.6819 ] Added binary **blob_boot.img** of size 76498944
[ 6.7154 ] Added binary blob_hafnium_t264_sigheader.fip.encrypt of size 222720
[ 6.7247 ] Added binary blob_sp_t264_sigheader.fip.encrypt of size 2490432
[ 6.7259 ] Added binary blob_eks_t264_sigheader.img.encrypt of size 9280
[ 6.7261 ] Added binary blob_aon-fw_t264_sigheader.bin.encrypt of size 154880
[ 6.7262 ] Added binary blob_adsp0-fw_t264_sigheader.bin.encrypt of size 368416
[ 6.7263 ] Added binary blob_adsp1-fw_t264_sigheader.bin.encrypt of size 368416
[ 6.7264 ] Added binary blob_sc7_t264_prod_sigheader.bin.encrypt of size 226720
[ 6.7265 ] Added binary blob_mb2rf_t264_sigheader.bin.encrypt of size 274912
[ 6.7266 ] Added binary blob_mb1_bct_MB1_sigheader.bct.encrypt of size 46336
[ 6.7267 ] Added binary blob_br_bct_BR.bct of size 8192
[ 6.7655 ] Boot Rom communication
[ 6.7661 ] --no_flash option specified. Skip running Boot Rom communication
[ 6.7661 ] Sending membct and RCM blob
[ 6.7666 ] --no_flash option specified. Skip sending membct and RCM blob
[ 6.8034 ] All RCM required files are saved in rcmboot_blob folder
Yes, I know itβs boot.img, but Iβm not sure which path the boot.img is located in.
Like in the image below, the two boot.img files have different sizes.
# ls -l ./unified_flash/out/bsp_images/flash_workspace/flash-images/boot.img
-rw-r--r-- 2 root root **64509952** Nov 5 14:30 ./unified_flash/out/bsp_images/flash_workspace/flash-images/boot.img
# ls -l ./bootloader/boot.img
-rw-r--r-- 1 root root **76498944** Nov 5 14:32 ./bootloader/boot.img
tegraflash took the binaries under $OUT/Linux_for_Tegra/bootloader for image flashing.
so, this is the file youβre looking for.. $OUT/Linux_for_Tegra/bootloader/boot.img
Jerry:
Thanks very much
Let me summarize this to check if itβs correct:
During the compilation phase, tegraflash uses the binaries in the $OUT/Linux_for_Tegra/bootloader directory to package and generate rcm_blob.bin (which includes UEFI and boot.img).
In download mode, tegrarcm_v2 is used to send rcm_blob.bin to the blank board. The system then uses UEFI and boot.img from the blob to boot up, bringing the board into a minimal system.
thatβs correct, tegrarcm_v2 manages communication between the host and the target, tegrarcm_v2 exchanges data and commands over USB with targetβs BootROM and bootloader.