rootfs Instructions


Selection of file system

According to NorFlash Based system,storage space is generally little, so it will choose the compressed file system. ISVP recommends two kinds of file system:

A system is to build programs, system's rootfs does not need to frequently modify the system partition(using squashfs), but configure the regions that need to be frequently read or written(using jffs2).

in the other hand,file system has glibc and uclibc, two kinds,glibc's characteristic is to support the entire functions,but it uses more space;uclibc's characteristic is that it uses less space than glibc but it supports less than glibc. Developers can choose to use between these two libc's modes according to themselves.

It is recommended to choose uclibc for base system.

Modify file system content

compressed rootfs can be unpacked,renew the content. for example,the actual product often needs to be reduced or customized busybox, you can compile busybox, after busybox strip, copy it to rootfs,and copy(R-mode copy) the soft links of: bin, sbin, user/bin, usr/sbin to the destination directory.

Package file system

jffs2 can also be created through the device side erase and then directly mount.

nostripped library

In order to reduce the used memory size, rootfs compressed package libraries are all stripped. You may need to add nostripped libraries while debugging. nostripped libraries are located in the toolchain library. 下:

Demo rootfs brief descriptions:

ISVP's Demo regions are:

Among ISVP's file system, there are two specified filepaths:

For different products, there may be two or more places(regions) that are different,and by upgrading the product, the relevant parameters may be upgraded also, so it is recommended to make more than two soft links to read/write or under the update path.

Demo's rootfs, after startup,will check if the system partition can be used or not,if not,it will format the system then create the directory structure. so the first production of demo system,we can clear the whole piece of Flash,then flash u-boot, uImage, rootfs. The system's regions is automatically created.

system region's structure:

system
├── bin   --Applications directory
├── etc
│   └── sensor   --/etc/sensor soft link to here
│       └── jxh42.bin  --Effect file
├── init
│   └── app_init.sh    --Boot execution   initialization script 
└── lib
    ├── firmware   --/lib/firmware soft link to here
    └── modules    --/lib/modules soft link to here
        ├── sensor_jxh42.ko   --sensor driver
        └── tx-isp.ko    --ISP driver

Notes:Demo rootfs can be used as reference, developpers can define the rootfs program according to the actual situation of the product.