问个问题,这个困了我好几天:
网上的liukun移植了个UBOOT,可谓好资料。是从SD卡启动的!!!!!可是我分析了源代码,怎么重定位代码不是从SD卡里吧整个uboot读到内存的。。。:
adr r0, _start
cmp r0, r6
moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */
beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy_loop */
ldr r3, _image_copy_end_ofs
add r2, r0, r3 /* r2 <- source end address */
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r1!, {r9-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end address [r2] */
blo copy_loop
这样写,明显就是整个uboot的代码已经在_start的起始地址处了(难道SD卡控制器实现的,在IROM里实现的,可资料好像说只有搬16K而已吗??)。
求助,十分谢谢!!