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

Avoid modifying the kernel source code without customization.cfg change and with the same answer #906

Open
blackteahamburger opened this issue Mar 17, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@blackteahamburger
Copy link
Contributor

The current behavior (always re-clone git tree and re-apply patches) causes some kernel config options (like CONFIG_DEFAULT_HOSTNAME) to be overridden.

@blackteahamburger blackteahamburger changed the title Avoid modifying the kernel source code without customization.cfg change Avoid modifying the kernel source code without customization.cfg change and with the same answer Mar 17, 2024
@Tk-Glitch Tk-Glitch added the enhancement New feature or request label Mar 29, 2024
@AdelKS
Copy link
Collaborator

AdelKS commented Mar 30, 2024

I don't really understand the issue, people aren't supposed to build on a fresh copy of the sources ? Can't that example you give be included in a .myfrag file ?

@blackteahamburger
Copy link
Contributor Author

blackteahamburger commented Mar 30, 2024

For example:

CONFIG_DEFAULT_HOSTNAME
CONFIG_CONTEXT_TRACKING_USER
CONFIG_CONTEXT_TRACKING_USER_FORCE
CONFIG_NO_HZ
CONFIG_X86_AMD_PSTATE

will be overridden.

@AdelKS
Copy link
Collaborator

AdelKS commented Mar 30, 2024

  1. When you run the build script, accept the prompt when the script asks for e.g. make xconfig (near the end, right before it starts compiling)
  2. Do the changes you are showing in your previous message
  3. Accept saving those changes as foo.myfrag
  4. That frag file will be picked up everytime from then on. You can even make it be automatically picked up in the customization file

@AdelKS
Copy link
Collaborator

AdelKS commented May 12, 2024

Any news on this front ?

@anh0516
Copy link

anh0516 commented May 15, 2024

Iv'e also noticed that when supplying a custom .config with INIT_STACK_NONE it gets reset back to INIT_STACK_ALL_ZERO or when I set INIT_ON_ALLOC_DEFAULT_ON=n it gets set back to INIT_ON_ALLOC_DEFAULT_ON=y and I have to manually set them every time. I'm pretty sure this happens with some crypto/compression stuff as well. I just stopped using the script to build the kernel:

./install.sh config
cd linux-src-git
zcat /proc/config.gz > .config
I also take the opportunity to specify some extra KCFLAGS here:
KCFLAGS="-march=native -O3 -fno-semantic-interposition -pipe" LLVM=1 LLVM_IAS=1 make -j8
make -j8 install
make -j8 modules_install

I'm using Gentoo so I don't mind not packaging it.
This also makes it easier to test quick changes without rebuilding the entire kernel.

@blackteahamburger
Copy link
Contributor Author

  1. When you run the build script, accept the prompt when the script asks for e.g. make xconfig (near the end, right before it starts compiling)

    1. Do the changes you are showing in your previous message

    2. Accept saving those changes as foo.myfrag

    3. That frag file will be picked up everytime from then on. You can even make it be automatically picked up in the customization file

Not very convenient, it's better to be a default behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants