Mender Integration failed while do_image_sdimage

Board description

Custom board based on Phyboard Pollux by Phytec.

URL: Phyboard Pollux

Issue

The actual integration of Mender on Yocto (kirkstone) seems to work fine, until it comes to the pretty much last step: do_image_sdimg.

There, the wic creation fails with the following error:

| INFO: Creating image(s)...
| 
| Traceback (most recent call last):
|   File "/work/layers/poky/scripts/lib/wic/filemap.py", line 457, in get_mapped_ranges
|     first_prev, last_prev = next(iterator)
| StopIteration
| 
| The above exception was the direct cause of the following exception:
| 
| Traceback (most recent call last):
|   File "/work/layers/poky/scripts/wic", line 547, in <module>
|     sys.exit(main(sys.argv[1:]))
|   File "/work/layers/poky/scripts/wic", line 542, in main
|     return hlp.invoke_subcommand(args, parser, hlp.wic_help_usage, subcommands)
|   File "/work/layers/poky/scripts/lib/wic/help.py", line 83, in invoke_subcommand
|     subcmd[0](args, usage)
|   File "/work/layers/poky/scripts/wic", line 222, in wic_create_subcommand
|     engine.wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
|   File "/work/layers/poky/scripts/lib/wic/engine.py", line 190, in wic_create
|     plugin.do_create()
|   File "/work/layers/poky/scripts/lib/wic/plugins/imager/direct.py", line 98, in do_create
|     self.create()
|   File "/work/layers/poky/scripts/lib/wic/plugins/imager/direct.py", line 185, in create
|     self._image.prepare(self)
|   File "/work/layers/poky/scripts/lib/wic/plugins/imager/direct.py", line 363, in prepare
|     part.prepare(imager, imager.workdir, imager.oe_builddir,
|   File "/work/layers/poky/scripts/lib/wic/partition.py", line 185, in prepare
|     plugin.do_prepare_partition(self, srcparams_dict, creator,
|   File "/work/layers/poky/scripts/lib/wic/plugins/source/rawcopy.py", line 95, in do_prepare_partition
|     sparse_copy(src, dst)
|   File "/work/layers/poky/scripts/lib/wic/filemap.py", line 539, in sparse_copy
|     for first, last in fmap.get_mapped_ranges(0, fmap.blocks_cnt):
| RuntimeError: generator raised StopIteration
| WARNING: exit code 1 from a shell command.
| + bb_sh_exit_handler
| + ret=1
| + [ 1 != 0 ]
| + echo WARNING: exit code 1 from a shell command.
| + exit 1
ERROR: Task (/build/../work/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_sdimg) failed with exit code '1'

The files to be flashed as named in the generated wks file exist.

Do you have any hint what’s wrong here?

Hi @annalenamarx,

Sorry to hear you’re having problems with the integration. Not sure if it helps in your specific situation, but here are some ideas:

  • the most common problem in the do_image_sdimg task is the u-boot.env file not being created
  • this points at the u-boot patches not being applied properly, specifically this one
  • check if the MENDER_UBOOT_AUTO_CONFIGURE flag is set accordingly: “0” if you maintain a custom patch set, “1” if you want to use the generic one
  • check if mender-uboot is set in MENDER_FEATURES_ENABLE"
  • if the BSP in question adds additional “magic” to the u-boot build process, make sure it does not conflict and the patches are applied cleanly. If in doubt, inspect the resulting source directory. Under some circumstances, layer priorities or ordering seem to have negative effects here.

Hope this helps, let me know if I can do something else!
Josef

Hi @TheYoctoJester

it was caused by another layer with higher priority which interferred with meta-mender.

Best,
Anna

1 Like