2

I used to find the steps on this Ubuntu Wiki page quite useful, especially the bottom section. The instructions on building an upstream kernel (i.e. a kernel from git.kernel.org) with an overlay directory, as instructed on that page, have previously helped me in making a new kernel that was compatible with my Ubuntu installation.

However, it seems these instructions have grown out of date in a few ways:

  • There is no longer a /usr/share/kernel-package directory by default, and the ubuntu package that used to install this directory (kernel-package) seems to have reached the end of its life with Ubuntu Focal - it's not there in the list of Groovy packages.
  • The ubuntu-groovy repository does not have files debian/control-scripts/{postinst,postrm,preinst,prerm}
  • make-kpkg, the command, seems to have disappeared, and I can't easily trace what is to be used in its place.

So... are there new instructions available somewhere? I would like to compile a new kernel to get kernel support for my Wifi card, which I've been using an unofficial driver for all this while, not that it matters all that much why I need a new kernel.

Also, I'm aware of AskUbuntu's norms against questions about using a custom kernel, but this question instead pertains to compiling a new kernel and should be on-topic.

airbornemihir
  • 73
  • 1
  • 10
  • 1
    FYI: to me the question is also about the wiki page (I'd have used the wiki tag); I note though the last change made to the wiki page was because of an issue compiling 5.12 kernel this month so at least some consider it *up to date* (maybe it assumes knowledge you don't have which still means it needs improving) – guiverc Mar 29 '21 at 01:28
  • I just steal the Ubuntu kernel configuration and don't use that section. I don't know if that would solve your issue or not. See [here](https://askubuntu.com/questions/718381/how-to-compile-and-install-custom-mainline-kernel/718662#718662), which was updated earlier this month also, for the newer requirements. – Doug Smythies Mar 29 '21 at 14:14
  • @DougSmythies thanks, that was very pertinent! I built the kernel as you suggested, getting rid of the weird certificate-related option as you suggested for this kernel, v5.12-rc5, after one build failure on that account. However, I still have the original problem I had - somehow the new kernel supports neither my wifi card nor my touchpad. Perhaps figuring out why that is happening is beyond the scope of AskUbuntu - custom kernel-related questions get ignored or removed all the time. – airbornemihir Mar 30 '21 at 02:05
  • Don't you have the patch that adds your required unofficial driver? Or does that somehow occur with the overlay stuff? – Doug Smythies Mar 30 '21 at 03:02
  • @DougSmythies You know what, I think you pointed me in the right direction. I was using `make olddefconfig` and that was somehow de-configuring my touchpad and my wifi card. I went into the config file and added every RTW and HID option I could see - that fixed it and I'm broadcasting right now from my new kernel. Thanks! – airbornemihir Mar 30 '21 at 05:06
  • Awesome. thanks for reporting back. – Doug Smythies Mar 30 '21 at 06:05

1 Answers1

1

As suggested by @DougSmythies in this very helpful answer, it's OK to skip the overlay directory stuff which is what I did. I paid a little more attention to configuration options, including scripts/config --set-str SYSTEM_TRUSTED_KEYS "" and got a new kernel that addressed my needs in terms of drivers.

airbornemihir
  • 73
  • 1
  • 10