cvw/linux/README.MD
2023-08-11 12:11:56 -05:00

1.3 KiB

Linux for core-v-wally

Setting up Buildroot

In order to generate the Linux and boot stage binaries compatible with Wally, Buildroot is used for cross-compilation. To set up a Buildroot directory, configuration files for Buildroot, Linux, and Busybox must be copied into the correct locations inside the main Buildroot directory. This can be done automatically using the Makefile inside Wally's Linux subdirectory (this one). To install and patch a fresh Buildroot directory, type:

$ make install BUILDROOT=path/to/buildroot

In addition to copying the configuration files, it will install the buildroot package needed to build the SD card driver for Linux.

To install a new buildroot directory, build the binaries, and generate the device tree binaries in one command, use:

$ make BUILDROOT=path/to/buildroot

Or simply use the default buildroot location in /opt/riscv:

$ make

Note that the $RISCV variable cannot be set prior to building in buildroot or the build will fail. It is best to run source ./setup.sh to alter your $PATH and set the $RISCV variable after buildroot has succesfully built the binaries. If you're new to buildroot, you can find the binaries in <BUILDROOT>/output/images.

Generating Device Tree Binaries

Creating a Bootable SD Card