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

Advanced users • Replicating the Raspberry Pi OS Kernel Build

$
0
0
Hi All,

I've been trying to find a source of documentation for (re)building custom, packaged versions of the Raspberry Pi OS kernels. I've used 'apt-get source linux-umage-$(uname -r)' to download the build source on the RPI itself, which after poking around I can see is a kernel tarball that matches a tag in the official linux stable repo, a debian directory that I believe comes from rpi-distro/linux-packaging repo wihch subsequently adds further patches.

I managed to build this source tree on-target (5+ hours on a Pi4!) using apt-get -b source, but it wouldn't install, I believe because the versioning matched the running kernel... I've tried building a kernel from the RPI kernel repo, but make deb-pkg doesn't produce something usable. I've had a good search around these forums and google, but I cant seem to find any pointers to where the official kernel build & package process is documented, I imagine that this must exist somewhere for people to replicate?

What I'm really needing to do is :
- Cross-compile kernel & modules from formal raspberry pi OS source.
- make some modifications (kernel internals + modules)
- create packages with custom name (e.g. linux-image-xxxx-...) that we can add to a PPA for simple updates that don't conflict with oficial linux-image- releases.

Has anyone got any pointers? If I could even just get the source tree from apt-get source to cross compile and produce a working, installable image it'd be a fantastic start!

Thanks!

Statistics: Posted by pev — Sun Apr 28, 2024 2:34 am — Replies 1 — Views 37



Viewing all articles
Browse latest Browse all 4567

Trending Articles