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
gentoo-2023-01-22.img.xz - SD Card installation image, 12/02/2019 build w/ user fix
gentoo-2023-01-22.img.xz.sha256sum - Image SHA256 checksum
make-flash-card.sh - Script used for building the image
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:
Set the JP3 jumper to the 2-3 position
Insert the SD Card
Power on the MIPS Creator Ci20
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
Turn off the board
Put the JP3 jumper back in the 1-2 position
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.
JZ4780 Mobile Application Processor Programming Manual - SoC programming manual
XBurst® Instruction Set Architecture MIPS eXtension/enhanced Unit Programming Manual - SIMD extensions
Hynix 2Gb DDR3 SDRAM - H5TQ2G43CFR-xxC, H5TQ2G83CFR-xxC memory chip datasheet
Samsung 2Gb Q-die DDR3L SDRAM - K4B2G0446Q, K4B2G0846Q memory chip datasheet
Board schematic - board reduced schematics
Rockchip RK903 datasheet - WiFi+Bluetooth 4.0(HS)+FM RX SIP Module Spec Sheet
BCM4330 datasheet - Single Chip IEEE 802.11TM a/b/g/n MAC/Baseband/Radio with Integrated Bluetooth® 4.0 + HS and FM Transceiver
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