uboot
https://www.lmlphp.com/user/4531/article/item/33821/
https://www.jianshu.com/p/b7205bb30865
https://www.cnblogs.com/z3286586/p/10437446.html
https://www.cnblogs.com/zhangyi-studio/p/8179795.html
https://www.cnblogs.com/linfeng-learning/p/9284060.html
https://www.cnblogs.com/lifexy/p/8136378.html
https://blog.csdn.net/rikeyone/article/details/84028011
https://blog.csdn.net/kernel_yx/article/details/53045424
===
https://blog.csdn.net/qq_32541049/article/details/70263197
https://www.cnblogs.com/z3286586/p/10437446.html
1. 基础知识
uboot mkconfig{
case "$1" in
-a) shift ; APPEND=yes;;
*) break;;
esac
[$# -lt 4] && exit 1 //参数个数小于4退出
[$# -gt 9] && exit 1 //参数个数大于9退出
建立一系列符号链接
}
link脚本 (text/rodata/got/u_boot_cmd/mmudata/bss
TEXT_BASE = 0x30008000
SECTIONS
{
.=0x00000000;
.=ALIGN(4);
.text: //代码段
{
cpu/s3c24xx/start.o (.text)
cpu/s3c24xx/s3c2440/cpu_init.o (.text)
*(.text)
}
.=ALIGN(4);
.rodata :{*(.rodata)} //常量区 const全局变量|#define定义的|“Hello”字符串
.=ALIGN(4);
.got :{*(.got)}
.=.;
__u_boot_cmd_start =.;
.u_boot_cmd :{*(.u_boot_cmd)}
__u_boot_cmd_end =.;
.= ALIGN(4);
.mmudata :{*(.mmudata)}
.= ALIGN(4);
__bss_start =.;
.bss :{*(.bss)} //存储没有初值的全局变量或默认为0的全局变量| 执行期间必须将bss段内容全部设为0。
_end =.;
}
//data段:存储已经初始化的全局变量(非0)|static 变量
//stack段-栈:存储参数变量和局部变量,由系统进行申请和释放(递归调用stack可能溢出8096 2页)
//heap-堆:程序运行过程中被动态分配的内存段,由用户申请和释放(例如malloc和free)
//堆和栈的内存增长方向是相反的:栈是从高地址向低地址生长,堆是从低地址向高地址生长。
浙公网安备 33010602011771号