TIL - Buildroot and LIBFOO_LINUX_CONFIG_FIXUPS
TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post
Some applications in a Linux system depends on certain kernel features to work properly. I'm currently working on adding support for CRIU [1] in Buildroot [2] which has such requirements.
That's when I stumble upon the LIBFOO_LINUX_CONFIG_FIXUP variable.
LIBFOO_LINUX_CONFIG_FIXUPS
As the documentation [3] says:
* +LIBFOO_LINUX_CONFIG_FIXUPS+ lists the Linux kernel configuration options that are needed to build and use this package, and without which the package is fundamentally broken. This shall be a set of calls to one of the kconfig tweaking option: `KCONFIG_ENABLE_OPT`, `KCONFIG_DISABLE_OPT`, or `KCONFIG_SET_OPT`. This is seldom used, as package usually have no strict requirements on the kernel options.
This is a variable to tweak the kernel configuration from the package itself. In my case I had to:
define CRIU_LINUX_CONFIG_FIXUPS $(call KCONFIG_ENABLE_OPT,CONFIG_CHECKPOINT_RESTORE) endef
To enable CONFIG_CHECKPOINT_RESTORE upon package selection.