How to create package for flashing the nano


I would like to generate all the necessary images upfront. then zip them with flashing script. so that I can distribute this zip file to factory for flashing more board without compiling again. The main purpose is during the flashing I want to avoid dependency to looking for rootfs directory. because I first generate a system.img and system.raw. but after below step. when i try to flash. it seems still need rootfs directory even if I already have system.img generate upfront.

1.Generate all the images by
– sudo sudo ./ --no-flash jetson-nano-emmc mmcblk0p1 Linux_for_Tegra without rootfs directory
3.try to unzip on another machine and run sudo sudo ./ -r jetson-nano-emmc mmcblk0p1

the script seems still looking for rotofs directory. is there any other way i can achieve this ?


Did you tried DD command?

Example, put you system work well to SD Card reader, then plugin to Linux PC.
mmcblk1 is jetson’s SD Card
clone_of_sd.img is image you want to distribution
mmcblk2 is any disk you want to clone into.

sudo dd if=/dev/mmcblk1 of=clone_of_sd.img bs=512

sudo dd if=clone_of_sd.img of=/dev/mmcblk2 bs=512

Hi ,

I have system.img. I want to create the flashing package first then flash by reusing the system.img again fwithout dpendending on rootfs directory anymore.


Hi terry8uwg2,
can you please review the documentation for the tool here:

Is the -r flag what you are looking for? It skips the creation of a new system.img and uses the existing one.
Best Regards

hi Christoph,

yes , I used -r flag to reuse the system.img. this part is fine. the -r is still need rootfs directory after it start flashing? why ? I thought it system.img and system.raw are representing rootfs 's content. The purpose is to prepare and create this flash package and. Give it to the manufactory for flashing without giving them rootfs directory.



are you working with the R32.3.1 release? In that case please take a look at our newly added mass flash capability. It’s documented in Linux_for_Tegra/README_Massflash.txt and I think will solve the situation for you. With the new tool you create a tarball with all the required content to be downloaded to a independent linux host, and when extracted there can flash connected jetson devices from this all inclusive archive.

Best Regards

Hi ,

I am using Jetpack4.3 downloaded from SDK manager. I saw the REAME_MassFlash.txt there. It seems this mode required reading the image from Jetson nano then generate the tar ball. I definitely will give a try.

For my approach mentioned above,

  1. sudo sudo ./ --no-flash jetson-nano-emmc mmcblk0p1 . I can generate the image at host without flashing Linux_for_Tegra without rootfs directory
    3.try to unzip on another machine and run sudo sudo ./ -r jetson-nano-emmc mmcblk0p1

But during the step 3. it still looking for rootfs. do you see anything wrong here ?


You don’t read the image from the device. The tool takes the configured files from the folder hierarchy under Linux_for_Tegra and does everything for you. It creates the tar ball.

If you want to read back the partitions from the jetson nano first (i.e. if you have configured your own packages) then do that, read it back into the folder structure. Then create the package for mass flashing.


I saw Step 4 requires connectted one target Jetson device in order to run does it reading something from the device ??
4. Generate mass flash image:

  • Enter the command cd Linux_for_Tegra.
  • connect one target Jetson device, and put it into RCM mode.
  • run

Hi terry8uwg2,

We didn’t try the removal of rootfs from Linux_for_Tegra. I think putting a dummy rootfs under Linux_for_Tegra may help.


The purpose is to generate system.img and system.raw on the build machine and tar Linux_for_Tegra without including the rootfs because of rootfs is large size. then give this tar ball to flash on the any linux machine to ensure everyone flash the same image.

I think I can not put a dummy rootfs. 1) first it is unclear to me why -r option still need refer to rootfs . it is risky to me to put a dummy rootfs with -r option just to let flashing rolling. i would like to undersstand why -r still need refer to rootfs .Given that I already have a system.img and system.raw

I just tried an experiment to put a dummy rootfs with only a “README.txt” in it. It is able to flash with “-r”. However, I see has some info “populating kernel to rootfs” and “populating initrd to rootfs”. After the flash is done, my rootfs has one boot folder with image and initrd in it.

thansk for trying . yes. this is what i saw… any suggestion ?

Hi Terry,

You could try to remove the populating to kernel and initrd lines in to see if this would prevent the check of rootfs. Also, comparing the image in your device with the one under rootfs/boot and see which one is in use.

Hi Wayne,

Thanks. let me give a try . btw do you think it maybe a solution to generate a flashing tar ball ? is this diffrent from the methold Christoph mentioned above ?


What Chirstoph mentioned above is the nvmassflash tool which is used for massflash (flash multiple devices at the same time).

You could use one host to flash multiple devices.

Hi @WayneWWW,

I tried following steps.

  1. sudo sudo ./ --no-flash jetson-nano-emmc mmcblk0p1
    2.created dummy rootfs directory in Linux_for_Tegra
    3.rm system.raw
    4.tar Linux_for_Tegra directory Linux_for_Tegra tar to a differerent location and put device into RCM
    6 extract and run “sudo ./ -r jetson-nano-emmc mmcblk0p1”

After flashing I saw same files in rootfs. and these files are actually on the Nano as well. Other than that the system booting fine so far.

I plan to distribute this tar file. please let me know if he steps looks good to you.

Please also make sure the kernel modules exist or not. lsmod should not give out empty result.

vaitl@11223301010003f9:~$ lsmod
Module Size Used by
bnep 16562 2
uvcvideo 88565 3
btusb 40149 0
btrtl 7318 1 btusb
btbcm 8808 1 btusb
btintel 10771 1 btusb
iwlmvm 368205 0
mac80211 719792 1 iwlmvm
fuse 103841 3
zram 26166 4
overlay 48691 0
spidev 13282 0
iwlwifi 167043 1 iwlmvm
cfg80211 589351 3 iwlmvm,iwlwifi,mac80211
nvgpu 1575721 23
bluedroid_pm 13912 0
ip_tables 19441 0
x_tables 28951 1 ip_tables

Looks good.