Chinaunix首页 | 论坛 | 博客
  • 博客访问: 10802999
  • 博文数量: 2905
  • 博客积分: 20098
  • 博客等级: 上将
  • 技术积分: 36298
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-23 05:00
文章存档

2012年(1)

2011年(3)

2009年(2901)

分类: LINUX

2009-03-23 11:37:59

Chapter 6 System Initialization
 
 
1.       GLIBC (libc-x.x.x.so) contains the standard C library functions such as printf() and many others that most application programs depend on.
2.       The Linux dynamic loader (ld-x.x.x.so) is responsible for loading the binary executable into memory and performing the dynamic linking required by the application’s reference to shared library functions.
Tips: There is a project Library Optimizer Tool  used to reduce the size of shared libraries for an embedded system or other size-contrained environment.You can find it in:
3.       Most processes have two categories of dependencies: those that are needed to resolve unresolved references within a dynamically linked executable, and external confinguration or data files that an application might need.
4.       The developer can control which initial process is executed at startup by a kernel command line parameter.
5.       init process provides the default set of environment parameters for all other processes to inherit, including such things as PATH and CONSOLE. Its primary role is to spawn additional processes under the direction of a special configuration file that is usually stored as /etc/inittab.
6.       The runlevel scripts are commonly found under a directory called /etc/rc.d/init.d. A runlevel is defined by the services that are enabled at that runlevel. Most Linux distributions contain a directory structure under /etc that contains symbolic links to the service scripts in /etc/rc.d/init.d. Each of runlevels is defined by the scripts contained in the rcN.d, where N is the runlevel. Inside each rcN.d directory, you will find numerous symlinks arranged in a specific order. These symbolic links start with either a K or a S. Those beginning with S point to service scripts, which are invoked with startup instructions; those starting with a K point to service scripts that are invoked with shutdown instructions.
7.       The Linux kernel contains a mechanism to mount an early root file system to perform certain startup-related system initialization and configuration. This mechanism is known as the initial RAM disk, or simply initrd. The initial RAM disk is a small self-contained root file system that usually contains directives to load specific device drivers before the completion of the boot cycle.
8.       When the kernel mounts the initial ramdisk, it looks for a specific file called linuxrc. It treats this file as a script file and proceeds to execute the commands contained therein. This mechanism enables the system designer to specify the behavior of initrd.

阅读(1289) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~