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!
Solved! Go to Solution.
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.
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.
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.
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/.
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.
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.
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.
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/.