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 ./flash.sh --no-flash jetson-nano-emmc mmcblk0p1
2.zip Linux_for_Tegra without rootfs directory
3.try to unzip on another machine and run sudo sudo ./flash.sh -r jetson-nano-emmc mmcblk0p1
the script seems still looking for rotofs directory. is there any other way i can achieve this ?
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.
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.
yes , I used -r flag to reuse the system.img. this part is fine. the flash.sh -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.
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,
sudo sudo ./flash.sh --no-flash jetson-nano-emmc mmcblk0p1 . I can generate the image at host without flashing
2.zip Linux_for_Tegra without rootfs directory
3.try to unzip on another machine and run sudo sudo ./flash.sh -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 nvmassflashgen.sh. 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.
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 flash.sh -r option still need refer to rootfs . it is risky to me to put a dummy rootfs with flash.sh -r option just to let flashing rolling. i would like to undersstand why flash.sh -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 flash.sh 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.
You could try to remove the populating to kernel and initrd lines in flash.sh 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.
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 ?
sudo sudo ./flash.sh --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
5.mv Linux_for_Tegra tar to a differerent location and put device into RCM
6 extract and run “sudo ./flash.sh -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.