how to create a new custom board config from lsdk

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

how to create a new custom board config from lsdk

跳至解决方案
1,590 次查看
Simon666
Contributor II

we have a new project using LX2160A, we want to copy lx2160ardb_rev2 to a new board named lx2160a_myboard, then build it with command:

flex-builder -m lx2160a_myboard,

how to get this, thanks!

0 项奖励
1 解答
1,584 次查看
yipingwang
NXP TechSupport
NXP TechSupport

For custom board porting in flex-builder LSDK, please refer to the following procedure, I assume the custom board named lx2160axx please refer to source code of lx2160ardb.

  1. Porting flex-builder source code.

 Please add file configs/board/lx2160axx/manifest, in this file please add "machine=lx2160axx" and images paths, you could modify it from configs/board/lx2160ardb_rev2/manifest.

 Please add LX2160AXX in CONFIG_MACHINE in configs/sdk.yml.

 

  1. ATF source code porting 

Please go to ATF source code folder components/firmware/atf, please add folder plat/nxp/soc-lx2160a/lx2160axx and add files ddr_init.c, platform_def.h, platform.mk and policy.h.

 

ddr_init.c: DDR controller configuration of the custom board. 

platform_def.h: modify "Board specific defines" for your custom board.

platform.mk: please modify BOARD as "axx" and modify BOOT_MODE according to your custom board.

 

  1. U-BOOT source code porting.

 

Please go to u-boot source code folder components/firmware/uboot/.

Please add file configs/lx2160axx_tfa_defconfig, please modify the following definition in this file.

CONFIG_TARGET_LX2160AXX=y

CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-xx"

In folder board/freescale/lx2160a, please add file eth_lx2160axx.c, modify Kconfig, lx2160a.c, lx2160a.h and Makefile in this folder.

 Please add file u-boot/include/configs/lx2160axx.h, Please modify the configuration based on include/configs/lx2160ardb.h

Please modify Ethernet PHY address according to your custom board.

 Please modify arch/arm/Kconfig, add the following.

config TARGET_LX2160AXX

source

"board/freescale/lx2160axx/Kconfig

 

Please modify arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c

and arch/arm/cpu/armv8/Kconfig

to add LX2160AXX support.

Please go to folder arch/arm/dts, create fsl-lx2160a-xx.dts.

Please add "fsl-lx2160a-xx.dtb" in

variable dtb-$(CONFIG_FSL_LSCH3) in arch/arm/dts/Makefile.

4. In Linux Kernel source code components/linux/linux/, you also need to create dts file fsl-lx2160a-xx.dts for your custom board in folder arch/arm64/boot/dts/freescale/.

在原帖中查看解决方案

1 回复
1,585 次查看
yipingwang
NXP TechSupport
NXP TechSupport

For custom board porting in flex-builder LSDK, please refer to the following procedure, I assume the custom board named lx2160axx please refer to source code of lx2160ardb.

  1. Porting flex-builder source code.

 Please add file configs/board/lx2160axx/manifest, in this file please add "machine=lx2160axx" and images paths, you could modify it from configs/board/lx2160ardb_rev2/manifest.

 Please add LX2160AXX in CONFIG_MACHINE in configs/sdk.yml.

 

  1. ATF source code porting 

Please go to ATF source code folder components/firmware/atf, please add folder plat/nxp/soc-lx2160a/lx2160axx and add files ddr_init.c, platform_def.h, platform.mk and policy.h.

 

ddr_init.c: DDR controller configuration of the custom board. 

platform_def.h: modify "Board specific defines" for your custom board.

platform.mk: please modify BOARD as "axx" and modify BOOT_MODE according to your custom board.

 

  1. U-BOOT source code porting.

 

Please go to u-boot source code folder components/firmware/uboot/.

Please add file configs/lx2160axx_tfa_defconfig, please modify the following definition in this file.

CONFIG_TARGET_LX2160AXX=y

CONFIG_DEFAULT_DEVICE_TREE="fsl-lx2160a-xx"

In folder board/freescale/lx2160a, please add file eth_lx2160axx.c, modify Kconfig, lx2160a.c, lx2160a.h and Makefile in this folder.

 Please add file u-boot/include/configs/lx2160axx.h, Please modify the configuration based on include/configs/lx2160ardb.h

Please modify Ethernet PHY address according to your custom board.

 Please modify arch/arm/Kconfig, add the following.

config TARGET_LX2160AXX

source

"board/freescale/lx2160axx/Kconfig

 

Please modify arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch2_speed.c

and arch/arm/cpu/armv8/Kconfig

to add LX2160AXX support.

Please go to folder arch/arm/dts, create fsl-lx2160a-xx.dts.

Please add "fsl-lx2160a-xx.dtb" in

variable dtb-$(CONFIG_FSL_LSCH3) in arch/arm/dts/Makefile.

4. In Linux Kernel source code components/linux/linux/, you also need to create dts file fsl-lx2160a-xx.dts for your custom board in folder arch/arm64/boot/dts/freescale/.