How to optimize rootfs

Hello Friend,

I have taken latest file system for tegra tk1, package version R21.3. After extracting it into host PC i found that /usr directory has size of around 1.8 GB in which it contain library and much more thing which is not required for our goal.

I want to flash file system for embedded application in which such this things are not required in /usr.

So can any one guide me on this, how to optimize this or how to delete things which are not required for embedded application.?

If you want a simple rootfs supporting just your application, the busybox approach should be suitable for you:

http://elinux.org/Jetson/Busybox_RootFS

Hello Kulve,

As you told we started following steps mentioned in the link.

We had taken busybox version 1.23.2 and linux tegra sample file system R21.2.

We flashed successfully rootfs on tegra board. But kernel seems unable to load filesystem during bootup time and it stuck there though we reboot it after some time.

[    7.702632] tegra dvfs: tegra sysfs cap interface is initialized
[    7.709670] tegra dvfs: tegra sysfs gpu & emc interface is initialized
[    7.717107] tegra dvfs: registered vdd_gpu simon notifier
[    7.723839] tegra_actmon.emc: Completed initialization (0)
[    7.730596] tegra_actmon.avp: Completed initialization (0)
[    7.737383] tegra_mon.cpu_emc: Completed initialization (0)
[    7.746985] reg-aon-1v2: incomplete constraints, leaving on
[    7.753716] reg-aon-1v8: incomplete constraints, leaving on
[    7.760431] sdmmc-en-supply: incomplete constraints, leaving on
[    7.767482] reg-dcdc-1v2: incomplete constraints, leaving on
[    7.774407] reg-5v0-supply: incomplete constraints, leaving on
[    7.781465] avdd-hdmi-pll: incomplete constraints, leaving on
[    7.788548] usb0-vbus: incomplete constraints, leaving on
[    7.795352] vpp-fuse: incomplete constraints, leaving on
[    7.802028] vdd-2v7-cam: incomplete constraints, leaving on
[    7.809078] avdd-spi: incomplete constraints, leaving on
[    7.815875] vdd-1v1-cam: incomplete constraints, leaving on
[    7.822984] vddio-sdmmc-2: incomplete constraints, leaving on
[    7.830292] vdd-1v2-cam: incomplete constraints, leaving on
[    7.837407] avdd-cam: incomplete constraints, leaving on
[    7.844319] vdd-cam: incomplete constraints, leaving on
[    7.851071] as3722-sd3: incomplete constraints, leaving on
[    7.858178] vdd-3v3-aon: incomplete constraints, leaving on
[    7.865340] vdd-ac-bat: incomplete constraints, leaving on
[    7.872369] regulator-dummy: incomplete constraints, leaving on
[    7.880694] gpio wake51 for gpio=128
[    7.886035] input: gpio-keys.4 as /devices/platform/gpio-keys.4/input/input1
[    7.895568] as3722-rtc as3722-rtc.1: setting system clock to 2000-01-01 00:27:13 UTC (946686433)
[    7.908127] ALSA device list:
[    7.912768]   #0: HDA NVIDIA Tegra at 0x70038000 irq 113
[    7.919751]   #1: tegra-rt5639
[    7.925622] EXT4-fs (mmcblk0p1): couldn't mount as ext3 due to feature incompatibilities
[    7.937815] EXT4-fs (mmcblk0p1): couldn't mount as ext2 due to feature incompatibilities
[    7.957818] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    7.969685] VFS: Mounted root (ext4 filesystem) on device 179:1.
[    7.980907] devtmpfs: mounted
[    7.986171] Freeing unused kernel memory: 504K (c0b31000 - c0baf000)
[    8.262740] Tegra cpuquiet clusterswitch enabled
[    8.360533] tegra_simon_cpu_grading_cb: graded cpu: v = 800, t = 30000, grade = 0

So dou you have any idea why we are getting such kind of problem after successful flash.?

I’m guessing that the kernel starts up the busybox init application but the init doesn’t do anything. I haven’t tried this busybox approach myself but maybe you can enable some verbose mode in busybox so that the init would print something when it starts up?