Flashing Full L4T image


I reviewed TX2 documentation, but am a bit confused.
In “quick start guide” chapter it says:
"Flash the L4T release onto the Jetson Developer Kit by executing this command on your Linux host system:
sudo ./flash.sh $ mmcblk0p1"

But in “Flashing U-Boot Full L4T Image” chapter it says:
You must flash U-Boot to internal eMMC only. At boot time, U-Boot fetches the boot configuration file, kernel and device tree, which can reside on one of the following storage devices used for boot:
• Internal eMMC
• An SD card
When executing the script that flashes U-Boot, specify a command-line option to identify the storage device containing the root filesystem. This is required so that the appropriate boot configuration file is selected. The boot configuration file contains kernel command line parameters that control where the Linux kernel looks for the root filesystem.
To flash U-Boot and select the script to mount the root filesystem from internal eMMC
• Select a boot configuration file that causes the kernel to mount the root filesystem from internal eMMC:
$ sudo ./flash.sh mmcblk0p1

The same command is used in both cases, so I don’t understand:
Is it that the command flash complete ROM (uboot, kernel, rootf) or does it flash only u-boot ?

Thank you,

Using this as an example:

sudo flash.sh -S 29318MiB jetson-tx2 mmcblk0p1

The “-S 29318MiB” uses the largest possible rootfs partition. “jetson-tx2” and “mmcblk0p1” changes some of the content which is overlayed on top of “rootfs/boot/” before generating the rootfs image. The flash will include the bootloader looking for extlinux.conf on mmcblk0p1 (the rootfs). Had you named “mmcblk1p1”, then the bootloader would have instead been looking at the SD card’s first partition for extlinu.conf (i.e., for “/boot”).

It is almost always better to name mmcblk0p1 (eMMC) for the location of extlinux.conf. You could then edit this on eMMC and have it look anywhere else for the actual rootfs. For clarity, consider the location of “/boot” as being independent of the rest of rootfs. When flashing mmcblk0p1 and having extlinux.conf name this as rootfs the two happen to be the same thing. Editing extlinux.conf can separate “/boot” and the rest of rootfs.

Other options can be used to limit flash to certain partitions, e.g., dtb or U-Boot. Without extra options it flashes everything.

Hi linuxdev,

I still don’t understand…
I have copied text from documentation.
The exact same example in one place it flash “Flash the L4T release” (all rom ???), and in other place it flash only u-boot. This is what I understand from text.
That’s why I asked how can it be that the same command do different things ?

I don’t understand the answer and how it relates to the question.
I hope I made the question clear.

Thanks a lot,

What would you like to accomplish? If you want to flash the whole image, then the example given will do the job. Either of these do this, but the second happens to set the size to max possible for the root partition:

sudo flash.sh -S 29318MiB jetson-tx2 mmcblk0p1

Are you trying to flash something other than rootfs? Then there will be additional arguments in that command.

If you use “-r”, then the image for the root partition is not regenerated…maybe you don’t want to waste the time because you already know the image is what you want. Maybe you’re doing something which doesn’t flash the root partition…in which case there’d be no reason to generate this image. Most everything you do when not flashing the root partition uses the additional “-r” option. One additional use case for this would be if you have a clone and you are restoring from a clone…then you’d use the clone and use “-r” to not generate something completely new.

You can run “./flash.sh -h” to get a list of arguments. The real question is what do you want to accomplish?