From 71508f53ce33c55f094aa725dfc1e7df52321312 Mon Sep 17 00:00:00 2001 From: Andrey Miroshnikov Date: Wed, 16 Aug 2023 19:53:20 +0000 Subject: [PATCH] microwatt: Add a bit more to Linux section. --- HDL_workflow/microwatt.mdwn | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/HDL_workflow/microwatt.mdwn b/HDL_workflow/microwatt.mdwn index c4eb1e846..8c393b2e9 100644 --- a/HDL_workflow/microwatt.mdwn +++ b/HDL_workflow/microwatt.mdwn @@ -289,7 +289,7 @@ Then compile verilator sim binary as before: export GHDLSYNTH=ghdl make microwatt-verilator -## Running Linux kernel - TODO: Need to check +## Running Linux kernel To run Linux on Microwatt, you'll need two binaries: @@ -299,7 +299,22 @@ required). - The `dtbImage.microwatt` device tree Linux kernel. This can be compiled (see below), or a copy can be downloaded from: . +Like with the micropython example, you'll need to increase the RAM size in the +makefile, and recompile the microwatt-verilator binary. + +Uncomment the following: + + MEMORY_SIZE=536870912 + +Which will change the RAM size to 512KiB. + +As there is no `dtbImage.microwatt.hex`, you can leave `RAM_INIT_FILE` unchanged. + ### Building the kernel - TODO: + +*(Please don't build the kernel yourself, until you've tested with the existing kernel linked +above!)* + On a POWER9 there is no need to install gcc-powerpc64le-linux-gnu, you can omit CROSS_COMPILE and ARCH in this case @@ -322,7 +337,7 @@ cross compilation is used. It is assumed you're already in `~/src/microwatt/` directory. (microwatt):$ cd litedram/gen-src/sdram_init/ - (microwatt):$ make + (microwatt):$ make The resulting binary will be in the `obj/` directory. @@ -331,8 +346,8 @@ The resulting binary will be in the `obj/` directory. 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 + (microwatt):$ cp microwatt/arch/powerpc/boot/dtbImage.microwatt + (microwatt):$ ./microwatt-verilator sdram_init.bin dtbImage.microwatt This will take some time... -- 2.30.2