Requirement of Minimal roofs for Jetson TX1

Hi,

The rootfs provided from nvidia is around 2.4GB with all the required utilities. But the partition size we are using is around 4GB, So, nearly 87% is used by the current rootfs and we are not able to add any functionality further.

Is there any alternative for providing minimal rootfs with all basic linux utilities?

You may be interested to know that a default flash does not use the largest partition. If you flash with the largest partition size, total size will be about 15GB and a 4GB used will result in only 29% use. Should you flash on command line (or perhaps if JetPack allows manual partition size setting), then this would give you maximum available eMMC:

sudo ./flash.sh -S 14580MiB jetson-tx1 mmcblk0p1

Regarding alternate rootfs, the flash software directory “Linux_for_Tegra” has a “rootfs” subdirectory. This is where any rootfs unpacks. What makes this specific to a Jetson is in part the “apply_binaries.sh” step (JetPack does this for you). This step adds some of the direct hardware access files. These files are sort of an “overlay” onto the basic rootfs, and this would occur even if the rootfs is not the sample rootfs. Whether or not the interfaces for those drivers provided by nVidia would function on the alternate rootfs just depends. In particular the GPU access requires the Xorg ABI to match that from the sample rootfs, otherwise video and CUDA would not function correctly.

Here’s what I see if I view space on a JTX1 which has several extra packages installed for development on a system flashed with “-S 14580MiB”:

root@tx1:~# df -H /
Filesystem      Size  Used Avail Use% Mounted on
/dev/mmcblk0p1   15G  4.0G   11G  28% /

Hi linuxdev

Regarding the increase of partition size,We are using 2 partitions of 4GB like primary and recovery with the same images. So, the option for flashing the eMMC with -S doesn't help for us.
Is there any minimal rootfs with the basic functionalities like linux utilities and Utilities for Audio, Video and CUDA with around 1 GB size?

I do not know of a suitable minimal rootfs. However, the initial rootfs is purely Ubuntu 14.04LTS with no nVidia modifications. The apply_binaries.sh step (automatically done if using JetPack for flash) and flash boot loader config steps add the customizations. If you take any reduced replacement rootfs…and if files to overlay via apply_binaries.sh are compatible with that replacement…then you can use any rootfs. One possible variant is the supplied rootfs with some packages removed.

In terms of compatibility the biggest issue for other rootfs substitutes is that the Xorg server is the interface to accessing GPU functions. This means the ABI of the Xorg server must match the ABI from the nVidia GPU drivers…change the ABI and you lose all direct access. So either a substitute rootfs must use the same Xorg version, or you have to lose CUDA and hardware-accelerated OpenGL. This is a strong reason to cut down the existing sample rootfs instead of starting with a completely new rootfs unless you can use the same Xorg server version.

Should you choose to cut down the existing rootfs, what features does it currently have which you do not need? For example, do you need a graphical desktop login? If not, then the display manager and desktop window manager could be removed to save space.

Alternatively, Linux allows you to mount any partition you want to any directory as a mount point. Depending on your situation you could for example make a partition in an SD card or SATA drive to simply have more space, but I don’t know what carrier board you are using, nor do I know what your separate partitions are being motivated by. If you have a use-case description it might help to offer better advice.

I did a lot of work with Ubuntu Base and Debootstrap (generated file systems) to strip the file system right down to the bare minimum. This is far from an embedded Linux but does allow you to build your system up from scratch.

I’ve share my example file systems on Github and you can flash these quickly using the nice installer script provided (for TX2 but the method should also work for TX1):

also added some notes over on eLinux.

http://elinux.org/Jetson/TX2_Ubuntu_Base

More info on Ubuntu Base (works well with Jetpack 3.1.

https://wiki.ubuntu.com/Base