I have mostly integrated mender with efusA9 board which is based on NXP IMX.6. After integration I have generated the .mender artifact plus the root file system .ext4 and also the required changes in uboot as well to have mender variables.
My issue is I want to generate an sdimg instead of having only the root file system generated (.ext4).
Here is the content of my local.conf
Thanks for the speedy reply. The board efusA9 uses yocto branch “imx-4.1-krogoth” to fetch the mainstream yocto meta data plus poky and I fetched meta-mender from morty branch, somehow i get an error with meta-mender from krogoth. Everything builds fine and I can generate .mender and the root file system .ext4, only my issue is with generating the sdimg.
The upstream krogoth branch has not been run with Mender in quite some time. Additionally, the morty branch of meta-mender is not getting updates any more so you may be facing an uphill battle here.
The yocto sources of the efusA9 board is from krogoth and I fetched meta-mender from morty. This means that WIC tool expects different arguments of the “part” command. I tested the following to make sure:
I modified only some lines in “mender-part-images.bbclass” which writes the arguments to mender-sdimg.wks file.
I commented an “if” block and changed the “part” command so that it matches “mender-sdimg.bbclass” from krogoth
| ### Contents of wks file ###
| + cat /home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/work/fsimx6-poky-linux-gnueabi/fus-image-std/1.0-r0/mender-sdimg.wks
| part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --align 4096 --active --size 16
| part / --source fsimage --sourceparams=file="/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/work/fsimx6-poky-linux-gnueabi/fus-image-std/1.0-r0/active" --ondisk mmcblk0 --label primary --align 4096
| part / --source fsimage --sourceparams=file="/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/work/fsimx6-poky-linux-gnueabi/fus-image-std/1.0-r0/inactive" --ondisk mmcblk0 --label secondary --align 4096
| part /data --source fsimage --sourceparams=file="/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/work/fsimx6-poky-linux-gnueabi/fus-image-std/1.0-r0/data." --ondisk mmcblk0 --fstype= --label data --align 4096
| + echo '### End of contents of wks file ###'
| ### End of contents of wks file ###
| + outimgname=/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/deploy/images/fsimx6/fus-image-std-fsimx6-20190904143057.sdimg
| + wicout=/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/deploy/images/fsimx6/fus-image-std-fsimx6-20190904143057-sdimg
| + BUILDDIR=/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build
| + wic create /home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/work/fsimx6-poky-linux-gnueabi/fus-image-std/1.0-r0/mender-sdimg.wks --vars /home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/sysroots/fsimx6/imgdata/ -e fus-image-std -o /home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/deploy/images/fsimx6/fus-image-std-fsimx6-20190904143057-sdimg/
| Warning: bootloader config not specified, using defaults
| Error: exec_cmd: install -m 0644 -D /home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/deploy/images/fsimx6/u-boot.nb0 /home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/deploy/images/fsimx6/fus-image-std-fsimx6-20190904143057-sdimg/build/boot/u-boot.nb0 returned '1' instead of 0
| Checking basic build environment...
| Done.
|
| Creating image(s)...
|
| + bb_exit_handler
| + ret=1
| + case $ret in
| + case $BASH_VERSION in
| + echo 'WARNING: /home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/work/fsimx6-poky-linux-gnueabi/fus-image-std/1.0-r0/temp/run.do_image_sdimg.9870:1 exit 1 from '\''BUILDDIR="/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build" wic create "$wks" --vars "/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/sysroots/fsimx6/imgdata/" -e "fus-image-std" -o "$wicout/" ${WIC_CREATE_EXTRA_ARGS}'\'''
| WARNING: /home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/work/fsimx6-poky-linux-gnueabi/fus-image-std/1.0-r0/temp/run.do_image_sdimg.9870:1 exit 1 from 'BUILDDIR="/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build" wic create "$wks" --vars "/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/sysroots/fsimx6/imgdata/" -e "fus-image-std" -o "$wicout/" ${WIC_CREATE_EXTRA_ARGS}'
| + exit 1
| ERROR: Function failed: do_image_sdimg (log file is located at /home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/build/tmp/work/fsimx6-poky-linux-gnueabi/fus-image-std/1.0-r0/temp/log.do_image_sdimg.9870)
ERROR: Task 19 (/home/aawad/BDSDK-QuadCore/BDSDK/trunk/src/efusA9/sources/meta-fus/recipes-config/images/fus-image-std.bb, do_image_sdimg) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5805 tasks of which 5804 didn't need to be rerun and 1 failed.
It will be hard for me in the mean time to update the board BSP files to a newer yocto version so that I can use the same meta-mender which corresponds to the same yocto version. Yes you are right it is a battle :), !