Tailor the BSP for building different images according to different DRAM size

Hi all,

I am trying to build images for different SoM configurations based on iMX8mm. Toradex does have several different configurations with varying number of A53 cores, RAM and flash volumes, connectivity capabilities and etc. My concern is the RAM size in particular.

I have a local copy of BSP 6.2.0 on my host machine. There is no issue with successfully building the images. However, it seems that we can’t change the configuration from a higher level, e.g. Yocto. I noticed that in the U-boot source file: “/configs/verdin-imx8mm.h” the RAM size is hardcoded to 2GB, regardless of the product ID parameter encoded in the cfgblock:

#define PHYS_SDRAM_SIZE SZ_2G /* 2GB DDR */

In this case, how do I tailor the Yocto project configuration for building a dedicated image for a model with less-than-2GB RAM size, e.g. Verdin iMx8M MiniDualLite 1GB?


Hi @quan_shen , the actual RAM size be detected in u-boot by get_ram_size().