Since Kirkstone BSP release we decided to add a new configuration feature to our NXP based machines: DDR dimension configuration.
To check the available DDR configuration available for the module of your choosing you can either:
- Check the paragraph Machines Available in our software manual.
- Check the corresponding machine file in our meta-layer.
To guide you through this new feature we will take as an example our i.Core iMX8M Plus 2GbE and we will work with Kirkstone Yocto Release.
Prerequisites
- Correct setup of our BSP
Change DDR Configuration
Since our BSP has already been setup we can take a look at the machine file to check the available DDR configurations. Navigate at the path [yocto-dir]/sources/mete-engicam-nxp/conf/machine and open the file imx8mp-icore-2e.conf:
.
.
.
UBOOT_CONFIG_BASENAME = "imx8mp_icore_2e"
UBOOT_CONFIG ??= "2gb"
UBOOT_CONFIG[1gb] = "${UBOOT_CONFIG_BASENAME}_1gb_defconfig,sdcard"
UBOOT_CONFIG[2gb] = "${UBOOT_CONFIG_BASENAME}_defconfig,sdcard"
UBOOT_CONFIG[4gb] = "${UBOOT_CONFIG_BASENAME}_4gb_defconfig,sdcard"
.
.
.
As you can see from the previous extract we have 3 different DDR configurations: 1GB, 2GB (which is the default one) and 4GB. The variable UBOOT_CONFIG is the one that will select which one to use.
Let's say we want to select 1GB as our preferred configuration. To select it we need to edit the file local.conf at the path [yocto-dir]/[build-dir]/conf adding UBOOT_CONFIG = "1gb" as in the example below:
MACHINE ??= 'imx8mp-icore-2e'
DISTRO ?= 'fsl-imx-xwayland'
PACKAGE_CLASSES ?= 'package_rpm'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"
DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"
# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"
UBOOT_CONFIG = "1gb"
Once the change is made you can build a new image and find the result at the path [yocto-dir]/[build-dir]/tmp/deploy/images/imx8mp-icore-2e.
Note:: if you have already compiled an image you need to launche the following command ensure the change will have an effect.
bitbake u-boot-engicam -c cleansstate