(no commit message)
[libreriscv.git] / HDL_workflow / microwatt.mdwn
1 # Build instructions for Microwatt
2
3 After installing ghdl-yosys-plugin use schroot to switch environment
4
5 schroot -c bullseye_ghdl
6 git clone https://git.libre-soc.org/git/microwatt.git
7 git checkout verilator_trace
8 export FPGA_TARGET=verilator
9 make microwatt-verilator
10
11 Then run the resulting binary
12
13 time ./microwatt-verilator
14
15 If everything works correcly it will print out an light bulb in ascii art
16 with the message Microwatt, it works. On my ASUS KGPE D16 this takes
17
18 real 1m4.986s
19 user 1m4.373s
20 sys 0m0.013s
21
22 ## Building the kernel
23 On a POWER9 there is no need to install gcc-powerpc64le-linux-gnu,
24 you can omit CROSS_COMPILE and ARCH in this case
25
26 apt install gcc-powerpc64le-linux-gnu
27 apt install flex bison lz4
28 git clone -b microwatt-5.7 https://git.kernel.org/pub/scm/linux/kernel/git/joel/microwatt.git
29 cd microwatt
30 wget http://ftp.libre-soc.org/rootfs.cpio
31 CROSS_COMPILE="ccache powerpc64le-linux-gnu-" ARCH=powerpc make -j8 O=microwatt microwatt_defconfig
32 CROSS_COMPILE="ccache powerpc64le-linux-gnu-" ARCH=powerpc make -j8 O=microwatt
33
34 This will produce a file
35 microwatt/arch/powerpc/boot/dtbImage.microwatt