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:
- The `dtbImage.microwatt` device tree Linux kernel. This can be compiled (see
below), or a copy can be downloaded from: <https://ftp.libre-soc.org/dtbImage.microwatt>.
+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
directory.
(microwatt):$ cd litedram/gen-src/sdram_init/
- (microwatt):$ make
+ (microwatt):$ make
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...