You are not logged in.

#1 2019-03-14 03:46:34

xuanrui
Member
Registered: 2018-09-27
Posts: 47

Reconfiguring a custom kernel package

For a month or so, I have been using the Clear Linux kernel (linux-clear) and I like it a lot. However, every time I recompile the kernel, I have to tweak the configurations a bit because of various reasons (e.g. I prefer to use AppArmor but the default linux-clear configuration does not enable AppArmor).

Up until now, I have completed the reconfigurations by hand using nconfig, but this is getting tedious as I have to do it every time. I would rather put those into a file and have the process be automated. I'm however unsure about the tools that best serve the purpose:

1. use merge_config.sh and put my custom settings in a fragment file. This looks like the best solution, and I'd prefer to use an officially provided tool, but merge_config.sh is not well documented and I'm afraid it has some caveats (e.g., do I have to use "make olddefconfig" in my PKGBUILD instead of "make oldconfig"?)

2. "sed" or "patch". This seems hacky but would get the job done.

3. ...other potential solutions?

Offline

#2 2019-03-22 06:24:44

nixawk
Member
Registered: 2015-01-23
Posts: 7

Re: Reconfiguring a custom kernel package

Try to backup your .config. Archlinux gives you a perfer config.

~/Projects/kernelbuild/linux-5.0.3 ➭  zcat /proc/config.gz > .config

- https://wiki.archlinux.org/index.php/Ke … figuration


Thanks for sharing.

Offline

#3 2019-03-22 12:42:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Reconfiguring a custom kernel package

xuanrui wrote:

2. "sed" or "patch". This seems hacky but would get the job done.

What is 'hacky' about that.  This is precisely the kind of task that these tools are for.  Use them.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2019-03-28 13:53:56

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: Reconfiguring a custom kernel package

xuanrui wrote:

However, every time I recompile the kernel, I have to tweak the configurations a bit because of various reasons

If you are recompiling your own kernel, can you not copy your previously modified/used .config file into the top level kernel directory and use "make oldconfig"?

Offline

Board footer

Powered by FluxBB