mini2440系统移植篇之kernel启动流程
扫描二维码
随时随地手机看文章
1.1.第1阶段
arch/arm/kernel/vmlinux.lds
--------------------Makefile
2.1 arch/arm/boot/compressed/start.S 解压代码
2.2 arch/arm/kernel/head.S
2.2.1 __lookup_machine_type 机器ID
àMACH_START
àmachine_desc //放在__arch_info_begin…__arch_info_end
2.2.2 __create_page_tables 创建页表
2.2.3 使能MMU
2.2.4 __switch_data
àb start_kernel 跳到C代码
1.2.第2阶段
2.3 init/main.c
2.3.1start_kernel
setup_arch(&command_line) 解析命令行参数
setup_processor();
setup_machine(machine_arch_type);
parse_tags(tags);
parse_cmdline(cmdline_p,from);
paging_init(mdesc);
devicemaps_init(mdesc);
mdesc->map_io()
setup_command_line(command_line)
parse_early_param()
do_early_param
init_IRQ()
console_init();
s3c24xx_serial_initconsole
reset_init()
kernel_init
prepare_namespace
mount_root 挂接文件系统
init_post