Hello,
THE SITUATION: I have a Jetson TX2. It has an external SSD connected. It used to boot from that external drive, but now it boots from the internal drive (This drive already has a linux system installed and I want to keep this setup).
MY GOAL: I want to flash the bootloader to have it boot form the external drive.
APPROACH: I want to use the flash.sh utility from here:
to flash the bootloader. I put the jetson into recovery mode and run:
$ sudo ./flash.sh --no-flash jetson-tx2 sda1
The output can be found at the end of this post.
THE PROBLEM: Do I only flash the bootloader? In order for the utility to work I had to supply a rootfs and the output talks about the kernel. So I am worried the script changes more than just the bootloader. Am I mistaken? Did I overlook or misunderstand something in the explenation in:
How do I flash the bootloader and only the bootloader? I am happy about any sort of help.
PROMISED OUTPUT:
$ sudo ./flash.sh --no-flash jetson-tx2 sda1
###############################################################################
# L4T BSP Information:
# R32 , REVISION: 5.1
###############################################################################
Board ID() version() sku() revision()
Copy /mnt/00linux/recovery/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb to /mnt/00linux/recovery/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb.rec
copying bctfile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/P3310_A00_8GB_lpddr4_A02_l4t.cfg)... done.
copying misc_config(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-misc-si-l4t.cfg)... done.
copying pinmux_config(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg)... done.
copying pmic_config(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg)... done.
copying pmc_config(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg)... done.
copying prod_config(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg)... done.
copying scr_config(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/minimal_scr.cfg)... done.
copying scr_cold_boot_config(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/mobile_scr.cfg)... done.
copying bootrom_config(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg)... done.
copying dev_params(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/BCT/emmc.cfg)... done.
Existing bootloader(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
copying initrd(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/l4t_initrd.img)... done.
populating kernel to rootfs... done.
populating initrd to rootfs... done.
populating /mnt/00linux/recovery/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb to rootfs... done.
Making Boot image... done.
/mnt/00linux/recovery/Linux_for_Tegra/bootloader/tegraflash.py --chip 0x18 --key --cmd sign boot.img
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.0025 ] Generating signature
[ 0.0068 ] tegrasign_v2 --key --getmode mode.txt
[ 0.0115 ] Assuming zero filled SBK key
[ 0.0238 ]
[ 0.0265 ] sign_type : 0
[ 0.0265 ] header_magic: 414e4452
[ 0.0309 ] tegrahost_v2 --chip 0x18 --align 1_boot.img
[ 0.0415 ]
[ 0.0443 ] tegrahost_v2 --appendsigheader 1_boot.img zerosbk
[ 0.0567 ]
[ 0.0624 ] tegrasign_v2 --key --list 1_boot_sigheader.img_list.xml --pubkeyhash pub_key.key
[ 0.0639 ] Assuming zero filled SBK key
[ 0.0941 ]
[ 0.0980 ] tegrahost_v2 --updatesigheader 1_boot_sigheader.img.encrypt 1_boot_sigheader.img.hash zerosbk
[ 0.1208 ]
[ 0.1314 ] Signed file: /mnt/00linux/recovery/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 /mnt/00linux/recovery/Linux_for_Tegra/bootloader/temp_user_dir/boot_sigheader.img.encrypt
done.
Making recovery ramdisk for recovery image...
Re-generating recovery ramdisk for recovery image...
/mnt/00linux/recovery/Linux_for_Tegra/bootloader/ramdisk_tmp /mnt/00linux/recovery/Linux_for_Tegra/bootloader /mnt/00linux/recovery/Linux_for_Tegra
30402 blocks
_BASE_KERNEL_VERSION=4.9.201-tegra
/mnt/00linux/recovery/Linux_for_Tegra/bootloader/ramdisk_tmp/lib /mnt/00linux/recovery/Linux_for_Tegra/bootloader/ramdisk_tmp /mnt/00linux/recovery/Linux_for_Tegra/bootloader /mnt/00linux/recovery/Linux_for_Tegra
65765 blocks
Making Recovery image...
copying recdtbfile(/mnt/00linux/recovery/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb.rec)... done.
20+0 records in
20+0 records out
20 bytes copied, 0,00117681 s, 17,0 kB/s
Existing sosfile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/mb1_recovery_prod.bin) reused.
copying tegraboot(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/nvtboot.bin)... done.
Existing cpu_bootloader(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
Existing mb2blfile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/nvtboot_recovery.bin) reused.
Existing mtspreboot(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/preboot_d15_prod_cr.bin) reused.
Existing mts(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/mce_mts_d15_prod_cr.bin) reused.
Existing mb1file(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/mb1_prod.bin) reused.
Existing bpffile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/bpmp.bin) reused.
copying bpfdtbfile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb)... done.
Existing scefile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/camera-rtcpu-sce.img) reused.
Existing spefile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/spe.bin) reused.
Existing drameccfile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/dram-ecc.bin) reused.
Existing badpagefile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/badpage.bin) reused.
copying wb0boot(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/warmboot.bin)... done.
Existing tosfile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/tos-trusty.img) reused.
Existing eksfile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/eks.img) reused.
copying dtbfile(/mnt/00linux/recovery/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb)... done.
Copying nv_boot_control.conf to rootfs
/mnt/00linux/recovery/Linux_for_Tegra/bootloader/tegraflash.py --chip 0x18 --key --cmd sign kernel_tegra186-quill-p3310-1000-c03-00-base.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.0012 ] Generating signature
[ 0.0028 ] tegrasign_v2 --key --getmode mode.txt
[ 0.0053 ] Assuming zero filled SBK key
[ 0.0062 ]
[ 0.0084 ] sign_type : 808464433
[ 0.0084 ] header_magic: d00dfeed
[ 0.0104 ] tegrahost_v2 --chip 0x18 --align 1_kernel_tegra186-quill-p3310-1000-c03-00-base.dtb
[ 0.0122 ]
[ 0.0145 ] tegrahost_v2 --appendsigheader 1_kernel_tegra186-quill-p3310-1000-c03-00-base.dtb zerosbk
[ 0.0199 ]
[ 0.0260 ] tegrasign_v2 --key --list 1_kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb_list.xml --pubkeyhash pub_key.key
[ 0.0276 ] Assuming zero filled SBK key
[ 0.0527 ]
[ 0.0551 ] tegrahost_v2 --updatesigheader 1_kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt 1_kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.hash zerosbk
[ 0.0614 ]
[ 0.0673 ] Signed file: /mnt/00linux/recovery/Linux_for_Tegra/bootloader/temp_user_dir/kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt
l4t_sign_image.sh: Generate header for kernel_tegra186-quill-p3310-1000-c03-00-base_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-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt
l4t_sign_image.sh: the signed file is /mnt/00linux/recovery/Linux_for_Tegra/bootloader/temp_user_dir/kernel_tegra186-quill-p3310-1000-c03-00-base_sigheader.dtb.encrypt
done.
generating system.img for booting...
Making system.img...
populating rootfs from /tmp/tmp.udCLDicirD ... done.
populating /boot/extlinux/extlinux.conf ... done.
Sync'ing system.img ... done.
Converting RAW image to Sparse image... done.
system.img built successfully.
Existing tbcfile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/cboot.bin) reused.
copying tbcdtbfile(/mnt/00linux/recovery/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb)... done.
copying cfgfile(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/t186ref/cfg/flash_l4t_t186.xml) to flash.xml... done.
Existing flasher(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/nvtboot_recovery_cpu.bin) reused.
Existing flashapp(/mnt/00linux/recovery/Linux_for_Tegra/bootloader/tegraflash.py) reused.
./tegraflash.py --bl nvtboot_recovery_cpu.bin --sdram_config P3310_A00_8GB_lpddr4_A02_l4t.cfg --odmdata 0x1090000 --applet mb1_recovery_prod.bin --cmd "flash; reboot" --cfg flash.xml --chip 0x18 --misc_config tegra186-mb1-bct-misc-si-l4t.cfg --pinmux_config tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg --pmic_config tegra186-mb1-bct-pmic-quill-p3310-1000-c04.cfg --pmc_config tegra186-mb1-bct-pad-quill-p3310-1000-c03.cfg --prod_config tegra186-mb1-bct-prod-quill-p3310-1000-c03.cfg --scr_config minimal_scr.cfg --scr_cold_boot_config mobile_scr.cfg --br_cmd_config tegra186-mb1-bct-bootrom-quill-p3310-1000-c03.cfg --dev_params emmc.cfg --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-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb; tlk tos-trusty.img; eks eks.img; bootloader_dtb tegra186-quill-p3310-1000-c03-00-base.dtb" --skipuid
saving flash command in /mnt/00linux/recovery/Linux_for_Tegra/bootloader/flashcmd.txt
saving Windows flash command to /mnt/00linux/recovery/Linux_for_Tegra/bootloader/flash_win.bat
*** no-flash flag enabled. Exiting now... ***