Skip to contentSkip to conversation

Issue including kernel sources in DEBUGFS image

DISCUSSION Shoham Zarfati 1 participant 1 message Apr 2, 2025

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to include the kernel sources in the debug image generated when using IMAGE_GEN_DEBUGFS.

The issue is easily reproducible,
I followed the Yocto Project Quick Build guide I checked out the scarthgap branch and built core-image-minimal. After successfully building the image, I added the following to my local.conf file:

```
IMAGE_GEN_DEBUGFS = "1"
IMAGE_FSTYPE_DEBUGFS = "tar.gz"
```

This works perfectly and produces the separate "-dbg" tar.gz files in the deploy directory. The problem occurs when I add the following line to my local.conf file:

```
IMAGE_INSTALL_DEBUGFS:append = " kernel-devsrc"
```

This results in the following error:

```
ERROR: core-image-minimal-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed, details in /home/ubuntu/dev/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/temp/log.do_rootfs
ERROR: Logfile of failure stored in: /home/ubuntu/dev/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/temp/log.do_rootfs.2994391
ERROR: Task (/home/ubuntu/dev/poky/meta/recipes-core/images/core-image-minimal.bb:do_rootfs) failed with exit code '1'
```

The update_gio_module_cache seems to be called as part of glib-2.0's postinst script, which is created through this https://web.git.yoctoproject.org/poky/tree/meta/classes-recipe/gio-module-cache.bbclass?h=scarthgap bbclass being inherited in the glib-2.0 recipe.

The problem itself appears to be that gio-querymodules is not installed in the rootfs, but in rootfs-dbg, and the D variable points to the rootfs directory when executing the postinst script. I'm unsure how I should proceed from here.

Any help would be greatly appreciated.