The Aquila SoC hardware project is at aquila/hw/
, using the build.tcl
to create the project.
clone from github
installation for newlib
installation for linux (glibc)
In shell rc file, add:
When using newlib to build, comment out the Linux toolchain and vice versa.
To Build OpenSBI, U-Boot and Linux, using RISC-V Linux toolchain (glibc)
We will using OpenSBI, U-Boot, Linux kernel and Busybox, the following will guide you build the software from source code.
The configs file for Aquila of each software is at aquila/sw/linux_boot
clone from U-Boot GitHub
copy Aquila devices tree and config file to u-boot
build with the following command
clone from OpenSBI GitHub
copy Aquila config files and platform files to OpenSBI
Build OpenSBI with our custom platform
First, we need to prepare rootfs for initramfs.
Create a folder named initramfs, and create the directory that initrmafs needs.
in dev/, create device node console
and null
using busybox in rootfs, first we need to build busybox.
clone from Busybox GitHub
build busybox
the busybox binary executable will install at busybox/_install, copy the binary executable to our initramfs folder.
create an init script as the first initial program, create a file named init
and makes it executable.
the content of the init
is like a shell script :
now, our inintramfs folder has:
clone from Linux GitHub
copy Aquila config files to linux
set kernel configs
in menuconfig, set the path to our initramfs folder
build kernel
preparing a SD-card, formatting to FAT-32
copy the opensbi payload elf to SD-card and rename to system.elf
copy the Linux kernel image to SD-card