reberhardt7 / cplayground

GNU General Public License v3.0
115 stars 14 forks source link

Rebuild kernel package with custom flavor name #37

Open glen3b opened 4 years ago

glen3b commented 4 years ago

Rebuild cplayground's patched kernel under a custom "flavour" name (e.g. generic, lowlatency) via the Debian build system (I used "cplayground"), thus affecting uname output to indicate the patched state. Fixes #19. There are no substantive changes in the new flavour, only the name, although files are created in which we could fairly trivially change e.g. kernel config parameters.

Uname output: Linux vagrant 5.3.0-62-cplayground #56~18.04.1 SMP Thu Jul 9 18:50:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Most of these steps are based on this AskUbuntu thread, using debian.hwe instead of debian.master because the latter had no effect in the source package I was using.

Troubleshooting and trying to understand the process brought me here, here, and here. (I post these links mostly for future travelers who may be trying to build custom flavour of Debian kernel, build custom flavour of Ubuntu kernel, modify Ubuntu kernel version string, modify Linux flavour, modify Linux version string, modify Linux uname output, etc etc.)

As happy as I am that this works, there are a few caveats with what I've uploaded / things I'm not happy with:

As an aside, a friend of mine who I've been talking to about this thinks that the kernel module's interface to the files_struct might be safely doable with only RCU locks, not needing the symbol exports which necessitate our patch. I'm not fully convinced, but this is something I will looking into, and if it pans out and we can avoid needing a custom kernel altogether, I assume that would be a good thing.