Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1066  / 2 Years ago, sat, july 23, 2022, 7:06:56

I am trying to rebuild the 20.04 HWE kernel 5.8 since I need to change one config option. I am trying to guess my way through this since most of the info on rebuilding kernels on Ubuntu seems to be antiquated.


What I do:


apt source linux-image-generic-hwe-20.04
cd linux-meta-hwe-5.8-5.8.0.40.45~20.04.25/
fakeroot debian/rules clean
fakeroot debian/rules binary

This eventually fails:


dh_gencontrol -a -- -Vkernel-version=5.8.0 -Vkernel-abi-version=5.8.0-40 -Vdkms:zfs-modules="zfs-modules (= )," -Vdkms:virtualbox-guest-modules="virtualbox-guest-modules (= 5.8.0-40)," -Vdkms:wireguard-linux-compat-modules="wireguard-modules (= 1.0.0),"
dpkg-gencontrol: warning: can't parse dependency zfs-modules (= )
dpkg-gencontrol: warning: can't parse dependency zfs-modules (= )
dpkg-gencontrol: error: error occurred while parsing Provides field: zfs-modules (= ), virtualbox-guest-modules (= 5.8.0-40), wireguard-modules (= 1.0.0),
dh_gencontrol: error: dpkg-gencontrol -plinux-image-generic-hwe-20.04 -ldebian/changelog -Tdebian/linux-image-generic-hwe-20.04.substvars -Pdebian/linux-image-generic-hwe-20.04 -UMulti-Arch -Vkernel-version=5.8.0 -Vkernel-abi-version=5.8.0-40 "-Vdkms:zfs-modules=zfs-modules (= )," "-Vdkms:virtualbox-guest-modules=virtualbox-guest-modules (= 5.8.0-40)," "-Vdkms:wireguard-linux-compat-modules=wireguard-modules (= 1.0.0)," returned exit code 255
dh_gencontrol: error: Aborting due to earlier error
make: *** [debian/rules:101: binary-arch] Error 2

I don't care about vbox or ZFS so I am happy to disable those somehow, and wireguard is part of 5.8.


I have successfully rebuilt the standard 5.4 Ubuntu kernel, so this is a specific HWE issue.


Thanks for any help!


More From » 20.04

 Answers
0

  1. Clone the repo:


     git clone git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/focal


  2. Checkout the branch:


     cd focal
    git checkout origin/hwe-5.8



If you want to disable the nvidia driver, add this patch:


diff --git a/debian/rules b/debian/rules
index 8c3c71a..8742713 100755
--- a/debian/rules
+++ b/debian/rules
@@ -100,6 +100,8 @@ ifeq ($(do_mainline_build),true)
skipretpoline=true
endif

+do_dkms_nvidia=false
+
# Disable tools build and packaging if do_tools != true
ifneq ($(do_tools),true)
do_linux_tools=


  1. Install the build dependencies:


     sudo apt-get build-dep linux


  2. Build the kernel:


     fakeroot debian/rules clean
    fakeroot debian/rules binary-headers binary-generic



[#2020] Monday, July 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ugeeport

Total Points: 181
Total Questions: 108
Total Answers: 99

Location: El Salvador
Member since Tue, Jun 29, 2021
3 Years ago
;