You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
opensbi, the open-source reference implementation of the RISC-V Supervisor Binary Interface (SBI)
As of now, the SDK has been designed and tested for the Digilent Genesys 2 FPGA board. To implement and test SDK for other boards in this repository, you can volunteer to create and drive a new project at the OpenHW Group.
You can select the XLEN by setting it in the Makefile.
Then compile the Linux images with
$ git submodule update --init --recursive
$ make images
Environment Variables
If you want to cross compile other projects for this target you can add buildroot/output/host/bin/ to your path in order to later make use of the installed tools after compiling them with :
$ make all
Linux
You can also build a compatible Linux image that boots Linux on the CVA6 fpga mapping:
$ make vmlinux # make only the elf Linux image
$ make uImage.bin # generate the Linux image with the u-boot wrapper
$ make fw_payload.bin # generate the OpenSBI + U-Boot payload
Or you can build everything directly with:
$ make images # generates all images and save them in install$(XLEN)
Spike
You can test your image on spike
First, build spike with:
$ make isa-sim
Build the OpenSBI firmware with the Linux payload for the Spike platform:
First compile the SBI firmware and the Linux image:
$ make images
The flash-sdcard Makefile recipe handle the creation of the GPT partition table and the flashing of fw_payload.bin and uImage at there correct offset. Be careful to set the correct SDDEVICE.
$ sudo -E make flash-sdcard SDDEVICE=/dev/sdb
OS X
Similar steps as above but flashing is sligthly different. Get sgdisk using homebrew.
$ brew install gptfdisk
$ sudo -E make flash-sdcard SDDEVICE=/dev/sdb
OpenOCD - Optional
If you really need and want to debug on an FPGA/ASIC target the installation instructions are here.
Ethernet SSH
This patch incorporates an overlay to overcome the painful delay in generating public/private key pairs on the target
(which happens every time because the root filing system is volatile). Do not use these keys on more than one device.
Likewise it also incorporates a script (rootfs/etc/init.d/S40fixup) which replaces the MAC address with a valid Digilent
value. This should be replaced by the unique value on the back of the Genesys2 board if more than one device is used on
the same VLAN. Needless to say both of these values would need regenerating for anything other than development use.
Docker Container
There is a pretty basic Docker container you can use to get a stable build environment to build the image.