Compiling Debug Kernel

Ask questions about Arch Linux ARM. Please search before making a new topic.

Compiling Debug Kernel

Postby andrewboring » Sun Jul 01, 2018 4:07 pm

I'm compiling a debug kernel by following the info here:
https://wiki.archlinux.org/index.php/Kdump
https://wiki.archlinux.org/index.php/Ke ... ild_System

I've modified the instructions above according to some of the info here:
viewtopic.php?f=23&t=6565

I created a $BUILD directory called "crashk", pulled the kernel source from github (PKGBUILDs for ALArm), copied the core/linux-raspberrypi to core/linux-rpi-kdump, edited config with the appropriate debug options, and changed the PKGBUILD file to use "pkgbase=linux-rpi-kdump". I also renamed linux-raspberrypi.install to linux-rpi-kdump.install to match.

Running updpkgsums and makepkg -s yielded the expected results (two packages called "linux-rpi-kdump-4.14.52-1-armv7h.pkg.tar.xz" and "linux-rpi-kdump-headers-4.14.52-1-armv7h.pkg.tar.xz"), but when I install them, it replaces the existing kernel and headers.

The Kernel/Arch_Build_System link above says:
If you renamed your kernel in the PKGBUILD pkgbase you may have to rename the initramfs.img in your $build/pkg/kernel/etc before installing with pacman. That way, you can have both the stock kernel and the custom one to choose from
.

I'm not sure why I would rename initramfs rather than the kernel7.img file that seems to be the actual kernel image, but regardless pacman -U overwrites the existing kernel. And I don't quite understand why I would rename the image after building the package, rather than as part of the package build (that is, if I need to distribute this to multiple RPIs, I should be able to copy only the package files and have it install everything as needed).

Is there a step I'm missing? Or maybe a specific packaging doc for Arch Linux Arm? I'm still a bit new to Arch and the RPi boot process.

I'd like to install a kdump kernel, but with the ability to select it when needed via boot loader configuration, rather than it be the only kernel.
andrewboring
 
Posts: 5
Joined: Wed Jun 20, 2018 5:07 pm

Return to User Questions

Who is online

Users browsing this forum: No registered users and 7 guests