Skip to content
Commit 39bf18ef authored by Douglas Raillard's avatar Douglas Raillard
Browse files

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.
parent 7b2567b8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment