summaryrefslogtreecommitdiffstats
path: root/Documentation/boards
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2021-03-05 06:07:47 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2021-04-13 09:41:45 +0200
commitc78a717d77e57f8ee9a120633046a455746042ef (patch)
tree9781dce84e27373a22d27f6fa049f058819701ab /Documentation/boards
parent5b537db03b3e73a8c1b465168d85b9cc3e045498 (diff)
downloadbarebox-c78a717d77e57f8ee9a120633046a455746042ef.tar.gz
barebox-c78a717d77e57f8ee9a120633046a455746042ef.tar.xz
Documentation: Add qemu instructions for OpenRISC
Most developers have qemu and rather not download and install the or1ksim. Also, this adds details on how to get a openrisc toolchain. Signed-off-by: Stafford Horne <shorne@gmail.com> Link: https://lore.pengutronix.de/20210304210747.3679483-1-shorne@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'Documentation/boards')
-rw-r--r--Documentation/boards/openrisc.rst68
1 files changed, 68 insertions, 0 deletions
diff --git a/Documentation/boards/openrisc.rst b/Documentation/boards/openrisc.rst
index f9d67f9650..34586b4a76 100644
--- a/Documentation/boards/openrisc.rst
+++ b/Documentation/boards/openrisc.rst
@@ -1,6 +1,74 @@
OpenRISC
========
+Optaining an OpenRISC toolchain
+-------------------------------
+
+Toolchain binaries can be obtained from openrisc.io or our github releases page.
+Instructions for building the different toolchains can be found on openrisc.io
+or Stafford's toolchain build and release scripts.
+
+See:
+
+ * https://github.com/stffrdhrn/gcc/releases
+ * https://github.com/stffrdhrn/or1k-toolchain-build
+ * https://openrisc.io/software
+
+Example of downloading and installing a toolchain::
+
+ $ curl --remote-name --location \
+ https://github.com/stffrdhrn/gcc/releases/download/or1k-10.0.0-20190723/or1k-elf-10.0.0-20190723.tar.xz
+ $ tar -xf or1k-elf-10.0.0-20190723.tar.xz
+ $ export PATH=$PATH:$PWD/or1k-elf/bin
+
+Running OpenRISC barebox on qemu
+------------------------------
+
+Running barebox on qemu is similar to running linux on qemu see more details on
+the qemu wiki site at https://wiki.qemu.org/Documentation/Platforms/OpenRISC
+
+Compile the qemu emulator::
+
+ $ git clone https://gitlab.com/qemu-project/qemu.git
+ $ cd qemu
+ $ mkdir build ; cd build
+ $ ../configure \
+ --target-list="or1k-softmmu" \
+ --enable-fdt \
+ --disable-kvm \
+ --disable-xen \
+ --disable-xkbcommon \
+ --enable-debug \
+ --enable-debug-info
+ $ make
+
+Next compile barebox::
+
+ $ make ARCH=openrisc defconfig
+ ...
+ $ make ARCH=openrisc CROSS_COMPILE=or1k-elf-
+
+Run barebox::
+
+ $ <path to qemu source>/build/or1k-softmmu/qemu-system-or1k \
+ -cpu or1200 \
+ -M or1k-sim \
+ -kernel /home/shorne/work/openrisc/barebox/barebox \
+ -net nic -net tap,ifname=tap0,script=no,downscript=no \
+ -serial mon:stdio -nographic -gdb tcp::10001 \
+ -m 32
+
+
+ barebox 2021.02.0-00120-g763c6fee7-dirty #14 Thu Mar 4 05:13:51 JST 2021
+
+
+ Board: or1ksim
+ mdio_bus: miibus0: probed
+ malloc space: 0x01b80000 -> 0x01f7ffff (size 4 MiB)
+
+ Hit any to stop autoboot: 3
+ barebox@or1ksim:/
+
or1ksim
-------