This builds Linux with rv64ilp32 for trying on K230 devices.
Please prepare toolchain, source tree and host packages before building.
Please get the rv64ilp32 toolchain and unpack it in a folder, let's assume environment variable RV64ILP32_TOOLCHAIN_HOME
points to that folder:
$ export RV64ILP32_TOOLCHAIN_HOME=<toolchain-install-root>
$ ls -F $RV64ILP32_TOOLCHAIN_HOME
riscv/
Please note that the riscv64-unknown-linux-gnu-
toolchain is needed to build U-Boot, it can be from the mainline toolchain. Let's assume this toolchain is available at folder specified by MAINLINE
environment variable.
Before building, please run the following commands to fetch the submodule sources:
$ git submodule update --init --recursive
The following host packages are also needed on Ubuntu:
$ sudo apt install libssl-dev mtools python3.10-venv
The genimage tool is also needed. It can be build with the host C compiler like below:
$ cd genimage-17
$ ./configure
$ make
$ sudo make install
$ genimage -h
Run build.sh
in top folder to see the list of targets:
PATH=$MAINLINE/bin:$PATH ./build.sh
The final image will be available in output/
folder, which can be used on CanMV-K230 device. Read build.sh
for more usage tips.