From 17c1aeda820035f937362c7e95db624267176933 Mon Sep 17 00:00:00 2001 From: Guokai Chen Date: Wed, 7 Apr 2021 14:43:10 +0800 Subject: [PATCH] README: append OpenSBI guide --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index f44f5ba8..bce4f9ba 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,16 @@ The main features of NEMU include * most of them are simplified and unprogrammable * 2 types of I/O * port-mapped I/O and memory-mapped I/O + +## Howto + +### Run OpenSBI and Linux + +**All steps below use source code in RISCVERS** + +1. Compile a Linux kernel, with proper SD card driver integrated if you want to run Debian or Fedora. Currently Kernel v4.18 is verified to work. +2. Convert ```vmlinux``` to binary format using ```objcopy```. +3. Compile OpenSBI using ```build\_linux.sh``` where vmlinux path may need a modification. +4. Compile NEMU using ```opensbi``` branch. You may want to change default sdcard image path in ```src/devices/sdcard.c``` to boot Debian or Fedora. +5. launch NEMU intepreter and load ```fw\_payload.bin``` generated by OpenSBI. +6. If you are using a ```vmlinux``` with initramfs, you will likely be greeted with a ```Hello```, otherwise you may see startup logs and finally a login prompt from Debian or Fedora if SD card is configured properly. -- GitLab