Missing OFFSET_BOOTROM_PAYLOAD problem

I have successfully built torizon core image with aplis imx6 machine before. Yesterday, I updated my local torizon core repo to the latest version, and started building torizon core image with colibri imx6 machine. But I got the error below.

ERROR: torizon-core-docker-1.1b1-r0 do_image_teziimg_distro: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:rootfs_tezi_run_distro_json(d)
     0003:
File: '/home/jdn/build/build-colibri-imx6/conf/../../layers/meta-toradex-bsp-common/classes/image_type_tezi.bbclass', lineno: 392, function: rootfs_tezi_run_distro_json
     0388:            flash_data = rootfs_tezi_rawnand(d, True)
     0389:            uenv_file = d.getVar('UBOOT_ENV_TEZI_RAWNAND')
     0390:            uboot_file = d.getVar('UBOOT_BINARY_TEZI_RAWNAND')
     0391:        elif flash_type == "emmc":
 *** 0392:            flash_data = rootfs_tezi_emmc(d)
     0393:            uenv_file = d.getVar('UBOOT_ENV_TEZI_EMMC')
     0394:            uboot_file = d.getVar('UBOOT_BINARY_TEZI_EMMC')
     0395:            # TODO: Multi image/raw NAND with SPL currently not supported
     0396:            if d.getVar('SPL_BINARY'):
File: '/home/jdn/build/build-colibri-imx6/conf/../../layers/meta-toradex-bsp-common/classes/image_type_tezi.bbclass', lineno: 121, function: rootfs_tezi_emmc
     0117:    if has_spl:
     0118:        bootpart_rawfiles.append(
     0119:              {
     0120:                "filename": d.getVar('SPL_BINARY'),
 *** 0121:                "dd_options": "seek=" + offset_bootrom
     0122:              })
     0123:    bootpart_rawfiles.append(
     0124:              {
     0125:                "filename": d.getVar('UBOOT_BINARY_TEZI_EMMC'),
Exception: TypeError: Can't convert 'NoneType' object to str implicitly

ERROR: Logfile of failure stored in: /home/jdn/build/build-colibri-imx6/tmp-torizon/work/colibri_imx6-tdx-linux-gnueabi/torizon-core-docker/1.1b1-r0/temp/log.do_image_teziimg_distro.14203
ERROR: Task (/home/jdn/build/build-colibri-imx6/conf/../../layers/meta-toradex-torizon/recipes-images/images/torizon-core-docker.bb:do_image_teziimg_distro) failed with exit code '1'

After looking into the code, I’ve found that it is because of the missing OFFSET_BOOTROM_PAYLOAD in the layers/meta-freescale-3rdparty/conf/machine/colibri-imx6.conf.

Is this a bug? Or something I have missed?

I have another try, use the colibri-imx6-mainline machine, and I got the errors below.

ERROR: linux-toradex-mainline-5.2.7+gitAUTOINC+93e83b9795_74e785ce10-r0 do_kernel_metadata: Could not locate BSP definition for colibri-imx6-mainline/standard and no defconfig was provided
ERROR: linux-toradex-mainline-5.2.7+gitAUTOINC+93e83b9795_74e785ce10-r0 do_kernel_metadata: Execution of '/home/jdn/build/build-colibri-imx6-mainline/tmp-torizon/work/colibri_imx6_mainline-tdx-linux-gnueabi/linux-toradex-mainline/5.2.7+gitAUTOINC+93e83b9795_74e785ce10-r0/temp/run.do_kernel_metadata.17076' failed with exit code 1:
WARNING: /home/jdn/build/build-colibri-imx6-mainline/tmp-torizon/work/colibri_imx6_mainline-tdx-linux-gnueabi/linux-toradex-mainline/5.2.7+gitAUTOINC+93e83b9795_74e785ce10-r0/temp/run.do_kernel_metadata.17076:1 exit 1 from 'exit 1'

ERROR: Logfile of failure stored in: /home/jdn/build/build-colibri-imx6-mainline/tmp-torizon/work/colibri_imx6_mainline-tdx-linux-gnueabi/linux-toradex-mainline/5.2.7+gitAUTOINC+93e83b9795_74e785ce10-r0/temp/log.do_kernel_metadata.17076
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/jdn/build/build-colibri-imx6-mainline/conf/../../layers/openembedded-core/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['kern-tools-native', 'quilt-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_kernel_metadata
| ERROR: Could not locate BSP definition for colibri-imx6-mainline/standard and no defconfig was provided
| WARNING: /home/jdn/build/build-colibri-imx6-mainline/tmp-torizon/work/colibri_imx6_mainline-tdx-linux-gnueabi/linux-toradex-mainline/5.2.7+gitAUTOINC+93e83b9795_74e785ce10-r0/temp/run.do_kernel_metadata.17076:1 exit 1 from 'exit 1'
| ERROR: Execution of '/home/jdn/build/build-colibri-imx6-mainline/tmp-torizon/work/colibri_imx6_mainline-tdx-linux-gnueabi/linux-toradex-mainline/5.2.7+gitAUTOINC+93e83b9795_74e785ce10-r0/temp/run.do_kernel_metadata.17076' failed with exit code 1:
| WARNING: /home/jdn/build/build-colibri-imx6-mainline/tmp-torizon/work/colibri_imx6_mainline-tdx-linux-gnueabi/linux-toradex-mainline/5.2.7+gitAUTOINC+93e83b9795_74e785ce10-r0/temp/run.do_kernel_metadata.17076:1 exit 1 from 'exit 1'
| 
ERROR: Task (/home/jdn/build/build-colibri-imx6-mainline/conf/../../layers/meta-toradex-torizon/recipes-kernel/linux/linux-toradex-mainline_5.2.bb:do_kernel_metadata) failed with exit code '1'

Greetings @airpumpkin,

OFFSET_BOOTROM_PAYLOAD gets provided by an include file here: colibri-imx6.inc « include « machine « conf - meta-toradex-nxp.git - Toradex BSP layer, recipes for NXP based modules

Also our nightly test builds haven’t failed recently so there doesn’t seem to be a build issue with Torizon currently. Did you clean the build after you updated your repo? This issue may be some strange caching issue between the old and new repo metadata.

Best Regards,
Jeremias

Greetings jeremias,

I have deleted the deploy and tmp-torizon folders.

I’ve noticed that the OFFSET_BOOTROM_PAYLOAD is in the inc file. But that inc file isn’t included in the layers/meta-freescale-3rdparty/conf/machine/colibri-imx6.conf.

I will delete the whole build folder and try again.

I think I’ve found what cause the problem.
My local.conf file was copied from the previous build folder, there is a missing line:
include conf/machine/include/${MACHINE}.inc

@airpumpkin

Is your build succeeding fine now?

Yes, it works now.
Maybe this can be in the troubleshooting guide.