-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Switch to managing the Linux kernel configuration by fragments #250
Comments
So this essentially becomes more of an organizational change? |
I think we'll have to play around with it to see what granularity is right. The change being proposed is only to delete
Then update the If you as a user want to change the Linux configuration, you still have to fork the system like before. Instead of running This is a much more manual way of handling Linux configurations. The hope, though, is that it makes it a whole lot easier to figure out why options are enabled and maintain systems long term. |
Just to add some context, I want to note that the discussion was spurred by me complaining about the process we use at my company for maintaining our custom Nerves systems. This could easily be a ME problem - maybe we just don't upgrade often enough, or maybe we should follow another process. So here's what we do:
A lot of this comes down to how the linux-*.defconfig file contains both explicit changes and implicit changes, and no clean corollary between them. Was CONFIG_FOO enabled because it is a dependency of CONFIG_BAR? Or for some other feature? Or was it automatically selected when CONFIG_BAZ was enabled? In the end, in order to be feel confident about the merge, we usually perform manual testing on as many different hardware configurations as we have laying around. This can be pretty time consuming. @fhunleth mentioned kernel config fragments, and I think they look interesting. I think in our case, my company would benefit from putting all our own changes in a fragment, and leaving the linux-.defconfig file alone. Whether the linux-.defconfig file should also be split into fragments, I am not sure. How disruptive would such a change be to other users? Will this make it easier for you to maintain the official systems? The main advantage I see of fragments is that you only have to specify the changes you need - all the other modules which are automatically selected/unselected is not specified. So the intent becomes much clearer. Also, because the tooling doesn't manage the fragment files, it's easy to group a set of modules inside a fragment file and say "These all have to be enabled/disabled in order to run XYZ". This also leads to the main drawbacks:
|
I finally took some time to experiment with kernel fragments. I'm working from the perspective of a downstream system maintainer, who just needs to add a few things to the official Nerves systems. In this commit you can see how I added a fragment file. When running
When browsing around in the menuconfig window, I can see that the fragment has been applied (it has I then built some firmware based on this system and booted an RPi 0W. This is the resulting config (taken from /proc/config.gz): https://gist.github.com/trarbr/42690130150d246e6754f6fa2fee6ccc By skimming through the config file, it seems it has been applied on top of the I have continued to play around with fragments to learn more of how they work. For example, what if we want to use several fragments?
Fragments are applied in the order they are listed. If using globs, then they are applied alphabetically. Changes in later fragments can override changes in earlier fragments. In this case, a notice will be printed when the fragments are merged. It looks something like this:
I would like to find a way to merge the fragments into the base config without running |
This discussion was started on Slack.
From @trarbr:
As mentioned later, this breaks
make linux-update-defconfig
. On the other side, it also makes it possible to have comments and be very clear where Linux options come from - are they Nerves related, VintageNet support, etc?The text was updated successfully, but these errors were encountered: