* [PATCH] Documentation: Add qemu instructions for OpenRISC
@ 2021-03-04 21:07 Stafford Horne
2021-04-04 18:46 ` Ahmad Fatoum
2021-04-13 7:42 ` Sascha Hauer
0 siblings, 2 replies; 4+ messages in thread
From: Stafford Horne @ 2021-03-04 21:07 UTC (permalink / raw)
To: Barebox; +Cc: Openrisc, Ahmad Fatoum, Stafford Horne
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>
---
Documentation/boards/openrisc.rst | 68 +++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/Documentation/boards/openrisc.rst b/Documentation/boards/openrisc.rst
index f9d67f965..34586b4a7 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
-------
--
2.26.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Documentation: Add qemu instructions for OpenRISC
2021-03-04 21:07 [PATCH] Documentation: Add qemu instructions for OpenRISC Stafford Horne
@ 2021-04-04 18:46 ` Ahmad Fatoum
2021-04-07 23:19 ` Stafford Horne
2021-04-13 7:42 ` Sascha Hauer
1 sibling, 1 reply; 4+ messages in thread
From: Ahmad Fatoum @ 2021-04-04 18:46 UTC (permalink / raw)
To: Sascha Hauer; +Cc: Openrisc, Stafford Horne, Barebox
Hello Sascha,
On 04.03.21 22:07, Stafford Horne wrote:
> 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>
I don't see this in next.
> ---
> Documentation/boards/openrisc.rst | 68 +++++++++++++++++++++++++++++++
> 1 file changed, 68 insertions(+)
>
> diff --git a/Documentation/boards/openrisc.rst b/Documentation/boards/openrisc.rst
> index f9d67f965..34586b4a7 100644
> --- a/Documentation/boards/openrisc.rst
> +++ b/Documentation/boards/openrisc.rst
> @@ -1,6 +1,74 @@
> OpenRISC
> ========
>
> +Optaining an OpenRISC toolchain
Could you fix up s/Optaining/Obtaining/ while at it?
Cheers,
Ahmad
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Documentation: Add qemu instructions for OpenRISC
2021-04-04 18:46 ` Ahmad Fatoum
@ 2021-04-07 23:19 ` Stafford Horne
0 siblings, 0 replies; 4+ messages in thread
From: Stafford Horne @ 2021-04-07 23:19 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: Barebox, Openrisc
On Sun, Apr 04, 2021 at 08:46:04PM +0200, Ahmad Fatoum wrote:
> Hello Sascha,
>
> On 04.03.21 22:07, Stafford Horne wrote:
> > 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>
>
> I don't see this in next.
>
> > ---
> > Documentation/boards/openrisc.rst | 68 +++++++++++++++++++++++++++++++
> > 1 file changed, 68 insertions(+)
> >
> > diff --git a/Documentation/boards/openrisc.rst b/Documentation/boards/openrisc.rst
> > index f9d67f965..34586b4a7 100644
> > --- a/Documentation/boards/openrisc.rst
> > +++ b/Documentation/boards/openrisc.rst
> > @@ -1,6 +1,74 @@
> > OpenRISC
> > ========
> >
> > +Optaining an OpenRISC toolchain
>
> Could you fix up s/Optaining/Obtaining/ while at it?
It looks like you guys are handling it, but please let me know if there is
anything else I can do.
-Stafford
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Documentation: Add qemu instructions for OpenRISC
2021-03-04 21:07 [PATCH] Documentation: Add qemu instructions for OpenRISC Stafford Horne
2021-04-04 18:46 ` Ahmad Fatoum
@ 2021-04-13 7:42 ` Sascha Hauer
1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2021-04-13 7:42 UTC (permalink / raw)
To: Stafford Horne; +Cc: Barebox, Openrisc, Ahmad Fatoum
On Fri, Mar 05, 2021 at 06:07:47AM +0900, Stafford Horne wrote:
> 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>
> ---
> Documentation/boards/openrisc.rst | 68 +++++++++++++++++++++++++++++++
> 1 file changed, 68 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/Documentation/boards/openrisc.rst b/Documentation/boards/openrisc.rst
> index f9d67f965..34586b4a7 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
> -------
>
> --
> 2.26.2
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-13 7:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 21:07 [PATCH] Documentation: Add qemu instructions for OpenRISC Stafford Horne
2021-04-04 18:46 ` Ahmad Fatoum
2021-04-07 23:19 ` Stafford Horne
2021-04-13 7:42 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox