2018-06-27 08:33:09
1. Windows 电脑和嵌入式设备启动流程对比
|-- Windows 上电启动流程
| |-- 上电 -> BIOS(引导操作系统) -> Windows -> 识别 C、D 盘 -> 运行应用程序
|-- 嵌入式设备
|-- 上电 -> BootLoader(引导内核) -> (环境变量)Linux Kernel -> 挂载根文件系统 -> 运行应用程序
2. BootLoader 最终目的是启动内核
|-- 启动内核
|-- 从 Flash 读取 kernel
| |-- u-boot 要能够读取 Flash
|-- 将读取到的 kernel 放进 SDRAM 中
| |-- 关闭看门狗
| |-- 初始化系统时钟
| |-- 初始化 SDRAM
|-- 实现一些额外的协助开发过程的功能
| |-- 为方便下载,u-boot 还要能够写 Flash
| |-- 串口、网卡、USB 等扩展功能
| |-- 可以实现命令烧写、网络烧写、USB 烧写 kernel 到 Flash 上
|-- 在 SDRAM 中启动 kernel
3. u-boot 配置编译流程
|-- 解压 u-boot
- 删除该目录的编译
book@book-desktop:/work/system$
book@book-desktop:/work/system$rm -rf u-boot-1.1.6
- uboot文件解压缩
book@book-desktop:/work/system$tar xjf u-boot-1.1.6.tar.bz2 book@book-desktop:/work/system$tar cjf u-boot-1.1.6.tar.bz2 u-boot-1.1.6 (压缩)
- 给uboot打补丁
book@book-desktop:/work/system$cd u-boot-1.1.6
book@book-desktop:/work/system/u-boot-1.1.6$patch –p1 < ../ u-boot-1.1.6_jz2440.patch
- 配置及 编译
book@book-desktop:/work/system/u-boot-1.1.6$make 100ask24x0_config
book@book-desktop:/work/system/u-boot-1.1.6$make