I'm trying to add fbtft kernel module as an external package in openwrt by copying all necessary files in /package/fbtft directory like this guy did
https://github.com/GBert/openwrt-misc/tree/master/fbtft
The problem is that fbtft is compiled using -DCONFIG_FB_DEFERRED_IO=1 . This define is used by some framebuffer structures like fb_info from fb.h. If CONFIG_FB_DEFERRED_IO is defined then the structure has a different size. Now linux frame buffer files like fbsysfs.c, which uses this fb_info strucure, are not compiled with this CONFIG_FB_DEFERRED_IO flag which causes fb_info to have a different size. Fbtft uses fbsysfs.c to allocate memory for fb_info structure but the size is different between the two because they are not compiled with the same flags.
I tried to add FB_BROADSHEET and FB_AUO_K190X (which depend on FB_DEFERRED_IO) from "make kernel_menuconfig" but fbsysfs.c and other framebuffer files are still not compiled with the required flag (i can see this by looking at .fbsysfs.o.cmd file). How can I add -DCONFIG_FB_DEFERRED_IO=1 flag at compile time for all linux framebuffer files so they all have the correct fb_info structure ?
Thanks