按照蜗窝科技的步骤执行
1)CPU上电后,从哪种设备( BOOTROM )的哪个地址( 0x0000_0000 )开始执行。
2)用( )方式,可以让CPU进入USB download(或者UART download)模式。 no
3)进入USB download之后,设备使用哪个USB接口( )和主机通信。no
4)进入download模式后,哪一段地址范围(通常为SRAM)可以用来执行程序:( )~( ),size有多大( )。
5)用什么协议( )可以通过USB将bin文件上传到指定的地址。no
6)用什么协议( )可以让CPU跳转到到指定地址继续执行。no
Board -> ql10_demo
Vendor -> fmsh
Machine(SoC) -> fmql10
Arch -> arm
CPU -> armv7
mkdir -p board/fmsh/ql10_demo
touch board/fmsh/ql10_demo/Kconfig
touch board/fmsh/ql10_demo/Makefile
在arch/arm/Kconfig中,添加配置菜单
config TARGET_QL10_DEMO
bool "Support fmsh ql10 demo board"
select CPU_V7A
select SUPPORT_SPL
select SPL
help
Support for ql10 demo board platform based on fmsh ql10 Psoc,
with 4xA7 CPU, 1GB DDR.
endchoice
source "board/fmsh/ql10_demo/Kconfig"
board/fmsh/ql10_demo/Kconfig如下:
if TARGET_QL10_DEMO
config SYS_BOARD
default "ql10_demo"
config SYS_VENDOR
default "fmsh"
config SYS_SOC
default "fmql10"
config SYS_CONFIG_NAME
default "ql10_demo"
endif
vi doc/README.kconfig
以上README中有大致的流程
Conversion from boards.cfg to Kconfig
-------------------------------------
Prior to Kconfig, boards.cfg was a primary database that contained Arch, CPU,
SoC, etc. of all the supported boards. It was deleted when switching to
Kconfig. Each field of boards.cfg was converted as follows:
Status -> "S:" entry of MAINTAINERS
Arch -> CONFIG_SYS_ARCH defined by Kconfig
CPU -> CONFIG_SYS_CPU defined by Kconfig
SoC -> CONFIG_SYS_SOC defined by Kconfig
Vendor -> CONFIG_SYS_VENDOR defined by Kconfig
Board -> CONFIG_SYS_BOARD defined by Kconfig
Target -> File name of defconfig (configs/<target>_defconfig)
Options -> CONFIG_SYS_EXTRA_OPTIONS defined by Kconfig
Maintainers -> "M:" entry of MAINTAINERS
################# tips ####################
1.Arch arm
arch/arm/Kconfig中
config SYS_ARCH
default "arm"
2.CPU armv7
arch/arm/Kconfig
config SYS_CPU
default "armv7" if CPU_V7A
3.SoC fmql10
Define CONFIG_SYS_SOC="soc" to compile arch/<arch>/cpu/<cpu>/<soc> 其实并没有这个目录
4.Vendor fmsh
Define CONFIG_SYS_VENDOR="vendor" to compile board/<vendor>/common/*
and board/<vendor>/<board>/*
5.Board ql10_demo
Define CONFIG_SYS_BOARD="board" to compile board/<board>/*
(or board/<vendor>/<board>/* if CONFIG_SYS_VENDOR is defined)
6.Target ql10_demo
Define CONFIG_SYS_CONFIG_NAME="target" to include
include/configs/<target>.h
Add configs/<target>_defconfig
Tips to add/remove boards
-------------------------
When adding a new board, the following steps are generally needed:
[1] Add a header file include/configs/<target>.h
[2] Make sure to define necessary CONFIG_SYS_* in Kconfig:
Define CONFIG_SYS_CPU="cpu" to compile arch/<arch>/cpu/<cpu>
Define CONFIG_SYS_SOC="soc" to compile arch/<arch>/cpu/<cpu>/<soc>
Define CONFIG_SYS_VENDOR="vendor" to compile board/<vendor>/common/*
and board/<vendor>/<board>/*
Define CONFIG_SYS_BOARD="board" to compile board/<board>/*
(or board/<vendor>/<board>/* if CONFIG_SYS_VENDOR is defined)
Define CONFIG_SYS_CONFIG_NAME="target" to include
include/configs/<target>.h
[3] Add a new entry to the board select menu in Kconfig.
The board select menu is located in arch/<arch>/Kconfig or
arch/<arch>/*/Kconfig.
[4] Add a MAINTAINERS file
It is generally placed at board/<board>/MAINTAINERS or
board/<vendor>/<board>/MAINTAINERS
[5] Add configs/<target>_defconfig
When removing an obsolete board, the following steps are generally needed:
[1] Remove configs/<target>_defconfig
[2] Remove include/configs/<target>.h if it is not used by any other boards
[3] Remove board/<vendor>/<board>/* or board/<board>/* if it is not used
by any other boards
[4] Update MAINTAINERS if necessary
[5] Remove the unused entry from the board select menu in Kconfig
[6] Add an entry to doc/README.scrapyard
原文:https://www.cnblogs.com/idyllcheung/p/11377395.html