Quantcast
Viewing all articles
Browse latest Browse all 4933

Beginners • Failing to boot on compiled kernel (Raspberry pi 4)

Hello, this is clearly a beginner question, I'm trying to compile a linux kernel for my raspberry pi 4 following the guide:https://www.raspberrypi.com/documentati ... the-kernel (the goal is to discover, modify and better understand how it work).

But I can't find a way to boot on it (I have the default rasp screen trying to boot on something, not even a black screen), to my understanding, with the kernel alone I should have at least a command prompt? I tried to add a minimal root filesystem (http://cdimage.ubuntu.com/ubuntu-base/releases/24.10/ but without success.
I also tried to compare with a flashable ubuntu https://ubuntu.com/download/raspberry-pi -> ubuntu-24.10-preinstalled-desktop-arm64+raspi.img.xz which work.
To compare and see what I was missing, but except from seeing that they were using a initramfs and a more "complex" bootloader, I do not have yet the technical knowledge to understand what could be wrong on my side (as I followed the tuto).

I will provide what i did will trying to not be verbose, can you help me understand what i'm missing / don't know please?

Branch on remote: rpi-6.6.y (is it working for rasp pi 4?)
KERNEL=kernel8
I'm cross-compiling and so using ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu for each make:
bcm2711_defconfig, then Image modules dtbs

I'm partioning my usb sd-card using fsck as follow:

Code:

- [b]Boot [/b]partition : Fat32 256MB, parameters used : o -> n -> p -> 1 -> default -> +256M -> t -> c- [b]Root [/b] parameters used :  n -> p -> 2 -> default -> default -> wsudo mkfs.fat -F32 /dev/sde1sudo mkfs.ext4 /dev/sde2
I mount the root and boot to my local mnt/root and boot folder

Code:

sudo env PATH=$PATH make -j12 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=mnt/root modules_installsudo cp arch/arm64/boot/Image mnt/boot/$KERNEL.imgsudo cp arch/arm64/boot/dts/broadcom/*.dtb mnt/boot/sudo mkdir -p mnt/boot/overlays/sudo cp arch/arm64/boot/dts/overlays/*.dtb* mnt/boot/overlays/sudo cp arch/arm64/boot/dts/overlays/README mnt/boot/overlays/
When I tested with the minimal ubuntu root, I did, before doing modules_install
sudo tar -xpf ubuntu-base-24.10-base-arm64.tar.gz -C mnt/root


Any help is welcome, even if it's just a comment "I followed the tuto and had a working terminal for my rasp x", I'll have at least a direction to look at. I tried a lot things, but I can't find what i'm missing.
Thank you in advance.

Statistics: Posted by Samael5248 — Thu Jan 09, 2025 1:40 am



Viewing all articles
Browse latest Browse all 4933

Trending Articles