Yocto Memory - Multiple Configurations

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

Yocto Memory - Multiple Configurations

1,187 次查看
PaulDeMetrotion
Senior Contributor I

I have a custom board that provides two different memory configuration. I am trying to use a build option in the defconfig file to select the desired configuration but the settings don't appear to be identified. Will what I am trying work? Has anybody done something like this? When I attempt to build the u-boot image, I get the bold error message in the file below.

defconfig settings:

CONFIG_ARM=y
CONFIG_ARCH_MX6=y
CONFIG_TARGET_MX6DLC428=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6dlc428/mx6dl.cfg,MX6DL,DDR_MB=1024"
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y

mx6dl.cfg (memory configuration file):

/*
* SPDX-License-Identifier: GPL-2.0+
*
* Refer docs/README.imxmage for more details about how-to configure
* and create imximage boot image
*
* The syntax is taken as close as possible with the kwbimage
*/

/* image version */
IMAGE_VERSION 2

/*
* Boot Device : one of spi, sd
*/
BOOT_FROM sd

#if CONFIG_DDR_MB==1024
#include "mx6dl_1GBx32.cfg"
#elif CONFIG_DDR_MB==2048
#include "mx6dl_2GBx64.cfg"
#else
#error "unknown DDR size"
#endif

#include "clocks.cfg"

0 项奖励
1 回复

843 次查看
gusarambula
NXP TechSupport
NXP TechSupport

Hello Paul DeMetrotion,

I’m not sure if the conditional would work as expected although it’s logically correct. However, my recommendation would be creating a new machine for each hardware configuration, as this is a most common approach in Yocto. If you have two different boards that differ by the RAM available you would create two machine configurations. It is possible to create a base machine and then on the new machine configuration inherit the base machine and just add the configuration unique to the specific machine.

I hope this helps!

Regards,

0 项奖励