Do_image_teziimg fails

Hello.
I’m trying to build my custom image for colibri-imx8x, however in the final steps I am getting this error:

ERROR: myos-image-1.0-r0 do_image_teziimg: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:rootfs_tezi_run_json(d)
     0003:
File: '/home/ubuntu/roby/colibri-imx8x-bsp/layers/meta-toradex-bsp-common/classes/image_type_tezi.bbclass', lineno: 347, function: rootfs_tezi_run_json
     0343:        flash_data = rootfs_tezi_emmc(d, use_bootfiles)
     0344:        uenv_file = d.getVar('UBOOT_ENV_TEZI_EMMC')
     0345:        uboot_file = d.getVar('UBOOT_BINARY_TEZI_EMMC')
     0346:        # TODO: Multi image/raw NAND with SPL currently not supported
 *** 0347:        uboot_file += " " + d.getVar('SPL_BINARY') if d.getVar('OFFSET_SPL_PAYLOAD') else ""
     0348:        artifacts += " " + "%s/%s.%s" % (d.getVar('IMGDEPLOYDIR'), d.getVar('IMAGE_LINK_NAME'), d.getVar('TEZI_BOOT_SUFFIX')) if use_bootfiles else ""
     0349:    else:
     0350:        bb.fatal("Toradex flash type unknown")
     0351:
Exception: TypeError: can only concatenate str (not "NoneType") to str

ERROR: Logfile of failure stored in: /home/ubuntu/roby/colibri-imx8x-bsp/build/tmp/work/colibri_imx8x-poky-linux/myos-image/1.0-r0/temp/log.do_image_teziimg.2991512
ERROR: Task (/home/ubuntu/roby/colibri-imx8x-bsp/layers/meta-myos/recipes-core/images/myos-image.bb:do_image_teziimg) failed with exit code '1'
NOTE: Tasks Summary: Attempted 7964 tasks of which 7963 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/ubuntu/roby/colibri-imx8x-bsp/layers/meta-myos/recipes-core/images/myos-image.bb:do_image_teziimg

I’m using meta-toradex-bsp-common’s dunfell.5.x.y branch.
Looks like the problem is that SPL_BINARY is null.
Any idea how I can fix this?

Bump. Still need help.

Hi @robs !

From this, I understand that the task failing is from a recipe you created, right? If you build a Reference Image from the Toradex BSP (Minimal or Multimedia), does it fail?

From these two lines, seems like the concatenation " " + d.getVar('SPL_BINARY') fails because d.getVar('SPL_BINARY') returned None (which is of type NoneType). Therefore SPL_BINARY seems to be None, which doesn’t feel right.

You can check SPL_BINARY’s value by executing:

bitbake -e myos-image | grep -P '^SPL_BINARY='

Is it possible that your image recipe is somewhat messing with this SPL_BINARY variable?

Best regards,