k3dar / kumk Goto Github PK
View Code? Open in Web Editor NEWsimple Ubuntu Mainline Kernel manager...
License: GNU General Public License v3.0
simple Ubuntu Mainline Kernel manager...
License: GNU General Public License v3.0
I just needed to build a DKMS module for kernel 6.2.2, which needs to be installed via the hack on my system. The hack copies objtool and other helper binaries from kernel 5.11 for them to work with the older system glibc. However, building modules for the newer kernel makes use of many features of objtool the older one doesn't have.
I was seeking for a way to build and load the module and I've found one. Here's a guide. It seems to me it could be generalized to be automatically used by kumk, except for the custom glibc install. But I can imagine even that could become a part of kumk if there is will.
cd /tmp && wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/glibc_2.38.orig.tar.xz
mkdir /tmp/glibc && cd /tmp/glibc
tar -xvf /tmp/glibc_2.38.orig.tar.xz
mkdir build && cd build
../glibc-2.38/configure --prefix=/opt/glibc
make -j8
sudo make -j8 install
sudo apt install patchelf
sudo cp /usr/src/linux-headers-6.2.2-060202-generic/tools/objtool/objtool.orig{,.orig}
sudo cp /usr/src/linux-headers-6.2.2-060202-generic/tools/objtool/objtool{,.orig.old}
sudo cp /usr/src/linux-headers-6.2.2-060202-generic/tools/objtool/objtool{.orig,}
sudo patchelf --set-interpreter /opt/glibc/lib/ld-linux-x86-64.so.2 --set-rpath /opt/glibc /usr/src/linux-headers-6.2.2-060202-generic/tools/objtool/objtool
sudo cp /lib/x86_64-linux-gnu/libz.so.1 /usr/lib/x86_64-linux-gnu/libelf.so.1 /opt/glibc/lib/
sudo patchelf --set-rpath /opt/glibc /opt/glibc/lib/libelf.so.1
sudo patchelf --set-rpath /opt/glibc /opt/glibc/lib/libz.so.1
/usr/src/linux-headers-6.2.2-060202-generic/tools/objtool/objtool
--hacks
etc. while the old one has only commands check
and orc
.mkdir /tmp/gcc && cd /tmp/gcc
export GCC_VERSION=13
git clone -b releases/gcc-${GCC_VERSION} --depth 1 https://gcc.gnu.org/git/gcc.git gcc-source
mkdir build && cd build
sudo apt build-dep gcc-8 # this installs the build-time dependencies; we use an already installed version of gcc; if you're lucky, the dependencies of the newer version are the same
../gcc-source/configure --prefix=/usr --program-suffix=-${GCC_VERSION} --enable-languages=c,c++ --disable-multilib
make -j8
sudo make -j8 install
sudo dkms add -m r8152 -v 2.16.3
sudo dkms build -m r8152 -v 2.16.3
sudo dkms install -m r8152 -v 2.16.3
sudo dpkg-reconfigure linux-modules-6.2.2-060202-generic
https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.16/HEADER.html
For some reason, the kernel has been built twice and both versions are in the HEADER.html page. This breaks kumk. However, I'd treat it as a niche case and wouldn't spend time fixing that...
The mainline builds do not provide perf
, cpupower
etc. If you want them for an installed kernel, I use this script:
kernel_install_tools.sh 6.5.3
#!/bin/bash
ver="$1"
cd /tmp
mkdir "$ver"
cd "$ver"
git clone --depth=1 git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack -b cod/mainline/v"$ver" kernel
cd kernel
for tool in perf cpupower; do
make NO_LIBTRACEEVENT=1 DESTDIR=/usr/lib/linux-tools-${ver} -C tools/ ${tool} -j8 && sudo make NO_LIBTRACEEVENT=1 DESTDIR=/usr/lib/linux-tools-${ver} -C tools/ ${tool}_install -j8
done
Of course, many of the tools required some development libraries to be installed on your system. But once you have them, it should work for subsequent kernels out of the box.
Since a few days ago, it seems is no longer working. Error:
Seems to be related to the lack of ping to the kernel servers?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.