Linux内核启动分析
Linux 内核启动分析
1. 内核启动地址
1.1. 名词解释
ZTEXTADDR
解压代码运行的开始地址。没有物理地址和虚拟地址之分,因为此时MMU处于关闭状态。这个地址不一定时RAM的地址,可以是支持读写寻址的flash等存储中介。
Start address of decompressor. here's no point in talking about virtual or physical addresses here, since the MMU will be off at the time when you call the decompressor code. You normally call the kernel at this address to start it booting. This doesn't have to be located in RAM, it can be in flash or other read-only or read-write addressable medium.
ZRELADDR
内核启动在RAM中的地址。压缩的内核映像被解压到这个地址,然后执行。
This is the address where the decompressed kernel will be written, and eventually executed. The following constraint must be valid:
__virt_to_phys(TEXTADDR) == ZRELADDR
The initial part of the kernel is carefully coded to be position independent.
TEXTADDR
内核启动的虚拟地址,与ZRELADDR相对应。一般内核启动的虚拟地址为RAM的第一个bank地址加上0x8000。
TEXTADDR = PAGE_OFFSET + TEXTOFFST
Virtual start address of kernel, normally PAGE_OFFSET + 0x8000.This is where the kernel image ends up. With the latest kernels, it must be located at 32768 bytes into a 128MB region. Previous kernels placed a restriction of 256MB here.
TEXTOFFSET
内核偏移地址。在arch/arm/makefile中设定。
PHYS_OFFSET
RAM第一个bank的物理起始地址。
Physical start address of the first bank of RAM.
PAGE_OFFSET
RAM第一个bank的虚拟起始地址。
Virtual start address of t
相关文档:
一:前言
最近在研究android的sensor driver,主要是E-compass,其中用到了Linux input子系统.在网上也看了很多这方面的资料,感觉还是这篇分析的比较细致透彻,因此转载一下以便自己学习,同时和大家分享!
(这篇博客主要是以键盘驱动为例的,不过讲解的是Linux Input Subsystem,可以仔细的研究一下!)
键盘驱动将检 ......
1. 基本概念
说到网络编程,不得不先提到OSI参考模型,其七层模型从下到上分别为
1.物理层(Physical Layer,PH)
2.数据链路层(Data Link Layer,DL)
3.网络层(Network Layer,N)
4.运输层(Transport Layer,T)
5.会话层(Session Layer,S)
6.表示层(Presentation Layer, ......
经过一段时间的学习之后,也开发了一些小型的驱动,正如我之前一篇中写到得,现在我就来写一下在ARM嵌入式LINUX下如何设计驱动的框架。
在这里我用的板子是micro2440板子,板子上的linux版本是2.6.13。因为我在前一篇介绍了驱动编程的两种框架设计,所以现在我就来分别 ......
Linux中,cron被用来调度重复的任务,linux at命令被用来在指定时间内调度一次性的任务。
要使用linux at命令,你必须安装了at RPM软件包,并且 atd服务必须在运行。
可以使用一下命令启动atd服务:
[root@sso_4 sbin]# /sbin/service atd start
要判定该软件包是否被安装 ......
Linux信号简介
1) SIGHUP 本信号在用户终端连接(正常或非正常)结束时发出, 通常是在终端的控制进程结束时, 通知同一session内的各个作业, 这时它们与控制终端不再关联.
2) SIGINT 程序终止(interrupt)信号, 在用户键入INTR字符(通常是Ctrl-C)时发出
3) SIGQUIT 和SIGINT类似, 但由QUIT字符(通常是Ctrl-\ ......