Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Linux kernel configuration options #50

Open
fhunleth opened this issue May 5, 2018 · 2 comments
Open

Document Linux kernel configuration options #50

fhunleth opened this issue May 5, 2018 · 2 comments

Comments

@fhunleth
Copy link
Member

fhunleth commented May 5, 2018

Background

Each Nerves system includes a default configuration of the Linux kernel. In the case of the Raspberry Pi's kernel, we take the official Raspbian Linux kernel configuration and modify it to add features that Nerves requires (like compiled-in support for SquashFS) and remove uncommon features. The main features removed are tons of kernel modules for the 1000s of devices that could theoretically be attached to a computer. This saves significant compilation time and runtime image size. Choosing what features to enable is not well documented. Each time there's a new Linux kernel release, it's necessary to repeat the subsetting process. Enough config options change between kernel versions that it's not a trivial process.

An additional issue is that the tracked kernel configuration files, the nerves_defconfig files, only contain non-default settings. Comments and default selections are regularly filtered out when make linux-update-defconfig is run. A problematic aspect of this is when a config option depends on another, that latter one isn't saved in the config file. If someone naively edits the nerves_defconfig to disable an option, they could disable another option unwittingly and not notice it for a long time.

Need

At a minimum, we need documentation for what kernel options we need enabled and disabled and why. The why part is extremely important since it is near impossible to know what the ramifications of disabling some kernel options are and what packages they affect.

What we have

When in the Nerves system shell or when manually building the system from Linux, you can run make linux-update-defconfig or make linux-update-config to save the configuration defaults or all configuration settings. Configuration help is available via make linux-menuconfig. It may not be too hard to write our own Kconfig parser to extract descriptions and dependencies in support of better documentation, but I'm not sure if that's really needed.

I started writing up the changes I made to convert the Raspbian kernel config to a Nerves one with the 4.9 work, but it got unwieldy.

@jjcarstens
Copy link
Member

Where have we landed on this request? I'm guessing we might want to abandon documenting all for now and maybe try to make a doc that outlines what is completely necessary?

@jjcarstens
Copy link
Member

Relates to #250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants