Preinstall software for mass production - Jetson Nano

Hi,

Is it possible to preinstall software to jetson nano images? In this section of the documentation modifying the device tree, pin assignment, etc… is done but I don’t see how I could install something on the rootfs “pre-boot”.

For example I want to install “build-essentials” and compile several large applications to the image and not have to install it on each jetson during production.

Kind regards,
Simon

Hi @simoncharveyi

You should install the packages that you would like to use and than you should clone your image to flash the other modules. Here you can see the related documents.

https://elinux.org/Jetson/Clone

Regards.

Thanks for the reply.

Are there any security risks in doing so?

In this forum post by mdegans he mentions there is a “right way” to do it using this Welcome — Jetson Linux<br/>Developer Guide 34.1 documentation documentation.

Which then points me to https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/adaptation_and_bringup.html# but I cannot figure how this can be used to carry over installed apps in the rootfs.

Or is the method you mentioned what is described in those docs?

Kind regards

@simoncharvey

Yes. It’s fine for backup and restore to the same machine, but using it to deploy is a gigantic potential issue.

Reasons I have iterated elsewhere. Summary is there are too many things on a system like ssh host keys that should never be in more than one place at a time as well as development artifacts that could compromise your code repositories, network etc.

Even if you delete these files it’s not safe since cloning with dd, for example, will copy the free space (and "deleted " files, so definitely don’t put such a cloned image online). It can be made safer, but it’s still a potential disaster.

1 Like

apt-clone can work for a package set. You’ll need to copy over any apt lists you changed as well (/etc/apt/sources.list.d*). For Python, I’d recommend making a package. Static binaries can just be copied into a bindir like /usr/local/bin. Different languages will have slightly different procedures. Editing the rootfs with a chroot works pretty well for me most of the time. If you want to start from a custom rootfs, Nvidia has some instructions for that as well.

1 Like

Thanks for answering @mdegans. How I understand it is I need a custom rootfs.

I see you made a tutorial in the one thread specifically for this. I’m going to try it today.