移植全新的linux-3.5.0到Super4412(1)

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





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值