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