This is my process of getting linux to work on the MAIX bit. The MAIX bit consits of an k210 SoC with 2 RISC-V 64 bit harts. The SoC has an total of 8MB RAM. The start is to do this without buildroot. Maybe later I will integrate all of this in an buildroot environment.

Toolchain

The toolchain is important in all steps. Because the target architecture is different than the architecture on the system that we compile the code on we need an cross-compiler. Luckly for the ones using Arch Linux there is a package for that. If you wish to compile the compiler yourself. Go ahead.

sudo pacman -S riscv64-linux-gnu-gcc riscv64-linux-gnu-binutils riscv64-linux-gnu-glibc

Before every make statement we will include an argument CROSS_COMPILE=riscv64-linux-gnu-. This is to make sure the program uses our cross-compiler. In the linux source we will also use the argument ARCH=riscv to select that we only want anything to do with RISC-V

Content

  1. U-Boot

  2. Linux kernel boot from sd-card from U-Boot

  3. Linux kernel boot with an rootfs. (Busybox)

  4. Tbd