Hi @drewmoseley
Actually i have not done any changes in Uboot. Please find my integration below
Partitions
MENDER_STORAGE_DEVICE = “/dev/mmcblk0”
MENDER_STORAGE_DEVICE_BASE = “/dev/mmcblk0p”
MENDER_STORAGE_TOTAL_SIZE_MB = “512”
MENDER_BOOT_PART_SIZE_MB = “0”
MENDER_DATA_PART_SIZE_MB = “10”
MENDER_ROOTFS_PART_A = “{MENDER_STORAGE_DEVICE_BASE}1"
MENDER_ROOTFS_PART_B = "{MENDER_STORAGE_DEVICE_BASE}2”
MENDER_DATA_PART = “${MENDER_STORAGE_DEVICE_BASE}3”
For rootfs size
#IMAGE_ROOTFS_SIZE=“200000”
Environment
MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_1 = “0x2000”
Redundant environment
MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_2 = “0x4000”
BOOTENV_SIZE = “0x2000”
align to PEB size 128k
MENDER_PARTITION_ALIGNMENT ?= “128”
there is no partitioning overhead (no MBR and such)
MENDER_PARTITIONING_OVERHEAD ?= “0”
Account for UBI overhead, see
MENDER_RESERVED_SPACE_BOOTLOADER_DATA ?= “20971520”
IMAGE_ROOTFS_MAXSIZE ?= “307200”
After which when bitbake command is given we get the below error
bb.data_smart.ExpansionError: Failure expanding variable MENDER_IS_ON_MTDID, expression was ${@mender_default_mender_mtdid(d)} which triggered exception BBHandledException:
So MENDER_IS_ON_MTDID is not set. with reference to https://docs.mender.io/2.2/devices/yocto-project/raw-flash
tried setting
MENDER_MTDIDS = “nand1=60000000.flash”
MENDER_IS_ON_MTDID = “60000000.flash”
After which we are getting the below error
ERROR: u-boot-imx-2018.03-r0 do_check_mender_defines: U-Boot configuration mx6ull_14x14_evk_optee_config has setting:
CONFIG_MTDIDS_DEFAULT=""
but Mender expects:
CONFIG_MTDIDS_DEFAULT=“nand0=60000000.flash”
Please fix U-Boot’s configuration file.
After adding these changes
MENDER_MTDIDS = “nand0=01806000.flash”
MENDER_IS_ON_MTDID = “01806000.flash”
MENDER_MTDPARTS = “gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0”
we are getting the below error
WARNING: Host distribution “ubuntu-18.04” has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |####################################################################################################################################################| Time: 0:00:00
Loaded 16 entries from dependency cache.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
WARNING: /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb: Could not find MENDER_IS_ON_MTDID (01806000.flash) in MENDER_MTDPARTS (gpmi-nand:10m(boot),8m(kernel),1m(dtb),-(rootfs)\0). Returning UBI size of zero.
ERROR: ExpansionError during parsing /home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb
Traceback (most recent call last):
File “/home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/poky/meta/classes/image.bbclass”, line 454, in _anon_519__home_keshavab_PROJECTS_OBD_Latest_Porting_mender_imx_yocto_bsp_sources_poky_meta_classes_image_bbclass(d=<bb.data_smart.DataSmart object at 0x7fa1c3f3f898>):
image_cmd = localdata.getVar(“IMAGE_CMD”)
> vardeps.add('IMAGE_CMD’ + realt)
if image_cmd:
File “/home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/poky/bitbake/lib/bb/data_smart.py”, line 608, in DataSmart.getVar(var=‘IMAGE_CMD’, expand=True, noweakdefault=False, parsing=False):
def getVar(self, var, expand=True, noweakdefault=False, parsing=False):
> return self.getVarFlag(var, “_content”, expand, noweakdefault, parsing)
File “/home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/poky/bitbake/lib/bb/data_smart.py”, line 794, in DataSmart.getVarFlag(var=‘IMAGE_CMD’, flag=’_content’, expand=True, noweakdefault=False, parsing=False):
cachename = var + “[” + flag + “]”
> value = self.expand(value, cachename)
File “/home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/poky/bitbake/lib/bb/data_smart.py”, line 436, in DataSmart.expand(s=’ set -ex\n\n # We don’t actually use the result from this one, it’s only to trigger a\n # warning or error if the variable is not correctly set.\n mender_get_mtdparts\n\n ${@mender_make_mtdparts_shell_array(d)}\n\n local remaining_encountered=0\n local i=0\n while [ $i -lt $mtd_count ]; do\n eval local name="\"\$mtd_names_$i\""\n eval local size="\"\$mtd_sizes_$i\""\n eval local kbsize="\"\$mtd_kbsizes_$i\""\n eval local kboffset="\"\$mtd_kboffsets_$i\""\n\n if [ “name" = "u-boot" ]; then\n if [ -n "{MENDER_IMAGE_BOOTLOADER_FILE}” ]; then\n mender_flash_mtdpart “{DEPLOY_DIR_IMAGE}/{MENDER_IMAGE_BOOTLOADER_FILE}” $size $kbsize $kboffset $name\n else\n bbwarn “There is a ‘u-boot’ mtdpart, but MENDER_IMAGE_BOOTLOADER_FILE is undefined. Filling with zeros.”\n mender_flash_mtdpart “/dev/zero” $size $kbsize $kboffset $name\n fi\n elif [ “name" = "u-boot-env" ]; then\n mender_flash_mtdpart "{DEPLOY_DIR_IMAGE}/uboot.env” $size $kbsize $kboffset $name\n elif [ “name" = "ubi" ]; then\n mender_flash_mtdpart "{IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ubimg” $size $kbsize $kboffset $name\n else\n bbwarn “Don’t know how to flash mtdparts ‘$name’. Filling with zeros.”\n mender_flash_mtdpart “/dev/zero” $size $kbsize $kboffset name\n fi\n\n i=(expr i + 1)\n done\n\n ln -sfn "{IMAGE_NAME}.mtdimg" “{IMGDEPLOYDIR}/{IMAGE_LINK_NAME}.mtdimg”\n’, varname=‘IMAGE_CMD’):
def expand(self, s, varname = None):
> return self.expandWithRefs(s, varname).value
File “/home/keshavab/PROJECTS/OBD/Latest_Porting/mender/imx-yocto-bsp/sources/poky/bitbake/lib/bb/data_smart.py”, line 426, in DataSmart.expandWithRefs(s=’ set -ex\n\n # We don’t actually use the result from this one, it’s only to trigger a\n # warning or error if the variable is not correctly set.\n mender_get_mtdparts\n\n ${@mender_make_mtdparts_shell_array(d)}\n\n local remaining_encountered=0\n local i=0\n while [ $i -lt $mtd_count ]; do\n eval local name="\"\$mtd_names_$i\""\n eval local size="\"\$mtd_sizes_$i\""\n eval local kbsize="\"\$mtd_kbsizes_$i\""\n eval local kboffset="\"\$mtd_kboffsets_$i\""\n\n if [ “name" = "u-boot" ]; then\n if [ -n "u-boot.imx" ]; then\n mender_flash_mtdpart "{TMPDIR}/deploy/images/imx6ull14x14evk/u-boot.imx” $size $kbsize $kboffset $name\n else\n bbwarn “There is a ‘u-boot’ mtdpart, but MENDER_IMAGE_BOOTLOADER_FILE is undefined. Filling with zeros.”\n mender_flash_mtdpart “/dev/zero” $size $kbsize $kboffset $name\n fi\n elif [ “name" = "u-boot-env" ]; then\n mender_flash_mtdpart "{TMPDIR}/deploy/images/imx6ull14x14evk/uboot.env” $size $kbsize $kboffset $name\n elif [ “name" = "ubi" ]; then\n mender_flash_mtdpart "{TMPDIR}/work/imx6ull14x14evk-poky-linux-gnueabi/fsl-image-qt5-validation-imx/1.0-r0/deploy-fsl-image-qt5-validation-imx-image-complete/fsl-image-qt5-validation-imx-imx6ull14x14evk.ubimg” $size $kbsize $kboffset $name\n else\n bbwarn “Don’t know how to flash mtdparts ‘$name’. Filling with zeros.”\n mender_flash_mtdpart “/dev/zero” $size $kbsize $kboffset name\n fi\n\n i=(expr i + 1)\n done\n\n ln -sfn "fsl-image-qt5-validation-imx-imx6ull14x14evk-{DATETIME}.mtdimg" “${TMPDIR}/work/imx6ull14x14evk-poky-linux-gnueabi/fsl-image-qt5-validation-imx/1.0-r0/deploy-fsl-image-qt5-validation-imx-image-complete/fsl-image-qt5-validation-imx-imx6ull14x14evk.mtdimg”\n’, varname=‘IMAGE_CMD’):
except Exception as exc:
> raise ExpansionError(varname, s, exc) from exc
bb.data_smart.ExpansionError: Failure expanding variable IMAGE_CMD, expression was set -ex
# We don't actually use the result from this one, it's only to trigger a
# warning or error if the variable is not correctly set.
mender_get_mtdparts
${@mender_make_mtdparts_shell_array(d)}
local remaining_encountered=0
local i=0
while [ $i -lt $mtd_count ]; do
eval local name="\"\$mtd_names_$i\""
eval local size="\"\$mtd_sizes_$i\""
eval local kbsize="\"\$mtd_kbsizes_$i\""
eval local kboffset="\"\$mtd_kboffsets_$i\""
if [ "$name" = "u-boot" ]; then
if [ -n "u-boot.imx" ]; then
mender_flash_mtdpart "${TMPDIR}/deploy/images/imx6ull14x14evk/u-boot.imx" $size $kbsize $kboffset $name
else
bbwarn "There is a 'u-boot' mtdpart, but MENDER_IMAGE_BOOTLOADER_FILE is undefined. Filling with zeros."
mender_flash_mtdpart "/dev/zero" $size $kbsize $kboffset $name
fi
elif [ "$name" = "u-boot-env" ]; then
mender_flash_mtdpart "${TMPDIR}/deploy/images/imx6ull14x14evk/uboot.env" $size $kbsize $kboffset $name
elif [ "$name" = "ubi" ]; then
mender_flash_mtdpart "${TMPDIR}/work/imx6ull14x14evk-poky-linux-gnueabi/fsl-image-qt5-validation-imx/1.0-r0/deploy-fsl-image-qt5-validation-imx-image-complete/fsl-image-qt5-validation-imx-imx6ull14x14evk.ubimg" $size $kbsize $kboffset $name
else
bbwarn "Don't know how to flash mtdparts '$name'. Filling with zeros."
mender_flash_mtdpart "/dev/zero" $size $kbsize $kboffset $name
fi
i=$(expr $i + 1)
done
ln -sfn "fsl-image-qt5-validation-imx-imx6ull14x14evk-${DATETIME}.mtdimg" "${TMPDIR}/work/imx6ull14x14evk-poky-linux-gnueabi/fsl-image-qt5-validation-imx/1.0-r0/deploy-fsl-image-qt5-validation-imx-image-complete/fsl-image-qt5-validation-imx-imx6ull14x14evk.mtdimg"
which triggered exception TypeError: not all arguments converted during string formatting
Please help us resolve this as we are new to mender.
Thanks
Deepanraj