world leader in high performance signal processing
Trace: » inetd » root_file_system_structure

Root File System Structure

By default uClinux implements a simple RAM based file system. The root file system for uClinux is built from the directory ./uClinux‑dist/romfs/. To add files to the uClinux default file system simply add them under this directory and execute make image (for quick tests). Permanent additions of files for romfs should be stored into the appropriate vendors subdirectory according to Managing uClinux Distribution Upgrades, section $ROMFSINST, otherwise file may get lost with make clean.

To control the size of the RAM file system, for the BF533-STAMP platform, edit the following lines in : vendors/AnalogDevices/BF533-STAMP/Makefile:

# Blocks must be a multiple of 256
BLOCKS   = 4096

(no longer necessary when INITRAMFS is used - as is ADI's preference from 2008 on)

If the file size exceeds 16MB, (BLOCKS >= 16384), care must be taken in account where the image is loaded into ram. For example, in u-boot, if you tftp 0x1000000 uImage, it may not work, because 0x1000000 is 16Meg. When kernel booting and the kernel will setup memory space and allocate more than 16MB memory, which overlap with the buffer containing the kernel code - the kernel image is damaged. You should move this to tftp 0x2000000 or higher depending on how large your root file system is.

Blocks sets the size of the ramfs in bytes. Setting it to 4096 provides a 4Meg file system, and will occupy 4Meg of SDRAM (if an uncompressed file system is used).

A summary of the directories in this file system are given below:

  • /bin - (Binaries) This directory contains the executable binaries for programs that were selected in the application configuration window when compiling the kernel.
  • /dev - (Devices) On the target system this directory will contain the device files for the system. For more information see Device Files.
  • /etc - (Etc.) This directory contains various system configuration files.
  • /home - (Home) This directory provides a location for system users to store their files.
  • /lib - (Libraries) This directory is for shared libraries.
  • /mnt - (Mount) This directory contains any mounted file systems.
  • /proc - (Processes) This directory stores virtual files which contain information on system processes.
  • /tmp - (Temporary) In uClinux this directory is a link to /var/tmp.
  • /usr - (User) This directory stores various user programs.
  • /var - (Various) Unlike the other directories which exist on the device /dev/root, this directory exists on the device /dev/ram0, this makes it the only writable directory as the other directories exist on a read-only file system.

Complete Table of Contents/Topics