-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Doc: toolchain installation as a separate page
- Loading branch information
Showing
3 changed files
with
57 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,6 @@ not yet installed MSIM. | |
:maxdepth: 1 | ||
|
||
interactive-mode | ||
toolchain | ||
mini-kernel | ||
riscv-virtual-memory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Cross-compiler toolchain setup | ||
============================== | ||
|
||
This page describes how to install the toolchain (i.e., compiler, linker and | ||
other utilities) to be able to compile for MIPS or RISC-V architecture. | ||
That is needed if we want to run our own code in MSIM. | ||
It is not required if we want to play with binary images only | ||
(e.g. we can get a plug-and-play | ||
`image of HelenOS for MSIM <https://www.helenos.org/wiki/Download>`__ that way). | ||
|
||
Because we do not run on a MIPS or a RISC-V machine, we will need | ||
a so-called cross-compiler. That is compiler that produces code for | ||
a different architecture (platform) that the one we are compiling on. | ||
Some compilers provide this feature in their base installation, for some one | ||
needs to build the compiler with special configuration options. | ||
|
||
We will use the standard GNU toolchain (GCC and binutils) compiler for | ||
MIPS and RISC-V in our tutorials. | ||
|
||
Cross-compiler is not a standard package available on all machines. We can | ||
either compile it from sources or find a special package for our distribution. | ||
|
||
If you happen to use some RPM-based distribution, we provide cross-compiler | ||
toolchain in our | ||
`COPR repository <https://copr.fedorainfracloud.org/coprs/d3s/main/>`__. | ||
The packages are built based on | ||
`these SPEC files <https://gitlab.com/mffd3s/nswi200/-/tree/main/copr?ref_type=heads>`__. | ||
|
||
With a properly setup system, the following should install all the required | ||
tools. | ||
|
||
.. code-block:: shell | ||
# You might already have these | ||
dnf install make gcc git | ||
# Probably not needed if you use COPR already | ||
dnf install dnf-plugins-core | ||
# Enable our repository | ||
dnf copr enable d3s/main | ||
# Install toolchain for MIPS | ||
dnf install mffd3s-binutils-mipsel-linux-gnu mffd3s-gcc-mipsel-linux-gnu | ||
# Install toolchain for RISC-V | ||
dnf install mffd3s-binutils-riscv32-unknown-elf mffd3s-gcc-riscv32-unknown-elf | ||
# Install MSIM | ||
dnf install msim | ||
We also provide a script to | ||
`build the toolchain from sources <https://gitlab.com/mffd3s/nswi200/-/tree/main/from-sources?ref_type=heads>`__ | ||
and also a set of | ||
`Docker images <https://gitlab.com/mffd3s/nswi200/container_registry>`__ | ||
(based on Fedora and using the COPR repository mentioned above). |