Configuration and compiling the kernel.

Carlo Wood carlo at alinoe.com
Sun Mar 22 14:53:39 UTC 2020


Hello everyone.

I've spent the last three days trying to figure this out on my own,
but https://wiki.ubuntu.com/Kernel/ is not sufficient.

I subscribed here in the hope to get some pointers on how to
compile my own kernel. The reason I need to do this is to find
a (the) bug in the xhci_hcd module that leads to

[150644.678555] xhci_hcd 0000:08:00.0: xHCI host not responding to stop endpoint command.
[150644.679748] xhci_hcd 0000:08:00.0: xHCI host controller not responding, assume dead
[150644.679756] xhci_hcd 0000:08:00.0: HC died; cleaning up

This bug has existed for a very long time and many people
are suffering from it.

Hopefully someone here can help me with the following questions:

1) Which repository should I be using for kernel 5.5.11 (lastest stable)?
 
It turned out to be impossible to find a git repository by 'ubuntu'
featuring the latest kernel. It seems ubuntu stopped at 5.3/4. I tried
a LOT of ubuntu git repositories, but none had tags beyond v5.4.
The only thing related to ubuntu that I could find (when looking for
5.5.9 still) was: https://green666.xyz/v5.5.9/
Which says to use
git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack
tag v5.5.9. But it does not HAVE that tag?!
Moreover, after a while I found out that the listed git sha1 is simply
that of the mainline kernel.

So, what I eventually did is:

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
$ git checkout -b xhci_test v5.5.9
$ git am ../linux-stable-patches/????-*

where ../linux-stable-patches contains the five patches
listed on https://green666.xyz/v5.5.9/.

Note that also git://kernel.ubuntu.com/virgin/linux.git does not contain
a tag over v5.4 (or maybe it contained v5.3, v5.4 and v5.5 - but not
v5.5.x). See also https://people.canonical.com/~kernel/info/kernel-version-map.html

2) How to (re)configure the kernel?

debian.master/config/amd64 contains config.common.amd64,
config.flavour.generic and config.flavour.lowlatency.

What command should I run normally to change these?

3) How can I compile a single flavour?

To save time it would be nice if I could just compile
what I need: amd64, flavour lowlatency, but with a few
custom config changes. Should I create my own flavour file?

What is the command to compile that kernel and create
all the necessary .deb files for it? From what I understand(?)
it would be:

$ fakeroot debian/rules clean
$ DEB_BUILD_OPTIONS=parallel=8 AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules custom-binary-myflavour

after copying debian.master/config/amd64/config.flavour.lowlatency
to debian/binary-custom.d and making my custom changes (according
to https://help.ubuntu.com/community/Kernel/Compile).

But debian/binary-custom.d doesn't exist?! Neither does debian.master/*custom*


Any help is much appreciated!
Carlo Wood



More information about the kernel-team mailing list