MIPS Creator Ci20 Gentoo resources

On this page you will find various resources to run Gentoo Linux on the MIPS Creator Ci20 single board computer.

Gentoo image

This is an SD Card image featuring a custom Gentoo Linux installation for the Ci20. It's losely based on the experimental desktop image available on Gentoo mirrors.

Downloads

Installation

To install the image you will need to copy it to unpack it and copy it to an SD Card at least 2 GiB large. This can be done in a single step with the following command (assuming /dev/sdx is the path to your SD Card):

xz --decompress --stdout gentoo-2023-01-22.img.xz | dd of=/dev/sdx

Once your SD Card is ready turn off your Ci20 then proceed with these steps:

  1. Set the JP3 jumper to the 2-3 position

  2. Insert the SD Card

  3. Power on the MIPS Creator Ci20

  4. The LED on the board will turn red, then blue which indicates the image is being written to the onboard NAND memory, then after a while it will turn red again. This indicates that the flashing process is over

  5. Turn off the board

  6. Put the JP3 jumper back in the 1-2 position

  7. Power on the board again to boot into your new Gentoo installation

Usage

Once your board has started up you can login graphically via the slim display manager to a basic Openbox WM or via the console. The root password is root, and there is also a normal user account called user which password is user as well. While this image has a graphical environment it doesn't come with any graphical applications, only developer tools so feel free to customize it to your liking. See below on how to install packages on the board.

Software

The image comes with the Linux 3.8.134 kernel with the Ci20-specific patches from the official GitHub repository applied on top. The sources are available on my kernel fork on GitHub. All the software was built with gcc 7.3.0, binutils 2.30 and glibc 2.27. The U-Boot bootloader is also a custom version built from my U-Boot fork on GitHub; it includes important fixes to the DDR memory timings that greatly improve the board's stability.

The installation also comes with dhcpcd, wpa_supplicant and OpenSSH installed and enabled to facilitate connectivity. Once network connectivity is established chrony is also installed and configured to keep the board's clock synchronized. You will also find a number of developer tools including perl 5.26.2, python 2.7.15 and 3.6.5.

Timekeeping

The board comes with the swclock service enabled by default. Every time the board is booted this sets the system time to the time of the previous shutdown. This ensures that the system time is always consistent with the filesystem timestamps, even during early boot and even if the clock is never set to a correct value. This can safely be used together with chronie to keep the system time.

If you're using a battery-backed hardware RTC or if you simply don't want this behavior the service can be disabled with the following command:

rc-config delete swclock boot

Installing packages

The base installation doesn't come with a populated portage tree so if you want to install other packages you'll first need to install a portage snapshot. This can be done by downloading and unpacking the latest snapshot under /usr/portage:

cd /usr
wget http://ftp.snt.utwente.nl/pub/os/linux/gentoo/snapshots/portage-latest.tar.xz
tar -x -a -v -f portage-latest.tar.xz
rm -v portage-latest.tar.xz

Once this is done synchronize the portage tree, this will also run all the in-place updates:

emerge --sync

Finally select the mipsel o32 profile:

eselect profile set --force default/linux/mips/17.0/mipsel/o32

Installing a package can then be done with emerge, e.g.:

emerge strace

Note that installing portage and building packages on the board is a slow process, so be patient.

Technical documents

This section contains the technical documentation on the board's SoC, processor and memory chips. It can be useful if you intend to hack the kernel or U-boot.

Changelog

  • 22/01/2023 - This is the same version as the previous one but the root password was fixed to be root. With the past image it was impossible to login without having serial access.

  • 12/02/2019 - Updated the kernel to version 3.18.134. All packages updated to stable versions. Minor updates in default configuration files under /etc.

  • 01/02/2019 - Updated the kernel to version 3.18.133 and compiled-in the binfmt_misc module since it's required by Gentoo. A number of packages received minor updates.

  • 23/01/2019 - Recompiled using the 17.0 Gentoo profile, updated all the installed packages to their stable version (including glibc 2.27 and perl 5.26.2) and updated the kernel to version 3.18.132. The image now comes with the swclock service enabled to provide a consistent clock after a cold boot.

  • 15/10/2018 - First release