Open main menu

DAVE Developer's Wiki β

Changes

Deploying Embedded Linux Systems

238 bytes added, 14:33, 10 May 2012
Customizing the root file system
== Customizing the root file system ==
This step is clearly required to add to the minimal basic root file system the your custom applicationsapplication files (libraries, binaries, configuration files, ...)
=== Adding libraries ===
The applications executables described in previous sections that you have developed might depend on libraries that are not provided by the minimal basic root file system. In this case these libraries must be added. To find out which libraries your applications depends on you can use the <code>ldd </code> and <code>readelf</code> tools. Please note that often you'll need to rebuild some libraries, cross-compiling them to match your target architecture.
=== Specific devices ===
Usually the embedded system provides custom devices for which developers had to write specific device drivers. To enable the support for these devices, the proper device files must be created in /dev.
=== Drivers built as modules ===
In embedded system the device drivers are typically statically linked to the kernel. In case they are built as modules you have to:
* install them in the root file system adding * provide the command line utilities (*) required to handle the modules for kernels 2.4 you must use the modutils (http://www.kernel.org/pub/linux/utils/kernel/modutils/) for kernels 2.6 you must use the mod-init-tools (http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/)
Since the loadable kernel modules is a huge topic, it is recommended to read the Linux Loadable Kernel Module HOWTO available at this URL: http://www.tldp.org/HOWTO/Module-HOWTO/.
 
(*) for kernels 2.4 you must use the modutils (http://www.kernel.org/pub/linux/utils/kernel/modutils/)
(*) for kernels 2.6 you must use the mod-init-tools (http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/)
 
=== Boot scripts ===
After the kernel is booted and initialized, the kernel starts '''init''', the first user-space application, which commonly is /sbin/init. Init is responsible for starting system processes as defined in the /etc/inittab file. Init typically will start at least an instances of "getty" which waits for console logins which spawn one's user shell process. Upon shutdown, init controls the sequence and processes for shutdown. The init process is never shut down. It is a user process and not a kernel system process although it does run as root. 
The boot scripts (typically /etc/inittab and /etc/rc.sh) must be modified in order to automatically execute some operations at boot such as launching user-space applications and mounting file systems (i.e. Sysfs).
customer
235
edits