3 ms·
Mind. Officially. Blown. Sometimes the coincidental timeliness of things popping up on Hacker News is just weird. u ROCK deepseagirl! I've recently wanted
by gregfjohnson 3y ago
Mind. Officially. Blown. Sometimes the coincidental timeliness of things popping up on Hacker News is just weird. u ROCK deepseagirl!
I've recently wanted to start building Linux kernels and play with device drivers again. Wanted to build and then execute on top of QEMU. Downloaded, configured, and built Linux kernel 6.6 following recipes from arch and a few other places. Doing a reasonable .config was a painful process (picking what to include etc.) The kernel build took several hours. The resulting image refused to boot under Virtual Machine Manager, to say nothing of using gdb etc. to interactively debug the kernel.
So, I figured I was looking at a solid weekend of googling, stack-overflowing, swearing, reading kernel Documentation files etc. and finally getting everything set up and working happily.
NOT! The easylkb script did the entire thing completely automatically, culminating in a login prompt on a running virtual machine!! The Linux kernel .config was one of the standard ones I believe, but I hadn't yet found it. The complete kernel build took on the order of several minutes instead of several hours.
There were a couple of minor issues I had with easylkb, which I will share as comments on github.
- iam-TJ 3y agoIn the kernel source directory do: make help | less and the various config targets are listed; to use the default configuration (for the current host architecture) do: make defconfig To edit it further use one of the edit options such as menuconfig: make menuconfig All of these create/operate on ./.config in the source-code 'root' directory. This and much more is covered in https://kernelnewbies.org/KernelBuild https://kernelnewbies.org/KernelBuild
- rwmj 3y agoAnother useful tip is to grab an existing config, eg. the one for your current system found under /boot, rename it .config and then do 'make olddefconfig' (followed by building the kernel in the usual way). Distro kernels are normally quite "full fat" so this may tend to build a lot, but it's a good way to get a kernel which closely matches what you're typically running, both in terms of device coverage and compilation options / hardening.
- gregfjohnson 3y agoGreatly appreciate the suggestions and pointers! (Not sure how HN orders "reply's", but this is in response to other replys to my initial comment.)