aboutsummaryrefslogtreecommitdiffstats

Unmatched Patchwork

This is an overlay voor the Gentoo Linux distribution, it is intended for owners of the SiFive HiFive Unmatched RISC-V PC.

Why this overlay?

Running Gentoo Linux on the Unmatched requires some modifications to some packages. Some are specific to this specific board, others are for RISC-V in general.

Instead of keeping all those patches for myself I decided to share and hope it will help someone else too. This is actually the first overlay I'm sharing, so feedback is appreciated. You're quite likely to find me on the Gentoo forums or the SiFive forums.

What is in this overlay?

This overlay contains a few packages:

  • media-video/mplayer: Mplayer with a patch for it's configure script to accept RISC-V
  • sys-apps/sysvinit: Sysvinit patched so that the "reboot" command does the same als "halt" because the Unmatched can't reboot and will be stuck if you do, also adds the serial console to inittab
  • sys-boot/grub: Grub with patches to allow loading linux
  • sys-boot/opensbi: OpenSBI with patches from SiFive
  • sys-boot/u-boot: U-Boot with patches from SiFive. Also has USE flags to set the CPU Frequency and prioritize EFI booting (required for grub)
  • sys-kernel/sifive-sources: Gentoo-sources with patches from SiFive

How to use this overlay?

First you'll have to clone this overlay on a place you like, a common place these days is /var/db/repos. So cd into that directory and use git clone https://code.pa4wdh.nl.eu.org/gentoo/unmatched-patchwork, this will create a directory called unmatched-patchwork with the overlay in it.

Next you have to make portage aware of the repo, for that you'll have to create a config file under /etc/portage/repos.conf. Create a file called unmatched-patchwork.conf and give it these contents:

[unmatched-patchwork]
location = /var/db/repos/unmatched-patchwork
sync-type = git
sync-uri = https://code.pa4wdh.nl.eu.org/gentoo/unmatched-patchwork

If you placed the overlay on a different place than /var/db/repos make sure to adapt the location line to your needs.

What can i do with this?

For me booting with grub has great value, it allows me to boot different kernels via it's menu. This allows me to experiment with different kernel versions and configurations, and i don't run into problems if it somehow doesn't boot.

Mplayer is my favorite media player and is nice to get quick results. Even if you don't have a GPU you can test video with aalib :-).

Have fun!