Apalis iMX8 Yocto Enable HIDRAW Support

I am trying to get an application running that requires HIDRAW support in the Linux kernel. I built the initial image for the Apalis iMX8 using the following instructions:


I am now trying to build the image with HIDRAW support. I tried to enable support bitbake linux-toradex -c menuconfig using the menuconfig tool. But after rebuilding the image and dd’ing it to an sd card, doing a gunzip -c /proc/config.gz | grep "HIDRAW" still shows that “CONFIG_HIDRAW” is not set.

I have also tried adding a *.cfg file into “sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-toradex” and a “SRC_URI_append” line for that file in “sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-toradex_4.9.%.bbappend”


Note that bitbake linux-toradex -c menuconfig is not something that makes your changes permanent.
So if bitbake later on decides that it needs to rerun the kernel configuration your changes will be lost.
So IMHO it is best to avoid this workflow.

Note that the yocto kernel’s “*.cfg” fragments are not used in the i.MX8 kernel recipe.

I would recommend to piggy-back on the do_copy_defconfig () task in the i.MX8 kernel recipe. One would delete a potential existing config before amending with whatever you need to have the options set to. E.g. append to that task as follows:

do_copy_defconfig_append () {
    sed -i "/CONFIG_HIDRAW[ =]/d" $config
    echo "CONFIG_HIDRAW=y" >> $config

    sed -i "/CONFIG_HIDRAW[ =]/d" $config
    echo "CONFIG_HIDRAW=y" >> $config


That did the trick, thanks!

Perfect that it works. Thanks for the feedback.