From: Andrey Miroshnikov Date: Tue, 9 May 2023 12:52:04 +0000 (+0100) Subject: microwatt: Updated section on running Linux kernel. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e05392c2cbe6a5fe9dee10a6535ccf3d50c771e;p=libreriscv.git microwatt: Updated section on running Linux kernel. --- diff --git a/HDL_workflow/microwatt.mdwn b/HDL_workflow/microwatt.mdwn index b00f2b84e..b3abca890 100644 --- a/HDL_workflow/microwatt.mdwn +++ b/HDL_workflow/microwatt.mdwn @@ -277,7 +277,15 @@ A few examples: ## Running Linux kernel - TODO: Need to check -### Building the kernel +To run Linux on Microwatt, you'll need two binaries: + +- The `sdram_init.bin`, which is easy to compile (no additional software +required). + +- The `dtbImage.microwatt` device tree Linux kernel. This can be compiled (see +below), or a copy can be downloaded from: . + +### Building the kernel - TODO: On a POWER9 there is no need to install gcc-powerpc64le-linux-gnu, you can omit CROSS_COMPILE and ARCH in this case @@ -295,16 +303,24 @@ This will produce a file microwatt/arch/powerpc/boot/dtbImage.microwatt ### Building sdram_init.bin -This needs gcc-powerpc64le-linux-gnu if cross compilation is used. +This needs gcc-powerpc64le-linux-gnu (already included in the setup step) if +cross compilation is used. It is assumed you're already in `~/src/microwatt/` +directory. - cd microwatt - cd litedram/gen-src/sdram_init/ - make + (microwatt):$ cd litedram/gen-src/sdram_init/ + (microwatt):$ make + +The resulting binary will be in the `obj/` directory. ### Running the simulation - cp microwatt/arch/powerpc/boot/dtbImage.microwatt - ./microwatt-verilator sdram_init.bin dtbImage.microwatt +Make sure to return back to `src/microwatt/`. + + (microwatt):$ cd ~/src/microwatt/ + (microwatt):$ cp microwatt/arch/powerpc/boot/dtbImage.microwatt + (microwatt):$ ./microwatt-verilator sdram_init.bin dtbImage.microwatt + +This will take some time... ### TODO: buildroot