kernel-module-gpio compilation fails with Yocto 1.6.x

customers compiling gpio example and kernel module might see the following compilation failure:

CC [M]  /home/digi/workspace16/ccardimx28js/tmp/work/ccardimx28js-dey-linux-gnueabi/kernel-module-gpio/2.1-dey.r0/gpio.o
| /home/digi/workspace16/ccardimx28js/tmp/work/ccardimx28js-dey-linux-gnueabi/kernel-module-gpio/2.1-dey.r0/gpio.c:49:2: error: unknown field 'ioctl' specified in initializer
|   .ioctl  = gpio_ioctl,

The GPIO kernel module example builds only with kernel 2.6.35. The support for old ioctl system was removed around kernel 2.6.37 (and is not available in kernel 3.x).
If you need to compile the GPIO kernel module, you need to select kernel in:
PREFERRED_VERSION_linux-dey = ""
PREFERRED_VERSION_u-boot-dey = "2009.08"

bitbake kernel-module-gpio

To use the gpio samples in kernel 3.10, you need to use gpio sysfs support instead of ioctl():
without changing local.conf to kernel just use instead:
bitbake dey-examples-gpio-sysfs
Last updated: Jun 11, 2019

Filed Under


Recently Viewed

No recently viewed articles

Did you find this article helpful?