Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4785

Advanced users • Re: Missing build and source folder after compiling header

$
0
0
so after I have compiled a kernel. What do I need to do with the files?

Of course, I need to copy them over to the IMG just like before when I compiled it (the paths needs to be updated ;) ):
sudo cp mnt/boot/$KERNEL.img mnt/boot/$KERNEL-backup.img
sudo cp arch/arm64/boot/Image mnt/boot/$KERNEL.img
sudo cp arch/arm64/boot/dts/broadcom/*.dtb mnt/boot/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* mnt/boot/overlays/
sudo cp arch/arm64/boot/dts/overlays/README mnt/boot/overlays/

II'll guess the modules folder needs to be copied to the root partition of the IMG.

Cross-compiled output (for example: kernel-6.12.9-v8-16k.zip) is placed in the user's home directory if no output directory is specified. Simply run install-kernel on the target Raspberry Pi to install the new kernel. For example:

Code:

sudo install-kernel kernel-6.12.9-v8-16k.zip
That's it. All necessary copying, running of update-initramfs, etc. will be accomplished and the new kernel should be in effect following a reboot.

Make sure you can create, install, and run a new/unmodified kernel before proceeding.

To make changes, perform them on the development machine (where the cross-compiling is done). You can then run build-kernel again, or perform the changes while executing build-kernel utilizing the "Interactive shell before compile" feature. A new kernel-<version>.zip file will be created that you install on the target Raspberry Pi as previously described.

Statistics: Posted by RonR — Tue Jan 14, 2025 8:12 pm



Viewing all articles
Browse latest Browse all 4785

Trending Articles