lisa._kmod: Add a from_proc_config() kernel tree loader
FEATURE from_sysfs_headers() uses both /proc/config.gz and /sys/kernel/kheaders.tar.xz to patch the user-provided tree. If that results in a build failure, the fallback is from_user_tree() that just asssumes the tree is ready. If the tree is almost ready but the config is wrong, the module build using from_user_tree() might error if e.g. a config option such as CONFIG_SCHED_AUTOGROUP is enabled in the .config but not on the board, leading to trying to access to a non-existant struct member that will still be defined from BTF blob. Instead of falling back to from_user_tree() straight away, fall back first to from_proc_config() that will use /proc/config.gz, which is very likely to be successful and has much higher chances of producing a working module.
Loading
Please register or sign in to comment