1

Someone on Reddit showed me this yesterday

https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git/commit/?h=next&id=9a966517a83090ee3e26e9a93a92523e2358c5b3

Looks like I should be able to change one line of code, and then I can achieve what I want, but this is going to require rebuilding the kernel

I haven't built a custom kernel in a long long time, and never on a deb based distro

I am following these instructions here

https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

I used apt and downloaded the kernel, changed the thunderbolt file and added the line of code

I get to “quicker build” fakeroot debian/rules binary-headers binary-generic binary-perarch

And the build fails, the error is

Debug: /home/nick/linux-oem-6.5-6.5.0/debian/stamps/stamp-install-generic kernel_file arch/x86/boot/bzImage kernfile arch/x86/boot/bzImage install_file vmlinuz instfile vmlinuz
dh_testdir
dh_prep -plinux-image-unsigned-6.5.0-1019-generic
dh_prep: error: Requested unknown package linux-image-unsigned-6.5.0-1019-generic via -p/--package, expected one of: linux-oem-6.5-headers-6.5.0-1019 linux-oem-6.5-tools-6.5.0-1019 linux-oem-6.5-tools-host linux-image-unsigned-6.5.0-1019-oem linux-modules-6.5.0-1019-oem linux-modules-extra-6.5.0-1019-oem linux-headers-6.5.0-1019-oem linux-oem-6.5-lib-rust-6.5.0-1019-oem linux-image-unsigned-6.5.0-1019-oem-dbgsym linux-tools-6.5.0-1019-oem linux-cloud-tools-6.5.0-1019-oem linux-buildinfo-6.5.0-1019-oem linux-modules-ipu6-6.5.0-1019-oem linux-modules-ivsc-6.5.0-1019-oem linux-modules-iwlwifi-6.5.0-1019-oem linux-modules-usbio-6.5.0-1019-oem
dh_prep: error: unknown option or error during option parsing; aborting
make: *** [debian/rules.d/2-binary-arch.mk:132: /home/nick/linux-oem-6.5-6.5.0/debian/stamps/stamp-install-generic] Error 255

If there's an easier way to achieve this, or if someone could help me with this, I would appreciate it.

Even if there’s another distro that I can install that will use that latest patch or will be easier to make kernel changes, I would be willing to do that too. I only need this temporarily to make thunderbolt nvm changes.

2 Answers 2

1

first install the mainline ppa

sudo apt-add-repository -y ppa:cappelikan/ppa

sudo apt update

sudo apt install mainline

then open it, Select a version of the Linux kernel that has the patch in it and click Install. Then restart


if you want a distro that has a up to date kernel you should think about rolling release distros, rolling release distros are distros that as soon as a update is available for a kernel it's available for you and its in the native repos some of the most common distros that offer that is arch(based) openSUSE Debian Unstable (also known by its codename "Sid"), if you want something familiar since you are using ubuntu, I would recommended debian unstable as it has the same architecture as ubuntu, both being based on debian and use apt so you can easily migrate to debian unstable, if you are feeling adventurous, you could go to arch and try it to get to know arch and it's packages

3
  • That's really cool, I installed Mainline -- Didn't know that existed. I was really into CentOS / RHEL back in the day, and then I stopped using Linux when IBM destroyed CentOS...Figured I would try Ubuntu. Unfortunately though, the newest kernel in Mainline doesn't have that latest patch, as it was posted just last week. I am going to give Arch a try though, perhaps that will just be quicker than figuring out how to build a custom kernel on Ubuntu Jammy.
    – NickK
    Commented Apr 13 at 21:47
  • I actually went and tried to build a different kernel version on Ubuntu, and this time the build script worked and didn’t error!
    – NickK
    Commented Apr 14 at 0:15
  • I figured it out. The instructions for the build command included “binary-generic” but I was trying to build the OEM kernel. Changed it to “binary-oem” and it works. The older one from yesterday was a -generic kernel. That’s why it worked.
    – NickK
    Commented Apr 14 at 23:42
0

The instructions use the “binary-generic” string but if you’re building the oem kernel you need to change that to binary-oem, or whatever other Ubuntu kernel you’re attempting to build.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .