I have spent many weeks getting Opensuse working on Rock64.  I bought 5
of them with 4GB RAM and 32GB EMMC.  They make great little computers.
I thought others might like to know about this so they can work on these
machines.

First thing is I "cheated".  I grabbed a debian stretch image from
ayufan4 and went from there.  
https://github.com/ayufan-rock64/linux-build/releases/tag/0.5.15

That image has 7 partitions containing the crazy rockchip boot process.
I think the first partition is u-boot.  Partition 6 is vfat and is where
u-boot looks to load the the system from.  It finds
extlinux/extlinux.conf for boot instructions.  It loads a kernel and an
initrd and tells the kernel to look for the root file system with a
label of linux-root.  That is partition 7, which is ext4.

I wrote a tumbleweed aarch64 root file system on partition 7 and
installed ayufan4's patched 4.4 kernel there.  That booted up pretty
well (headless) with a serial console and I continued from there with
ssh.

I then got opensuse's current kernel from
https://github.com/openSUSE/kernel

I then merged ayufan4's mainline patches from
https://github.com/ayufan-rock64/linux-mainline-kernel

I was AMAZED that worked since I have very little experience with git or
kernel patching.  There was one conflict, which was easy to fix.  I
concatenated ayufan's kernel config with the opensuse config (are you
allowed to do that?) and make menuconfig sorted it out.  I turned on
support for ceph and turned off support for various things like nvidia
and Plan 9.  After many days of running builds I got a configuration
that worked.

I did all that on the rock64. I ended up using -j1 with make because the
compiler would seg fault otherwise.  I built a binary RPM from this to
make it easy to keep track of.

The kernel and initrd end up in /boot on partition 7.  I had to manually
copy them to partition 6 and update the extlinux.conf file to point at
the new files.  You can't use symbolic links in a vfat.

This kernel seems to work well.  Ceph didn't work because there was a
relocation error loading it's module.  This is a known bug in gcc.  I
decided to build ceph into the kernel (instead of a module) and
everything works.

When I had everything working from a SDHC card I copied it to the EMMC.
I also installed u-boot on the SPI flash using this procedure:  

https://github.com/ayufan-rock64/linux-build/releases/download/0.6.22/u-boot-flash-spi-rock64.img.xz

Once you have a image on the emmc you have to install a jumper if you
want to boot from a sdhc again.  I got long jumpers to make it easy to
do this.

I now have opensuse running on all 5 rock64's and a ceph cluster on
them.  I put a usb3 enclosure on each machine with a SSD and a large
spinning disk.  This isn't very fast but it works.

ayufan4 has done great work!  He solicits a beer (via paypal) if you
like his work.  I will have to send him a few.  I think he is in
southern Italy.  Do Italians have pizza with their beer?

Bill

-- 
To unsubscribe, e-mail: opensuse-arm+unsubscr...@opensuse.org
To contact the owner, e-mail: opensuse-arm+ow...@opensuse.org

Reply via email to