一:链接脚本分析启动入口
arch/arm/kernel/vmlinux.lds
* arch/arm/include/asm/page.h
*
* Copyright (C) 1995-2003 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
OUTPUT_ARCH(arm)
ENTRY(stext)
jiffies = jiffies_64;
SECTIONS
{
... ...
由链接脚本可知启动入口为“ENTRY(stext)”,位于arch/arm/kernel/head.S
二:Linux启动流程分析
1、arch/arm/kernel/head.S
注释说明linux内核启动之前要求关闭MMU,关闭D-cache,不关心I-cache,r0=0.....
/*
* Kernel startup entry point.
* ---------------------------
*
* This is normally called from the decompressor code. The requirements
* are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,
* r1 = machine nr, r2 = atags or dtb po