Comments (3)
Hi @redbilledpanda ,
Thanks for writing..
It's peculiar that you're running into issues with a stable 5.4 kernel.
Could you try simplifying: download a stable kernel source tree from kernel.org (f.e. the latest 5.10 LTS as of now
is 5.10.169; here:
https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.10.169.tar.xz
).
Build it via the usual steps as shown in the book.
Am working on the 2nd edition; here's a simple wrapper script to build the kernel:
https://github.com/PacktPublishing/Linux-Kernel-Programming_2E/blob/main/ch2/kbuild.sh
HTH! Lemme know..
from linux-kernel-programming.
Hello @kaiwan
IMHO, the kernel build process is so tightly coupled with the underlying build infrastructure that certain things are taken for granted. Problems like the ones I mentioned above arise when we try do go against the established norm, like using a recent build system to compile a relatively older kernel. I am actually a bit aghast at the huge amount of complexity that has gone into the build process itself vis-a-vis getting the configuration just right enough to build and boot. For instance, building the 5.10.169 version of the kernel on my machine gives this error:
make[1]: *** No rule to make target 'debian/canonical-revoked-certs.pem', needed by 'certs/x509_revocation_list'. Stop.
make[1]: *** Waiting for unfinished jobs....
As this post mentions, I could actually disable the whole key related shebang or else I would have to actually install a certificate that the kernel build process recognizes.
So I went with the second option of installing certfificates, taking help from the above link. After that, I was able to finally boot into this kernel, sigh! By the way, how is it that even with this new kernel, the existing window manager (LXDE in my case) starts without any issue as if nothing happened? Can we say that the window manager startup daemon (it has to be a daemon after all right?) is abstracted from the rootfs layout process? If not how to explain it?
Anyways, thanks for being so responsive and prompt and for writing such a detailed book. After ULK and LKD which are great but way too old now, this will be my go to book. Additionally, it's good to know that a second edition is also on the cards! I hope it'll be coming out soon and be available on Safari (the learning platform).
from linux-kernel-programming.
Hello @kaiwan
IMHO, the kernel build process is so tightly coupled with the underlying build infrastructure that certain things are taken for granted. Problems like the ones I mentioned above arise when we try do go against the established norm, like using a recent build system to compile a relatively older kernel. I am actually a bit aghast at the huge amount of complexity that has gone into the build process itself vis-a-vis getting the configuration just right enough to build and boot.
Hm, yeah... we have to take the good with the bad..
For instance, building the 5.10.169 version of the kernel on my machine gives this error:
make[1]: *** No rule to make target 'debian/canonical-revoked-certs.pem', needed by 'certs/x509_revocation_list'. Stop. make[1]: *** Waiting for unfinished jobs....
As this post mentions, I could actually disable the whole key related shebang or else I would have to actually install a certificate that the kernel build process recognizes.
Yes.. my helper script simply disables it...
So I went with the second option of installing certfificates, taking help from the above link. After that, I was able to finally boot into this kernel, sigh!
Nice!
By the way, how is it that even with this new kernel, the existing window manager (LXDE in my case) starts without any issue as if nothing happened? Can we say that the window manager startup daemon (it has to be a daemon after all right?) is abstracted from the rootfs layout process? If not how to explain it?
It's just this- the kernel has very loose coupling with the rootfs; thus, it simply works.. things break when you use a very old rootfs with newer kernels (>=3.x) or vice-versa..
Anyways, thanks for being so responsive and prompt and for writing such a detailed book. After ULK and LKD which are great but way too old now, this will be my go to book.
Thanks you!
Additionally, it's good to know that a second edition is also on the cards! I hope it'll be coming out soon and be available on Safari (the learning platform).
Well, it'll be available on the Packt platform at least...
Thanks for writing in, and the very best with kernel adventures :-)
from linux-kernel-programming.
Related Issues (13)
- Not all recommended packages available in Ubuntu 18.04 LTS repos HOT 1
- Is it safe to iterate task list without any lock? HOT 1
- ch6: viewing userspace stack for bash using gdb HOT 1
- Some typos in this book. HOT 1
- p26: "sudo apt install git fakeroot...": utillinux -> util-linux HOT 1
- is it compatible to use your first edition in ubunut 22.04 HOT 2
- Book Translation HOT 2
- Possible free_pages() issue in sample code (book text example code is correct) HOT 2
- Possible memory leak in ch12 mutex/spinlock examples HOT 1
- Fix for 5.7+ Linux kernel and example code for ch13 percpu_var.c HOT 3
- Missing sample code of Part 2 HOT 1
- Ch 10 Question 8 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux-kernel-programming.