ARM Linux Boot Sequence
contact me go -> xuqiang.docs@hotmail.com
ARM Linux Boot Sequence
The following traces the Linux boot sequence for ARM-based systems in the 2.6.18 kernel. It looks at just the earliest stages of the boot process, until the generic non-processor-specific start_kernel function is called. The line numbers of each statement are in parenthese at the end of the line; the kernel source itself can be conveniently browsed on theLinux Cross-Reference website.
zImage decompression
arch/arm/boot/compressed/head.S: start (108)
First code executed, jumped to by the bootloader, at label "start" (108)
save contents of registers r1 and r2 in r7 and r8 to save off architecture ID and atags pointer passed in by bootloader (118)
execute arch-specific code (inserted at 146)
arch/arm/boot/compressed/head-xscale.S or other arch-specific code file
added to build in arch/arm/boot/compressed/Makefile
linked into head.S by linker section declaration: .section “start”
flush cache, turn off cache and MMU
load registers with stored parameters (152)
sp = stack pointer for decompression code (152)
r4 = zreladdr = kernel entry point physical address
check if running at link address, and fix up global offset table if not (196)
zero decompression bss (205)
call cache_on to turn on cache (218)
defined at arch/arm/boot/compressed/head.S (320)
call call_cache_fn to turn on cache as appropriate for processor variant
defined at arch/arm/boot/compressed/head.S (505)
walk through proc_types list (530) until find corresponding processor
call cache-on function in list item corresponding to processor (511)
for ARMv5tej core, cache_on function is __armv4_mmu_cache_on (417)
call setup_mmu to set up initial page tables since MMU must be on for cache to be on (419)
turn on cache and MMU (426)
check to make sure won't overwrite image during decompression; assume not for this trace (232)
call decompress_kernel to decompress kernel to RAM (277)
branch to call_kern
相关文档:
1. 往/lib和/usr/lib里面加东西,是不用修改/etc/ld.so.conf的,但是完了之后要调一下ldconfig,不然这个library会找不到
2. 想往上面两个目录以外加东西的时候,一定要修改/etc/ld.so.conf,然后再调用ldconfig,不然也会找不到
比如安装了一个mysql到/usr/local/mysql,mysql有一大堆library在/usr/local/mysql/lib下面 ......
1,打开串口
/**打开串口,dev 串口设备名, mode 打开方式,**/
int opendev(char *dev,mode_t mode)
{
int fd;
fd = ......
前几天更新ubuntu的时候,突然失败,仔细一看,是卸载老版本的gzip时候出了问题。错误信息:
install-info: No dir file specified; try --help for more information.
试了多个常用的手动卸载方法都没法搞定,于是求助google,很快找到答案。是GNU版的install-info代替了debian版的install-info造成的问题,覆盖回来就OK ......
Linux根文件系统结构再认识
刘建文(http://blog.csdn.net/keminlau )
INTRO
尽管Linux的根文件系统在形式表现上是一体的(所有数据目录均为根目录下的子目录),但实际它们是多个不同的【逻辑主体】(为了实现不同的逻辑功能)组合在一起的,参见下图。这也解释了为什么有些节点(如/var)可以挂接到不同磁盘分区上。 ......
配置文件一览表 文件位置及名称,作用
/etc/rc.d/rc.sysinit
系统启动时的公用服务配置
/etc/rc.d/rc.local
系统启动时的本地服务配置
/etc/bashrc、/etc/profile
bash shell的公用配置
/home/username/.bashrc
各用户私人bash shell配置
/etc/securetty
终端安全设置
......