=== zyga-laptop is now known as zyga-holidays
=== cpaelzer__ is now known as cpaelzer
zx2c4apw: sigh16:02
ubot5Ubuntu bug 1856539 in wireguard (Ubuntu) "wireguard package doesn't work on ubuntu eon" [Undecided,New]16:02
zx2c4helping this guy involves walking him through rebuilding his dkms stuff (for whatever reason) and/or disabling secure boot16:02
zx2c4that really sucks16:03
zx2c4proper .ko cannot come soon enough :-)16:03
aberrantgood morning all17:42
aberrantI filed a bug (#1856603) just now and am wondering whether I could get some feedback on it - do I need to provide more info or is it good as-is?17:43
aberrantas an aside, if someone could step me through building a patched kernel, I'd appreciate it. The docs seem to be out of date.17:50
aberrantso, can someone please point me to the latest guide to compiling an ubuntu kernel (with an upstream patch)?22:01
aberranthttps://help.ubuntu.com/community/Kernel/Compile is a bit outdated, and https://wiki.ubuntu.com/KernelTeam/GitKernelBuild isn't specific to Ubuntu (and is also, I think, outdated)22:02
connor_kaberrant, Have you already cloned the git repository that corresponds to which Ubuntu kernel you'd like to apply the patch to?22:11
aberrantconnor_k: not yet. I started doing the "generic" instructions but figured that's probably not what I want.22:12
aberrantconnor_k: I'm on eoan22:12
aberrantconnor_k: should I just apt install linux-source-5.3.0 ?22:13
connor_kaberrant, I suppose you could, but I prefer to use the git repository: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/eoan22:13
aberrantah, ok22:13
aberrantthank you22:13
connor_kping me once that's cloned and I'll walk you through applying your patch and building the kernel :-)22:14
aberrantawesome! thanks.22:14
aberrantstill going. :)22:16
connor_kIt will probably take a few minutes :-) Do you already have the patch(es) you want to apply to it?22:16
aberrantyes. it's one line22:16
aberrantI hope this file is in the ubuntu kernel22:16
aberrantactually, it's like 10 lines. :)22:17
connor_kit looks like it is22:18
connor_kso on that page you linked, I clicked on the "patch" link and it'll take you here: http://git.infradead.org/nvme.git/patch/530436c45ef2e446c12538a400e465929a0b3ade?hp=400b6a7b13a3fd71cff087139ce45dd1e5fff44422:18
aberrantit's in drivers, though. Does this require a new kernel, or just a driver?22:18
aberrant"You merely need to compile a special driver. For this, you only need to install the linux-headers packages."22:19
aberrantfrom https://help.ubuntu.com/community/Kernel/Compile22:20
aberrantbut this is useful info anyway, so let's march forward.22:20
aberrantI'll be taking notes22:21
connor_kOof, lots of pressure for me to get it right then ha22:21
aberrantI can build this on a different system than the one I need it on as long as the architecture's the same, right?22:22
connor_kaberrant, yeah22:22
aberrantok, git clone finished22:22
connor_kif you right-click the "patch" link on the commit page you linked me to, click "save link as" or something to download the patch so you can have it handy22:22
connor_kor if you're ssh'ing onto a more powerful build machine then you can use a command line tool like "curl" or something: "curl http://git.infradead.org/nvme.git/patch/530436c45ef2e446c12538a400e465929a0b3ade?hp=400b6a7b13a3fd71cff087139ce45dd1e5fff444 > whatever-you-want-to-name-it.patch"22:24
aberrantyup, got it. It has the email header in there. is that a problem?22:25
connor_kno, git will ignore that when you apply it22:25
aberrantok, got it.22:25
aberrantcd to .../nvme/host and then patch < patch1.txt ?22:25
connor_kinside the "eoan" repo, if you run "git am ../path-to-that-patch-you-downloaded.patch" there's a chance it'll just fit in without any fuss22:25
aberrantoh, use git. wow.22:26
aberrantseth@hydrogen:~/kernel/eoan$ git am ~/patch1.txt22:26
aberrantApplying: nvme: Discard workaround for non-conformant devices22:26
aberrantdone :)22:26
aberrantlet me just confirm some of the changed lines are there22:26
aberrantyup, all good.22:27
aberrantso far you're on a roll :)22:27
connor_kSweet! One last thing I'd do before spending time compiling it is to make sure that config option is enabled for the Ubuntu kernel you want to compile22:29
aberrantok, where is that specified?22:29
aberrantor does make config take care of it?22:30
aberrant(I also need kvm support, just FYI)22:31
connor_kI looked in the folder where the code is that you patched (drivers/nvme/host) and saw the Kconfig specifies "NVME_CORE"22:31
connor_kI'd just run "git grep NVME_CORE debian.master"22:32
connor_kand I see in eoan: "debian.master/config/config.common.ubuntu:CONFIG_NVME_CORE=m"22:32
aberrantwhat's "m" mean?22:32
connor_kso it looks like it's built as a module (which isn't terribly surprising since NVME seems pretty important to have these days22:32
aberrantah, ok22:32
connor_kmodule just means that it can be loaded after the fact. Another value would be "y" which means it's built directly into the kernel image22:32
connor_ker, module => "m"22:33
connor_kso since the proper config is already set you could probably build the kernel22:33
aberrantwell, my boot drive is nvme, so22:33
aberrantno 'make config' ?22:33
aberrant(and what about KVM?)22:33
connor_kbefore doing that I'd edit the changelog "debian.master/changelog" and inside the parentheses: linux (5.3.0-blah) I'd change the number in the parentheses to be (5.3.0-blah+MyPatch) or something22:34
* connor_k can't type fast enough :-)22:34
aberrantlinux (5.3.0-24.26+nvme_patch) eoan; urgency=medium22:35
connor_kthat's just so you know you're running your test kernel when you run "uname -a"22:35
connor_kbut I think Eoan is also built with kvm support22:35
connor_kgit grep CONFIG_KVM debian.master/22:35
aberrantKVM worked out of the box with the iso install, so I think you're right22:35
connor_kOk. Looks like you're ready to put your CPU to work22:36
connor_kmake -j`nproc` bin-debpkg22:36
aberrantbasically I'd like the iso install kernel with this one patch :)22:36
connor_kat least I think that's the makefile target that produces the -image, -modules debian packages once it's all done22:36
aberrant*** Configuration file ".config" not found!22:37
aberrant*** Please run some configurator (e.g. "make oldconfig" or22:37
aberrant*** "make menuconfig" or "make xconfig").22:37
connor_koh woops, also I forgot at the very beginning22:37
connor_kcp /boot/config-`uname -r` .config22:37
connor_kthen "make oldconfig"22:37
aberrantconfig-5.3.0-24-generic ?22:37
connor_kif that's what shows up when you run `uname -r` yeah, probably22:38
aberrantoh, what packages do I need? it failed 'cause no flex22:38
aberrantsorry. I'm building inside a VM22:39
aberrantflex and bison so far22:39
connor_kin the eoan folder, if you open Documentation/Changes it has a list of packages22:39
aberrantI have gcc and g++22:39
connor_kprobably need bc, libssl-dev, libelf-dev, libncurses5-dev22:40
aberrantok, give me a minute :)22:40
aberrantwhere is mcelog?22:43
connor_ktry skipping that one, I don't remember ever having to install it to build the kernel. I think you can get away with build-essential (which has gcc, g++), make, libssl-dev, libelf-dev, flex, bison, bc22:44
aberrantmcelog was removed from Debian and in turn Ubuntu bionic due to "ROM; obsolete; no kernel support in testing". Please see https://launchpad.net/ubuntu/+source/mcelog/+publishinghistory or https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889741 for more details.22:45
ubot5Debian bug 889741 in ftp.debian.org "RM: mcelog -- ROM; obsolete; no kernel support in testing" [Normal,Open]22:45
sarnoldiirc mcelog has been mostly replaced by rasdaemon; I haven't had any MCEs on my own hardware (thankfully) to verify that it actually serves as a replacement22:46
aberrantok, what's after `make oldconfig` again?22:46
connor_kshould be good to go with: "make -j`nproc` bin-debpkg"22:46
aberrantgot it.22:47
connor_kand then take a break to have a snack, read a book, watch a film, or maybe overnight depending on that VM :-)22:47
aberrant6 procs off a 3400G22:47
connor_kthat make target will produce the kernel all packaged up, and you'll be interested in installing the one that has *image*.deb and *modules*.deb22:47
aberrantdo I run the make in debian-master/ ?22:47
connor_kno, in the top level directory of the eoan tree22:47
aberrantthe config was in the eoan root, right?22:47
connor_kyeah run it in the eoan root22:48
aberrantseth@hydrogen:~/kernel/eoan$ make -j6 bin-debpkg UPD     include/config/kernel.release22:48
aberrantmake[1]: *** No rule to make target 'bin-debpkg'.  Stop.22:48
aberrantchecking the makefile22:48
aberrantI can't find bin-debpkg as a target22:49
connor_khmm, weird... I suppose running: "fakeroot debian/rules binary" should compile the kernel and produce the same packages I was going for with the "bin-debpkg" thing22:51
aberranthow about `make all`?22:51
aberrantmake help shows that building vmlinux, modules, and bzImage22:52
connor_kyeah I suppose you could, I was just trying to go the route where it produces debian packages so you can uninstall the test kernel but I guess if it's a VM then you could go the route "make" "make modules_install" "make install" (but I don't know the right targets off the top of my head)22:52
aberrantnononon. I'm installing it ont he hypervisor22:52
aberrantso yeah, I'd like to be able to uninstall.22:52
aberrantI'm building on a vm, but installing on the HV22:52
aberrantseth@hydrogen:~/kernel/eoan$ fakeroot debian/rules binary22:53
aberrantDebug: prepare-indep22:53
aberrantdh_prep -i22:53
aberrant/bin/bash: dh_prep: command not found22:53
aberrantmake: *** [debian/rules.d/3-binary-indep.mk:172: prepare-indep] Error 12722:53
connor_kyeah i guess the way I'm most familiar with that should result in debian packages which are easily managed by dpkg or apt would be "fakeroot debian/rules binary"22:53
aberrantlet me try installing debhelper22:54
aberrantseth@hydrogen:~/kernel/eoan$ fakeroot debian/rules binary22:55
aberrantDebug: prepare-indep22:55
aberrantdh_prep -i22:55
aberrantdh_prep: "debian/control" not found. Are you sure you are in the correct directory?22:55
aberrantmake: *** [debian/rules.d/3-binary-indep.mk:172: prepare-indep] Error 25522:55
aberranttrying fakeroot debian/rules clean22:56
connor_kyeah that should generate it22:56
aberrantok. I'm following https://help.ubuntu.com/community/Kernel/Compile22:56
aberrantAUTOBUILD=1 fakeroot debian/rules binary-debs <--- does that look reasonable?22:57
connor_kdid "fakeroot debian/rules clean" followed by "fakeroot debian/rules binary" not start building it?22:57
aberrantI just did the clean so far22:57
aberrantshould I do binary or binary-debs?22:58
connor_kjust binary22:58
aberrantI also had to install kernel-wedge22:58
connor_knot woo!22:59
aberrantis there a way to `j6` this?22:59
aberrantor will it just be single-proc?22:59
aberrantchecking for libudev.h... no22:59
aberrantconfigure: error: Missing /usr/include/libudev.h22:59
connor_kHmm I'm sure there's a way to do an equivalent -j thing23:00
aberrantjust installed libudev-dev23:00
aberrantutils/helpers/amd.c:8:10: fatal error: pci/pci.h: No such file or directory23:01
aberrantcrap. what's going on here?23:01
aberrantlet me try a `make -j6 all` and see what happens.23:04
aberrantI can always distclean23:04
connor_kfrankly I'm still sad that the "make bin-debpkg" didn't work, and am wondering if I hallucinated all of my previous kernel builds23:05
aberrantThis is an obsolete now guide on how to build the Linux Kernel into a .deb package. Don't use this,23:06
aberrantwhat happens with a `make all` ?23:08
connor_kit'll just compile the kernel (but doesn't produce debian packages from it)23:08
aberrantmaybe the fakeroot will work if the binaries already exist23:09
aberrantfakeroot debian/rules binary-arch23:10
connor_kwell... i've done some soul searching and realized i've misled you. I said "make bin-debpkg" but really what I should have said was "make bindeb-pkg"23:11
aberrantok, should I stop this `make all`?23:12
connor_kyou can run "make bindeb-pkg" after the make all23:12
aberrantyou got it. Thank you for persevering here.23:13
connor_kbut DON'T run "make deb-pkg" make sure you run "make bindeb-pkg" because the one without the "bin" in the name executes a "make clean"23:13
aberrantyup, I took notes.23:13
aberrantwiki definitely needs an update :)23:13
connor_kcool :-) have fun kernel hacking!23:13
aberrantassuming this works.23:13
aberrantThank you very much. Hopefully this patch 1) works, and 2) gets into a mainstream kernel build.23:13
aberrantnasty bug.23:14
aberrantok, gonna let this crank. I'll be back to let you know outcome one way or another :)23:15
connor_ksounds good to me :-)23:17
aberrantthanks again, connor_k - greatly appreciated.23:18
connor_kno problem! happy to help23:19
aberrantjust to confirm, this will build 3 .deb packages, and I just copy those over to the hypervisor and do a dpkg -i on each?23:22
connor_kyou'll only need the ones that are -*image*.deb -*modules*.deb23:23
connor_kunless you're gonna compile DKMS packages on the kernel you're installing, in which case you'll want the -*headers*.deb too23:23
aberrantdunno what those are, so .. no.23:23
aberranthow do I uninstall if this gives me problems?23:23
aberrantwill dpkg -r do it?23:24
connor_kthere should be a version number in the *.deb name, I usually do "dpkg --get-selections | grep linux" and look for the linux-image package with the version number that's encoded in your deb name, then "apt remove THAT_PACKAGE"23:24
aberrantdoes that restore the old kernel?23:28
connor_kwhen you reboot after uninstalling, yeah it'll look for the newest kernel (which will be the one you were running before you installed your test kernel)23:29
aberrantah, right. Cool!23:29
aberrantstill building, so I'm headed home. Will check later. Thanks again.23:34
connor_kNp! have a good evening!23:34
aberrantwow, build just finished.23:38
aberrantmake -j6 bindeb-pkg now23:38

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!