Understanding flash.sh Options For Generating New Pinmux


We need to update our pinmux.

Xavier NX. Jetpack 4.5.1. L4T R32 5.1

When changing the pinmux we need to update the images by running flash.sh. Something like sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1.

We would like to update the pinmux without recreating the file system.

There are 2 options that interest me, -r and --no-systemimg:

v4@ubuntu-18v4-sdkmgr2:~/nvidia/nvidia_sdk/JetPack_4.5.1_Linux_JETSON_XAVIER_NX/Linux_for_Tegra$ ./flash.sh -h

Usage: sudo ./flash.sh [options] <target_board> <rootdev>
        -r ------------------- skip building and reuse existing system.img.
        --no-systemimg ------- Do not create or re-create system.img.

These options sound similar but the description is not the same.

I added -r to the command and it seemed to do the something! Actually I did sudo ./flash.sh --no-flash -r jetson-xavier-nx-devkit-emmc mmcblk0p1.

I just wondered if anyone had insight into these options. Could/should I use -r, --no-systemig or neither?

@JerryChang says to remove -r -k MB1_BCT in his comment here https://forums.developer.nvidia.com/t/pinmux-update-step-by-step/229383/5. We don’t want to specify the partition but was it important that -r was also removed?

Clearly I could let flash.sh recreate the file system and then replace system.img with the one we really want when it has finished. I’m just trying to understand the process.


Hi MattBr,

You could just run the following command to do full flash (including recreate the rootfs) to make sure it be applied correctly.
Then, your system.img would be created in Linux_for_Tegra/bootloader/system.img.

 $ sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1

hello MattBr,

let me explain this way…
assume you’ve already perform flash script before, and there’s file system image (i.e. system.img) located on your local host.
when you specify -r option to the flash command-line, the whole flash process remain the same, it’ll reuse the existing file system image to flash the target.
the flash process have slightly different when you enable the other option, --no-systemimg, it’s used to skip system image, or, root file system is no needed.

1 Like

‘it’ll reuse the existing file system image to flash the target’ but, crucially, recreate the other config files used during flashing. Correct?

If my understanding is correct, I think it means using -r is ok for my use case where just the pinmux has changed.


hello MattBr,

practically, we’re using complete flash. it’s not using -r and re-create new file system image to ensure all settings has updated.

Ok, I won’t use -r.

I’ve got 2 different boards to play with, and some uncertainty about the correct pinmux for each, and I was hoping to not have to keep recreating system.img but I’ll find a way to make it work.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.