Hello Mirzak
Thank for your quick reply and useful information.
So I tried to use the demo manifest file in the IMX BSP but I still encounter some issues.
here are my steps:
Then I adapt 0001-Add-Mender-support.patch, 0002-Improve-boot-startup-time.patch and meta-mender-imx/templates/local.conf to support IMX8MM instead of MX8MQ.
Here is my final local.conf:
INHERIT += "rm_work"
MENDER_ARTIFACT_NAME = "release-1"
INHERIT += "mender-full"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"
MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd"
PREFERRED_PROVIDER_u-boot = "u-boot-imx"
IMAGE_FSTYPES_remove = "tar.bz2 ext4 sdcard.bz2"
IMAGE_BOOT_FILES_append = "u-boot-imx8mmevk.bin"
MENDER_IMAGE_BOOTLOADER_FILE = "imx-boot-imx8mmevk-sd.bin"
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET = "66"
do_image_sdimg[depends] += "imx-boot:do_deploy"
IMAGE_INSTALL_append = " kernel-image kernel-devicetree"
MENDER_STORAGE_DEVICE_imx8mmevk = "/dev/mmcblk1"
Compilation of u-boot-imx-2018.03 fails with this error:
bitbake core-image-base
aarch64-poky-linux-gcc --sysroot=/home/lserbetot/Developpement/imx-mender/build_imx8mm_mender/tmp/work/aarch64-poky-linux/u-boot-fw-utils-mender-auto-provided/1.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/lserbetot/Developpement/imx-mender/build_imx8mm_mender/tmp/work/aarch64-poky-linux/u-boot-fw-utils-mender-auto-provided/1.0-r0=/usr/src/debug/u-boot-fw-utils-mender-auto-provided/1.0-r0 -fdebug-prefix-map=/home/lserbetot/Developpement/imx-mender/build_imx8mm_mender/tmp/work/aarch64-poky-linux/u-boot-fw-utils-mender-auto-provided/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/lserbetot/Developpement/imx-mender/build_imx8mm_mender/tmp/work/aarch64-poky-linux/u-boot-fw-utils-mender-auto-provided/1.0-r0/recipe-sysroot-native= -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -E -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -fshort-wchar -O2 -fno-stack-protector -fno-delete-null-pointer-checks -g -fstack-usage -Wno-format-nonliteral -Werror=date-time -D__KERNEL__ -D__UBOOT__ -D__ARM__ -fno-pic -mstrict-align -ffunction-sections -fdata-sections -fno-common -ffixed-r9 -fno-common -ffixed-x18 -pipe -Iinclude -I./arch/arm/include -include ./include/linux/kconfig.h -nostdinc -isystem /home/lserbetot/Developpement/imx-mender/build_imx8mm_mender/tmp/work/aarch64-poky-linux/u-boot-fw-utils-mender-auto-provided/1.0-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../lib/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/include -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM ./include/common.h > spl/u-boot.cfg.tmp && { grep 'define CONFIG_' spl/u-boot.cfg.tmp > spl/u-boot.cfg; rm spl/u-boot.cfg.tmp; } || { rm spl/u-boot.cfg.tmp; false; }
| In file included from include/config.h:11:0,
| from ./include/common.h:21:
| include/config_mender.h:73:5: error: #error CONFIG_SYS_MMC_ENV_DEV is not the same as MENDER_UBOOT_STORAGE_DEVICE. Either set it to the same value (check for example in the defconfig file), or make sure it is not defined at all. Make sure that: 1) All the instructions at docs.mender.io/devices/integrating-with-u-boot have been followed. 2) All required layers are included in bblayers.conf, including any board specific layers such as meta-mender-<board>
| # error CONFIG_SYS_MMC_ENV_DEV is not the same as MENDER_UBOOT_STORAGE_DEVICE. Either set it to the same value (check for example in the defconfig file), or make sure it is not defined at all. Make sure that: 1) All the instructions at docs.mender.io/devices/integrating-with-u-boot have been followed. 2) All required layers are included in bblayers.conf, including any board specific layers such as meta-mender-<board>
| ^~~~~
| In file included from include/config.h:11:0,
| from ./include/common.h:21:
| include/config_mender.h:73:5: error: #error CONFIG_SYS_MMC_ENV_DEV is not the same as MENDER_UBOOT_STORAGE_DEVICE. Either set it to the same value (check for example in the defconfig file), or make sure it is not defined at all. Make sure that: 1) All the instructions at docs.mender.io/devices/integrating-with-u-boot have been followed. 2) All required layers are included in bblayers.conf, including any board specific layers such as meta-mender-<board>
| # error CONFIG_SYS_MMC_ENV_DEV is not the same as MENDER_UBOOT_STORAGE_DEVICE. Either set it to the same value (check for example in the defconfig file), or make sure it is not defined at all. Make sure that: 1) All the instructions at docs.mender.io/devices/integrating-with-u-boot have been followed. 2) All required layers are included in bblayers.conf, including any board specific layers such as meta-mender-<board>
| ^~~~~
| In file included from include/config.h:11:0,
| from ./include/common.h:21:
| include/config_mender.h:73:5: error: #error CONFIG_SYS_MMC_ENV_DEV is not the same as MENDER_UBOOT_STORAGE_DEVICE. Either set it to the same value (check for example in the defconfig file), or make sure it is not defined at all. Make sure that: 1) All the instructions at docs.mender.io/devices/integrating-with-u-boot have been followed. 2) All required layers are included in bblayers.conf, including any board specific layers such as meta-mender-<board>
| # error CONFIG_SYS_MMC_ENV_DEV is not the same as MENDER_UBOOT_STORAGE_DEVICE. Either set it to the same value (check for example in the defconfig file), or make sure it is not defined at all. Make sure that: 1) All the instructions at docs.mender.io/devices/integrating-with-u-boot have been followed. 2) All required layers are included in bblayers.conf, including any board specific layers such as meta-mender-<board>
| ^~~~~
I checked my bblayers.conf and meta-mender-imx is well included. bitbake -e core-image-base | grep “^MENDER_UBOOT_STORAGE_DEVICE” returns MENDER_UBOOT_STORAGE_DEVICE="". So I tried to add MENDER_UBOOT_STORAGE_DEVICE = “0” to local.conf but the compilation error remains.
Any idea about how to fix this compilation error?
Thanks.
Regards.
Edit: @mirzak: add formatting of logs and code