Full/generic Linux Kernel on Raspberry Pi

Hey guys,
I’m currently working on a larger projects with Raspberry Pis. I’m running Ubuntu (Server) 20.04 LTS with Kernel Version 5.4.0-raspi. And that’s kind of a problem. This raspi Kernel seems to be much smaller than the generic Kernel Versions that come with Distributions like the actual Ubuntu Server for ARM.
As far as I know so far this smaller Kernel causes some problems for me (Software builds and runs on Ubuntu Server 20.04 for ARM but doesn’t even build on Raspberry Pi Ubuntu with errors referring to the Kernel). Therefore I’d like to try running the generic Ubuntu Server OS on the Raspberry Pis.
Did anyone of you ever do this or try this?

I’ve no idea how to get an ARM installation onto the Pi itself since the generic ARM Version only comes as an iso image and Raspberry Pis can’t boot from iso images.

Maybe you’ve got some ideas or different approaches.
Thanks in advance.

1 Like

Check out Jeff Geerling geerlingguy (Jeff Geerling) · GitHub
He does a lot of custom pi kernels for some cool projects.

1 Like

There are several ways to compile custom Pi kernels for several distros, the biggest problem is accidentally making too much of a scaled down kernel and something you’re trying to work on requires the missing parts. I tried to use a Pi as a dedicated image processor for my Jetson Nano car project and managed to break stuff as I was missing a few things. Lite version of Pi OS is easier to run auto-remove anything else you may not need to make it smaller–there are also cases where Ubuntu tends to be more recent.

What makes Ubuntu have a larger kernel is the back support for the Pi3B/B+ (I’ve run Ubuntu ARM64 on a Pi3B+ out of curiosity and 1GB of memory doesn’t go far)

There are tools which write a bootloader for specific ARM boards, generic Ubuntu for ARM may lack Broadcom specific drivers–if you don’t need bluetooth or wifi, the small memory savings is worth it. Generic versions of Ubuntu, Fedora, etc tend to leave out drivers that might be important–I remember reading someone tried to make a thin Ubuntu for a Jetson Nano and forgot to add the ethernet driver.

This is Ubuntu’s guide on making one:
Kernel/BuildYourOwnKernel - Ubuntu Wiki

This is ARM specific:
KernelTeam/ARMKernelCrossCompile - Ubuntu Wiki

Never done it with Ubuntu but with Fedora for ARM this is a command line effort and this tool works for several other ARM distros:
Architectures/ARM/Installation - Fedora Project Wiki

1 Like

If you need things like SATA / AHCI support or other kernel stuff, you have to build your own kernel. Again, as markwoll recommended, check out Jeff Geerling’s GitHub or youtube channel, you should find some documentation on how to do that.

But what do you mean by “high performance network fs?” Check out Jeff’s Dramble and Pi NAS projects. He tested the Pi 4 with both USB and PCI-E SATA cards and found out that you can’t really push the Pi very far. 2 consumer SSDs in RAID 1 at most, 4 SATA HDDs in RAID 10 may also be slower than 3 of the same HDDs in RAID 5 IIRC. You also can’t really push 2.5 Gbps NICs on the Pi. You can get close to it, but the CPU will stay close to 100% utilization. And you definitely can’t have both a SATA card and a 2.5 Gbps NIC at the same time.

So, you could do some network storage with the Pi, but I’m not sure about “high performance” part. Maybe you could do something in parallel with Ceph, but do you really need a custom kernel? You may want to try different SBCs with better CPUs, like the RockPro64 or maybe go higher and more expensive by using classic Intel NUCs. Alternatively, ARM servers are a thing and they can boot generic ARM ISOs (because they have UEFI).

1 Like