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
相关文档:
1.top
top命令可实时地显示Linux系统的进程、CPU、内存、负载等的信息。它是我们了解系统整体状态最好的工具。
top命令的运行状态是一个实时的显示过程,我们可在这个界面监控系统运行情况。我们可通过几个按键来控制top命令,如按q可退出top命令状态,按s可输入信息的更新频率等。这些命令可按h帮助键查询。
2.Ps ......
网上看到到的方法,记录以备用。
在英文Locale下的Ubuntu
无法正常显示XP下GBK编码的中文
编辑/etc/environment文件
添加LC_CTYPE="zh_CN.GBK"一行
如下:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games"
LANG="en_US.UTF-8"
LANGU ......
作者:北南南北
来自:LinuxSir.Org
摘要:本文是关于Linux操作系统主机名(hostname)的文档,对主要配置文件/etc/hosts进行简要的说明 ;另外对基配具工具hostname也进行了举例说明; 欢迎高手斧正,谢谢;
目录
2.1 主机名配置文件 /etc/hosts解说;
2.2 主机名(hostname)和域名(Domain)的区别;
......
Name
times - get process times
Synopsis
#include <sys/times.h>
clock_t times(struct tms *buf);
Description
times() stores the current process times in the
struct tms that buf points to. The struct tms is as defined
in <sys/times.h>
:
struct tms {
clock_t tms_utime; /* us ......