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
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