How to Recompile Linux (on a Raspberry Pi)

Because I get the same question on every video where I recompile the Linux kernel on a Pi to work on GPU or other hardware driver support, I finally made a video answering it:

How do you recompile Linux?

In my case, since I mostly rebuild the kernel for the Pi, I rebuild Raspberry Pi's Linux kernel fork instead of 'mainline' linux (the upstream Linux kernel source).

Raspberry Pi publishes a very thorough guide covering building and cross-compiling the Pi Linux kernel, and my video today mostly goes through that (with a few little tips on making the experience more convenient):

In the video, I also mention one practical reason I'm rebuilding the kernel currently is to work on Raspberry Pi (and more broadly, arm64) support for Intel Arc GPUs (I'm testing a B580 and A750 currently.)

And yes, the Raspberry Pi should support Resizable BAR, though we're trying to figure out why the Xe drivers aren't working correctly with it right now.

Comments

Did you try using CPU flags' optimization during these rebuilds (-march=native) and, if so, does it improve anything?