[IMX6Q]u-boot_v2009.08移植


u-boot版本: v2009.08

1. 参考一样平台其他目录copy一个
$cp -rf board/freescale/mx6_<reference board name> board/freescale/mx6_<custom board name>

2. copy一个平台相关mx6_<custom board name>.h文件
$cp include/configs/mx6_<referencename>.h  include/configs/mx6_<custom board name>.h

3.在顶层Makefile中添加config
mx6_<custom board name>_config: unconfig
    @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 mx6_<custom board name> freescale mx6

4. 重命名/mx6_<reference board name>.c
$ mv board/freescale/mx6_<reference board name>/mx6_<reference board name>.c
board/freescale/mx6_<custom board name>/mx6_<custom board name>.c.

5. 修改board/freescale/mx6_<customboard name>/u-boot.lds

board/freescale/mx6_<reference board name>/flash_header.o
改为
board/freescale/mx6_<custom board name>/flash_header.o


board/freescale/mx6_<reference board name>/libmx6_<reference board name>.a
改为
board/freescale/mx6_<custom board name>/libmx6_<custom board name>.a

6. 修改custom目录下Makefile

修改 board/freescale/mx6_<custom board name >/Makefile


board/freescale/mx6_<custom board
改为
COBJS := mx6_<custom board name>.o

7. 修改ddr配置
修改 board/freescale/mx6_<custom board name>/flash_header.S
修改 PHYS_SDRAM_1_SIZE, CONFIG_NR_DRAM_BANKS

8. 修改clock, iomux, gpio
路径: board/freescale/mx6_<customer_board>/mx6_<customer_board>.c

9. 修改machine type,如果不兼容,kernel将无法起来
board_init()@board/freescale/mx6_<customer_board>/mx6_<customer_board>.c
/* board id for linux */

gd->bd->bi_arch_number = MACH_TYPE_MX6_<reference board name>;

machine id 参考:

http://www.arm.linux.org.uk/developer/machines/

10. 编译

#!/bin/bash
export ARCH=arm
export CROSS_COMPILE=<path to cross compiler prefix>
make distclean
make mx6_<custom board name>_config
make


Refer to: i.MX_6Dual6Quad_BSP_Porting_Guide

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值