Skip to content

Document Linux kernel configuration options #50

@fhunleth

Description

@fhunleth

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions