How can I compile a linux kernel for Rock Pi S?

I use Gentoo Linux, and gentoo linux users usually compile linux kernel manually.
How can I compile a linux kernel for Rock Pi S?
Does mainline linux support Rock Pi S? If it doesn’t, when will mainline linux support Rock Pi S?

gentoo linux users usually compile linux kernel manually.

Not for the embedded case I think. I believe it takes several hours to build kernel on ROCK Pi S.

For the mainline, it’s just beginning:

https://patchwork.kernel.org/patch/11297059/

I build ARM64 linux kernel on my AMD64 desktop computer. I’ve done kernel cross-compilation several times for Raspberry Pi. It takes 12 minutes on it. I also build all ARM64 packages on AMD64 desktop machine.

It seems https://wiki.radxa.com/RockpiS/dev/kernel-4.4 covers the basics.

1 Like

For more advanced, check https://github.com/armbian/build It also covers Rock Pi S while output is Debian based.

There is no mainline support whatsoever.

I can’t decipher armbian. I realized that I also need to take care of u-boot and the boot process. They are not well documented anywhere.

Armbian is in most cases build from sources. Especially ATF, boot loader and kernel. The cheap component (user space) is not changed much.

Study this part:

… or if you have a lot of time, start here: http://opensource.rock-chips.com/wiki_Linux_SDK

No… I don’t want to spend indefinite amount of time on deciphering a codebase. It can take anywhere between a week and a month.

What do you want??? This is not Windows nor Ubuntu desktop, nor Raspberry Pi. If there would be a simpler way, I would recommend it to you.

I want the manufacturer to document the manual installation process so that every linux distribution can use it. That should not be difficult for them.

Just an overview of the manual installation process is enough. For example, https://wiki.gentoo.org/wiki/Odroid_N2 is incomplete yet has enough information to keep me moving with the installation.

If I don’t have an overall picture that suggests necessary steps, it’s difficult to figure out how to install gentoo on it.

By perusing https://github.com/radxa/rockchip-bsp and the contents of /boot in armbian, I figured out that I just need linux kernel, u-boot, and /boot/boot.scr, and /boot/boot.cmd. rkbin is part of u-boot.

Deciphering armbian build codebase is masochism.

2 Likes

Its scripted representation of masochistic reality made by Rockchip. Armbian makes that simple: ./compile u-boot builds u-boot … How many steps do you need with BSP SDK? :slight_smile: + fixing bugs in the build process.

Yes, it could be done in more explanatory way, but that is not a purpose of a build tool which main idea is to give you a possibility to not deal with this.

Compiling kernel is straightforward. But, I’m unfamiliar with u-boot. As soon as I figure out u-boot, I expect to use many single board computers freely.

Not so fast :grinning:

Each SoC family can boot/boots in complete different way. Welcome to diversity of single board computers. There are also things that boots u-boot …

I’m going to make a new thread for it.