OK6410A 开发板 (六) 3 OK6410A linux-5.11 运行解析

url 		: git@github.com:lisider/linux.git
branch 		: ok6410a-linux-5.11
commit id 	: d64fe683e8d36e8fff882f1319de00f442fea1a8
config 		: ok6410A_sdboot_mini_defconfig
// 涉及的 .S .s .c 文件 有 824个

前提

  • uImage的生成过程
vmlinux               				-objcopy->   		    			             arch/arm/boot/Image
arch/arm/boot/Image         		-gzip & add arch/arm/boot/compressed/head.S->  	 arch/arm/boot/compressed/vmlinux
arch/arm/boot/compressed/vmlinux  	-objcopy->    				   	                arch/arm/boot/zImage
arch/arm/boot/zImage        		-mkuboot->     						               arch/arm/boot/uImage
  • u-boot 加载 uImage 的过程
问题 :
	1. U-boot中的 kernel_entry 对应 linux中的哪一条代码?
答案 :
	arch/arm/boot/compressed/head.S 中的 start 标号

linux-5.11 uImage 的启动过程

  • 1 解压缩,重定位过程
arch/arm/boot/compressed/
  • 2
arch/arm/kernel/head.S
  • 3 start_kernel
init/main.c
  • 4.1
cpu_idle
  • 4.2
kernel_init
  • 4.3
kthreadd

猜你喜欢

转载自blog.csdn.net/u011011827/article/details/115077092