for a project i’m working on, I’m looking for advice on how i can safely redefine the partition layout for my jetson nano module (emmc).
My objective is to reduce the syze of the APP partition to accomodate a second data partition right after to store some data that i need to persist across my development lifecycle.
I’ve seen that the partition layout is defined in the XML file under
If i manipulate the XML file i can hardcode the APP partition size and accomodate a second partition right after,
the problem tho, is that flash.sh script, when generating the system.img for flashing doesn’t take these modification into consideration, and keeps on generating a 14GB size image
this is going to cause overlapping problems with partitions and filesystem sizes and screw up all the things.
So i’m asking: is there a way to tell flash.sh the size of the system.img file to generate for flashing into the APP partition so that it matches the size i specified in the XML?
thanks very much for your kind support
I don’t know if this is enough, but the
flash.sh script takes a “
-S <size>” argument. The size is usually given in
1024x1024x1024. I think you can go by exact byte size as well, but mostly what you’d want is something which is an even multiple of 1024.
As an example, an ordinary flash, but specifying
APP size, would be something like this (keep in mind that this assumes an eMMC model; SD card models differ and tend to use an initrd flash):
sudo ./flash.sh -S 14GiB jetson-nano-emmc mmcblk0p1
# Same as:
sudo ./flash.sh -S 14336MiB jetson-nano-emmc mmcblk0p1
I have not actually tried to add partitions, so I don’t know if this is useful or not. Someone else would have to say why your XML file layout fails, but I suspect that the creation of an image and the flash are perhaps independent of each other, and that you might need both.
Hello and thanks for your reply.
I will check that specific option, It wasn’t clear to me if the -S was referred to the size of the system.img (APP partition) or the whole sdcard/emmc.
I’ll give it a try, for now what i’m doing is specifying a different image name with the proper size in the XML, and building it on my own
-S” refers to the APP partition on an eMMC model. SD card models would differ, and might require you to make a custom SD card. I don’t really have spare SD cards, and am running out of disk space on my PC, so what I experiment with are the eMMC models. The gist of the problem though is that flash on either an eMMC model or SD card model starts with what might be considered a “pointer” to the location of the APP/rootfs, and on an SD card model, this is in QSPI memory of the module. On an eMMC model the content is more or less the same, but tends to be on the eMMC in partitions. For eMMC, the flash then goes on to install the rootfs/APP partition, but on an SD card model, I think maybe the SD card itself has to be created manually by you. The source to use for creation of the SD card partition is likely (I have not tried so I cannot guarantee it) to be generated as “
Linux_for_Tegra/bootloader/system.img.raw” (the sparse image,
system.img, is generated from
system.img.raw; either can flash with flash software, but the raw image can be directly
dd copied without special setup to an SD card).
Someone else would have to answer about the different ways to create an SD card image. Just beware that the Jetson itself has to be flashed to have compatible QSPI content, and that the SD card generation might be a separate step.
Sorry it took me some time to get back to you :)
I’ve solved the problem as you suggested, specifying the -s flag allowed me to write the partition with the correct size.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.