uboot移植新增單板支援

2021-09-18 07:45:09 字數 2304 閱讀 7819

cp configs/mx6qarm2_defconfig fet_mx6q_defconfig
四、修改 fet_mx6q_defconfig

vi fet_mx6q_defconfig

config_arm=y

config_arch_mx6=y //mx6

config_target_fet_mx6q=y //目標名字

config_sys_extra_options="imx_config=board/freescale/fet_mx6q/imximage.cfg,mx6q,ddr_mb=2048" //指定cfg檔案的路徑

config_bootdelay=3

config_hush_parser=y

config_cmd_bootz=y

# config_cmd_imls is not set

# config_cmd_flash is not set

config_cmd_mmc=y

config_cmd_usb=y

config_cmd_gpio=y

# config_cmd_setexpr is not set

config_cmd_dhcp=y

config_cmd_mii=y

config_cmd_ping=y

config_cmd_cache=y

config_cmd_ext2=y

config_cmd_ext4=y

config_cmd_ext4_write=y

config_cmd_fat=y

config_cmd_fs_generic=y

config_usb=y

config_usb_storage=y

config_of_libfdt=y

五、複製標頭檔案

cp include/configs/mx6qarm2.h  include/configs/fet_mx6q.h
六、複製原始檔

cp board/freescale/mx6qarm2 board/freescale/fet_mx6q -arf
六、進入fet_mx6q資料夾,修改kconfig、makefile、maintainers

1.kconfig

if target_fet_mx6q

config sys_board

default "fet_mx6q"

config sys_vendor

default "freescale"

config sys_config_name

default "fet_mx6q"

endif

2.makefile

obj-y := fet_mx6q.o

3.maintainers

fet_mx6 board

m: jason liu m: ye li s: maintained

f: board/freescale/fet_mx6q/

f: include/configs/fet_mx6q.h

f: configs/fet_mx6q_defconfig

f: configs/mx6dlarm2_defconfig

f: configs/mx6qarm2_lpddr2_defconfig

f: configs/mx6dlarm2_lpddr2_defconfig

七、修改原檔名

mv board/freescale/fet_mx6q/mx6qarm2.c board/freescale/fet_mx6q/fet_mx6q.c
八、新增fet_mx6q資訊

vim arch/arm/cpu/armv7/mx6/kconfig

查詢到:

config target_mx6qarm2

bool "mx6qarm2"

在這個下面新增:

config target_fet_mx6q

bool "fet_mx6q"

找到source "board/freescale/mx6qarm2/kconfig"

在這個下面新增:

source "board/freescale/fet_mx6q/kconfig"

九、配置編譯

make fet_mx6q_defconfig

make all

U Boot移植 支援串列埠Xmodem協議

u boot預設支援的loadb命令需要配合linux下的kermit工具來使用,loady命令通過串列埠ymodem協議來傳輸檔案。windows下的超級終端雖然支援ymodem,但是它的使用介面實在不友好。而securecrt只支援xmodem和zmodem。而上位機和開發板之間的檔案傳輸又實在...

u boot移植(六)新增nandflash支援

1 新增nand flash 移植 mtd為linux下的儲存架構,mtd封裝了對儲存器操作的統一介面函式,方便linux呼叫 檢視lib arm boart.c檔案,可以看到nand init 函式在drivers mtd nand nand.c中定義 if defined config cmd ...

U Boot移植日誌(3) 新增命令

u boot在定義指令時按模組化設計,指令的結構設計在 common command.c中定義,而各條指令的相關函式在單獨的檔案中 common cmd commandname.c,其中commandname為各指令名。要新增自己的指令可以按以下步驟 1 建立一函式do mycommandname,...