[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

你可能感兴趣的:([IMX6Q]u-boot_v2009.08移植)