From 76f18362b112014b9bb69daa9f4e6732cfc18b1a Mon Sep 17 00:00:00 2001 From: Jacob Pease Date: Fri, 11 Aug 2023 15:48:49 -0500 Subject: [PATCH] Added a table of contents to the linux readme. --- linux/README.MD | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/linux/README.MD b/linux/README.MD index c87b107a9..68de94f03 100644 --- a/linux/README.MD +++ b/linux/README.MD @@ -1,6 +1,13 @@ # Linux for core-v-wally -## Setting up Buildroot +## Table of Contents + +1. [Setting up Buildroot](#buildroot) +2. [Generating Device Tree Binaries](#devicetree) +3. [Disassembling the Binaries for Debugging](#disassembly) +4. [Creating a Bootable SD Card](#sdcard) + +## 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: @@ -18,7 +25,7 @@ Or simply use the default buildroot location in `/opt/riscv`: 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 `/output/images`. -## Generating Device Tree Binaries +## Generating Device Tree Binaries The device tree files for the various FPGA's Wally supports, as well as QEMU's device tree for the virt machine, are located in the `./devicetree` subdirectory. These device tree files are necessary for the boot process. In order to build the device tree binaries (.dtb) from the device tree sources (.dts), we can build all of them at once using: @@ -30,7 +37,7 @@ The device tree files for the various FPGA's Wally supports, as well as QEMU's d The .dts files will end up in the `/output/images` folder of your chosen buildroot directory. -## Disassembling the Binaries for Debugging +## Disassembling the Binaries for Debugging By using the `riscv64-unknown-elf-objdump` utility, we can disassemble the binaries in `/output/images` so that we can explore the resulting machine code instructions and see what assembly or C code the instructions came from, along with the corresponding addresses. This is useful during debugging in order to trace how code is being executed. @@ -40,6 +47,6 @@ To create the disassembled binaries, run: You'll find the resulting disassembled files in `/output/images/disassembly`. -## Creating a Bootable SD Card +## Creating a Bootable SD Card