Compressing the build folder

Hello team,
we need your suggestions regarding creating the tar file out of the build folder for using it to flash in another PC.

  • We are using Orin Nano(8GB) SOM with custom carrier board with 36.3 jetpack.

  • we have created the build folder by following the steps provided in Quick Start — NVIDIA Jetson Linux Developer Guide 1 documentation
    and done custom changes in kernel and modules are installed in the build folder.

  • Now if we want to take a tar file out of the build folder to use it in another PC, how we can do by excluding all temporary created folders.

FYI: we are following below method/command, but its creating around 14-15GB of tar file

sudo tar -zcvf Linux_for_Tegra_36_3_L4T_release+bootloader+rootfs+kernel.tar.gz Linux_for_Tegra

  • is that above command is perfect to use to create the tar file or do we have to exclude some more tmp files build folder?
    please suggest us better commands to create the tar files out build to use in another PC for quick flash.

summary of the question: we want to create the tar files out of our build folder to use in another PC, we expect the size should be similar like we get packages from Jetson Archive for quick flash, l4t release + sample fs + public source comes around 2.5 - 3GB.

Hi,

What you should be using is massflash. It creates a tar archive compressed with gzip, and lets you copy the archive to another PC to replicate the flashing environment.
Refer to sections about massflash in Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt.

@DaveYYY ,
thank you for your response,
actually we are using the OrinNano (8GB) SOM with custom carrier board and NVME memory,

we have customized BSP in one of our build PC, and we wanted to use the same build setup in another PC for flashing or development pupose, so please suggest us how we can make minimal size tar files out build setup from Linux_for_Tegra folder by excluding the tmp folders, concentrating only on bootloader, rootfs and kerenel, making separate tar for kernel sources is also okay for us.

right now we are using this below command, please suggest us is this the right method in general the Nvidia BSP developer follow?

compress complete build folder to a tar file:
---------------------------------------------------------
sudo tar -zcvf Linux_for_Tegra_36_3_L4T_release+bootloader+rootfs+kernel.tar.gz Linux_for_Tegra

I don’t know what exactly you mean with tmp folders.
If you don’t need massflash then just use whatever way you like to make an archive.

It looks good to me but there is no right/in general things.

all we wanted to know is, how we can reduce size of tar file, its taking 14-15GB, so if you can help us to identify the temporary file created inside the Linux_for_Tegra while flashing, so that we can exclude it while creating tar,

for example we are creating the tar by excluding kerenl source like below,

sudo tar -zcvf Linux_for_Tegra_proto1.tar.gz --exclude "source" Linux_for_Tegra

You can delete bootloader/system.img, bootloader/system.img.raw. and tools/kernel_flash/images/.

and also the source we got from here having lesser size, it comes around 2-3GB maximum, so we wanted to create similar kind of pacakges for our custom BSP, so asking for any folder which we can exclude while creating tar files

thank you @DaveYYY , these kind suggestions we were expecting, we will exclude those files you mentioned and update you the results.

@DaveYYY thank you for the suggestions, it worked for us, we were able to reduce the BSP build tar file size to 5GB bu excluding bootloader/system.img, bootloader/system.img.raw. and tools/kernel_flash/images/ and ‘source’

1 Like

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