01-30-2022, 05:06 PM
Hi all. I'm trying to compile and boot a custom kernel on my PineBook Pro. Trying to add some printk instrumentation to troubleshoot a type C hotplug issue I'm having, but I'm getting stuck even getting the kernel to boot at all. I don't want to outright replace my stock kernel, I just want to be able to pick the kernel I want at boot time. Ideally I would want to stick to the principle of a 100% free software (or close to it) process, and using a second computer with a serial cable is not attractive to me.
I am reluctant to try any option that makes my custom kernel the default, unless I also have a working boot menu that lets me pick the stock kernel.
I am using the manjaro OS that came preinstalled, fully updated. I am using the default partition map and bootloader.
I have tried editing my /boot/extlinux/extlinux.conf to look like this:
This doesn't seem to do anything, just boots right into the stock kernel. I also tried spamming control-C or the arrow keys at boot time, this made no difference, no menu shows up. As I mentioned earlier I am reluctant to change the DEFAULT setting since it might make the system unbootable.
I have also tried using the kexec method. I wrote this script:
It's hard to tell what the hardware is doing on a fanless system, but it appears to just power off the computer when I run the script. Then, when I power it on, I just get a blank screen. I can then hard reset and power it on again, and it boots back into the stock kernel.
I found some prior forum threads on this subject, but it looks like the situation is evolving rapidly and the info there might not be up to date.
I am reluctant to try any option that makes my custom kernel the default, unless I also have a working boot menu that lets me pick the stock kernel.
I am using the manjaro OS that came preinstalled, fully updated. I am using the default partition map and bootloader.
I have tried editing my /boot/extlinux/extlinux.conf to look like this:
Code:
Timeout 10
DEFAULT Manjaro ARM
MENU TITLE pick a kernel
LABEL Manjaro ARM
KERNEL /Image
FDT /dtbs/rockchip/rk3399-pinebook-pro.dtb
APPEND initrd=/initramfs-linux.img console=tty1 console=ttyS2,1500000 root=LABEL=ROOT_MNJRO rw rootwait video=eDP-1:1920x1080@60 video=HDMI-A-1:1920x1080@60 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash
LABEL CUSTOM INSTRUMENTATION
KERNEL /vmlinux-5.17.0-rc1-CUSTOM_INSTRUMENTATION+
FDT /dtbs/rockchip/rk3399-pinebook-pro.dtb
APPEND initrd=/initramfs-custom-instrumentation.img console=tty1 console=ttyS2,1500000 root=LABEL=ROOT_MNJRO rw rootwait video=eDP-1:1920x1080@60 video=HDMI-A-1:1920x1080@60 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash
I have also tried using the kexec method. I wrote this script:
Code:
#! /bin/sh
sudo kexec -l /boot/vmlinux-5.17.0-rc1-CUSTOM_INSTRUMENTATION+ --initrd=/boot/initramfs-custom-instrumentation.img --reuse-cmdline
# I tried both of these versions:
#sudo systemctl kexec
sudo kexec -e
I found some prior forum threads on this subject, but it looks like the situation is evolving rapidly and the info there might not be up to date.
- https://forum.pine64.org/showthread.php?tid=10568
- https://forum.pine64.org/showthread.php?tid=9312
- https://forum.pine64.org/showthread.php?tid=9627 (this is where I found the kexec suggestion)
- https://forum.pine64.org/showthread.php?tid=10694 (some kind of development effort happening with U-Boot, but it's a 9 page thread with no consise summary, and it's not clear whether any of this is upstreamed anywhere or what the current state of it is, and some reports of people bricking their firmware make me nervous. Last post was a year ago, so maybe the situation has changed since then.)