2017-05-24
编译通过,烧写进板子后,显示如下,而且板子发烫。
Superboot-4412 V2.5(20150923) by FriendlyARM
Booting from eMMC
Uncompressing Linux... done, booting the kernel.
烧写的是zImage镜像文件,经过了压缩,从boot-loader跳转到zImage的入口是linux-3.5.0\arch\arm\boot\compressed\head.S
链接脚本是linux-3.5.0\arch\arm\boot\compressed\vmlinux.lds
根据链接脚本可以获知段是_start,代码如下所示:
.section ".start", #alloc, #execinstr
/*
* sort out different calling conventions
*/
.align
.arm @ Always enter in ARM state
start:
.type start,#function
.rept 7
mov r0, r0
.endr
ARM( mov r0, r0 )
ARM( b 1f )
THUMB( adr r12, BSYM(1f) )
THUMB( bx r12 )
在如下的代码中调用解压缩函数
mov r0, r4
mov r1, sp@ malloc space above stack
add r2, sp, #0x10000@ 64k max
mov r3, r7
bl decompress_kernel
bl cache_clean_flush
bl cache_off
mov r0, r4
mov r0, #0@ must be zero
mov r1, r7@ restore architecture number
mov r2, r8@ restore atags pointer
ARM( mov pc, r4 ) @ call kernel
THUMB( bx r4 ) @ entry point is always ARM