The difference between ./flash.sh and ./l4t_initrd_flash.sh

when i use xxx/Linux_for_tegra/tools/kernel_flash/l4t_initrd_flash.sh,it will show using ./flash.sh,for example,
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash --external-device nvme0n1 -S 100GiB --external-only -c ./xxx/flash_l4t_nvme.xml jetson-xavier-nx-devkit-emmc nvme0n1p1
it will instead of flowing
BOOTDEV=nvme0n1 ./flash.sh --no-flash --signed --external-device -S 100GiB -c ./xxx/flash_l4t_nvme.xml jetson-xavier-nx-devkit-emmc nvme0n1p1

so it means i could use ./flash.sh instead
./tools/kernel_flash/l4t_initrd_flash.sh?

flash.sh cannot flash anything to your nvme. If you plug an empty nvme to jetson, run flash.sh only, then in the end your nvme will still be empty. Flash.sh can only flash mmcblk0p1.

But initrd flash will use flash.sh to boot into initrd, and then flash the nvme from initrd. Thus, nvme drive will have file in the end.

1 Like

ok,thank your reply,i know it.
so if i will repalce files in a not empty nvme ,i should still use initrd flash.

If you want to flash file system to an empty nvme, then use initrd flash.

If you just want to boot from nvme and nvme already had a filesystem on it, then you can also use flash.sh.
https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3261/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E0QN0HA

1 Like

Hi,WayneWWW:
Now i will repalce dtb file of nvme driver(nvme driver has filesystem already), i used ./flash.sh sricpt

sudo BOOTDEV=nvme0n1p1 ./flash.sh -r --no-systemimg -k kernel-dtb jetson-xavier-nx-devkit-emmc nvme0n1p1

or

sudo BOOTDEV=nvme0n1p1 ./flash.sh -r --no-systemimg -k kernel-dtb -c ./tools/kernel_flash/flash_l4t_nvme_256GB.xml jetson-xavier-nx-devkit-emmc nvme0n1p1
./flash_l4t_nvme_256GB.xml is partition specific for my 256GB ssd,

but the dtb of nvme ssd can’t changed , so what i should do?

thanks you !

As I said in previous comment, flash.sh has no ability to flash anything to the nvme drive.

1 Like

ok, appreciate.