2440移植2019年最新uboot

开发板:jz2440
uboot版本:u-boot-2019.01.tar.bz2

  1. 下载UBOOT源码
    http://ftp.denx.de/pub/u-boot/
    2.下载交叉编译工具
    https://www.linaro.org/downloads/

一。先看readme

1,make XXX_defconfig
在这里插入图片描述
说明和之前用法一样,也是make xxx_defconfig

2,start.s
在这里插入图片描述start.s路径:arch/arm/cpu/arm920t/start.S
3,三个函数
在这里插入图片描述翻译后:从那里,有三个函数被调用; 目的和下面描述了这些功能中的每一个的限制。
然后开始介绍三个函数
3.1,lowlevel_init()函数:

  • 目的:设置机器准备好运行board_init_r():
    即SDRAM和串行UART
  • global_data可用
  • 堆栈在SRAM中
  • BSS不可用,因此您不能使用全局/静态变量,
    只有堆栈变量和global_data

注意:写不了全局变量 ,只能写堆栈还有用汇编中的全局数据。

board_init_f():

  • 目的:设置机器准备好运行board_init_r():
    即SDRAM和串行UART
  • global_data可用
  • 堆栈在SRAM中
  • BSS不可用,因此您不能使用全局/静态变量,
    只有堆栈变量和global_data

board_init_r()函数:

  • 目的:主要执行,通用代码
  • global_data可用
  • SDRAM可用
  • BSS可用,可以使用所有静态/全局变量
  • 执行最终继续到main_loop()

4,配置 .h文件

Configuration depends on the combination of board and CPU type; all
such information is kept in a configuration file
"include/configs/<board_name>.h".

和之前的配置文件一个地方
不过 没有SMDK2440.h ,连smdk2410都没有…看来得自己写了

猜你喜欢

转载自blog.csdn.net/qq_32166779/article/details/88031566