My image builds nicely with kernel 4.13 (set in local.conf) and all of my recipes.

When I try to add the iptables recipe (v1.6) to my image, the do_rootfs task fails with the following error:

ERROR: image-dev-0.7-r0 do_rootfs: 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>
 *** 0002:license_create_manifest(d)
File: '/home/yocto/sources/poky/meta/classes/license.bbclass', lineno: 48, function: license_create_manifest
     0044:    pkg_dic = {}
     0045:    for pkg in sorted(image_list_installed_packages(d)):
     0046:        pkg_info = os.path.join(d.getVar('PKGDATA_DIR'),
     0047:                                'runtime-reverse', pkg)
 *** 0048:        pkg_name = os.path.basename(os.readlink(pkg_info))
     0050:        pkg_dic[pkg_name] = oe.packagedata.read_pkgdatafile(pkg_info)
     0051:        if not "LICENSE" in pkg_dic[pkg_name].keys():
     0052:            pkg_lic_name = "LICENSE_" + pkg_name
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/media/yocto/build/tmp/pkgdata/machine/runtime-reverse/kernel-4.14.1-fslc+ga4f7f0ac8250'

ERROR: image-dev-0.7-r0 do_rootfs: Function failed: license_create_manifest
ERROR: Logfile of failure stored in: /media/yocto/build/tmp/work/machine-linux-gnueabi/image-dev/0.7-r0/temp/log.do_rootfs.49245
ERROR: Task (/home/yocto/sources/meta-mymeta/recipes-images/images/image-dev.bb:do_rootfs) failed with exit code '1'

When looking at the error and the logs, iptables wants to install the neccessary kernel-modules (good) but at version 4.14-fslc (bad). I don't even have an 4.14 kernel in my layers.

When I manually add the kernel-module-recipes to my image, the exact same thing happens.

So the question is: Why does my Yocto with 4.13 kernel builds and wants to install 4.14 kernel modules?

Thus the next question: How can I tell Yocto to build and install 4.13 kernel modules?

Update 1:

After further digging: Lets take module kernel-module-x-tables as an example. According to the error-log, it is build and used for 4.14. However, looking in the buildlog-files, kernel-module-x-tables is also build in 4.13, but this version is not used even through its not used.

Update 2:

I've updated our poky to the newest rocko release and upgraded the kernel to 4.19.13, image works fine without iptables. The error remains, but slightly changed. It again tries to install the 4.14 kernel-modules for some iptables modules, but now 4.14.24-stable. I found this kernel version in another meta-layer that we need.

However, it should install the 4.19.13 module, which is also build by yocto according to the build-log.

We really need a kernel above 4.16 due to other constraints. So unfortunately we cant just use 4.14.24.

  • 1
    can you post snippet of /media/yocto/build/tmp/work/machine-linux-gnueabi/image-dev/0.7-r0/temp/log.do_rootfs.49245 ? – Devidas Jan 2 at 10:28
  • 1
    i think there seems issue as the base dirs are differant base one /home/yocto and other build dir is in /media/yocto/build I don't know if you have specified build dir specifically in conf. if yes then ignore this commnet. – Devidas Jan 2 at 10:30
  • 1
    can you post place where you got iptables recipe. it seems to be culprit. and it will be helpful to understand the issue if you post the source location which is used. – Devidas Jan 2 at 10:31
  • @devidas I've set the DL_DIR, SSTATE_DIR, TMPDIR and DEPLOY_DIR to point to a very big storage HDD so it won't clog up my primary SSD, the iptables recipe is the official rocko recipe from github.com/openembedded/openembedded-core/blob/rocko/meta/… Logfile: pastebin.com/i4LE0RRu – bam Jan 2 at 12:14
  • 1
    thanks I will look into it. can you check your host machine has 4.14 if yes it is because of wrong make modules-install – Devidas Jan 3 at 6:59

It would appear the packages were not kept in sync at the upstream source. Your options are to find a source(outside of the current tree, I would provide a package option, but your post does not indicate a target platform) for the package compatible with 4.13, or update to 4.14 source.

Another option would be to revert your requirements of iptables to something prior to 1.6.

  • But how would a kernel module included in the kernel source not be in sync with the kernel? Looking upon the log, multiple iptables modules are build for the correct kernel, just a few are build for the wrong kernel. Our Target is an imx6dl board. – bam Jan 4 at 8:33
  • I updated my question with a new finding. The right version(4.14) is actually build by yocto and can be found in the build-folder, however, it still uses the wrong version. – bam Jan 4 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.