Linux running on vcu118 FPGA

In this tutorial, we are going to build a SoC with a single rocket core, and deploy the design on the vcu118 FPGA.

1. Setting up environment

Follow the tutorial to set up Chipyard on your machine. We need a machine that has GUI interface and USB access.

pageSetting up Chipyard

As the final step, don't forget to source the env script.

source $chipyard/env.sh

2. Build vcu118 bitstream

cd $chipyard/fpga

Run the following command to build bitstream for vcu118

make 

3. Build Linux image

cd $chipyard/software/firemarshal/

edit $chipyard/software/firemarshal/marshal-config.yaml to have the following content

firesim-dir: "../../sims/firesim/"
board-dir: "boards/prototype/"

Running build

./marshal -v -d build br-base.json

here the -d indicates --nodisk or initramfs

Generating binary

./marshal -v -d install -t prototype br-base.json

Creating SD Card

See the following link to prepare the SD card.

pageCreating SD Card for Linux Bootup

Use the following command to copy Linux image into SD card. Replace sdx with the actual sd card path

sudo dd if=$chipyard/software/firemarshal/images/prototype/br-base/br-base-bin-nodisk-flat of=/dev/sdx1

Side Notes

Buildroot Linux on Firemarshal does not have good support for password login. If running into issues such as the system does not recognize the login password, remove the password in the configuration file by doing the following:

Edit software/firemarshal/boards/prototype/base-workloads/br-base/buildroot-config , remove the line setting the password.

...
BR2_RISCV_ABI_LP64D=y
BR2_ARCH_IS_64=y

# remove the password
# BR2_TARGET_GENERIC_ROOT_PASSWD="fpga"

BR2_GENERATE_LOCALE=""
BR2_PACKAGE_E2FSPROGS=y
...

Build the system again, and now the Linux should not ask for password when logging into root.

To clean the previous build, run

./marshal -v clean br-base.json

Last updated