Add python, multilib & qemu install notes

This commit is contained in:
John Winans 2021-06-29 20:50:07 -05:00
parent f0b1caaa64
commit 2b1f4592a1

View File

@ -8,6 +8,10 @@ a Linux (Ubuntu 20.04 LTS) operating system.
The installation instructions provided here were last tested on The installation instructions provided here were last tested on
on March 5, 2021. on March 5, 2021.
It is expected that these tools will evolve over time. See the
respective documentation web sites for the latest news and options
for installing them.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -37,7 +41,7 @@ your system. The following will install those that are needed:
\begin{minipage}{\textwidth} \begin{minipage}{\textwidth}
\begin{tty} \begin{tty}
sudo apt install autoconf automake autotools-dev curl libmpc-dev \ sudo apt install autoconf automake autotools-dev curl python3 python-dev libmpc-dev \
libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf \ libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf \
libtool patchutils bc zlib1g-dev libexpat-dev libtool patchutils bc zlib1g-dev libexpat-dev
\end{tty} \end{tty}
@ -59,7 +63,8 @@ cd ~/projects/riscv
git clone https://github.com/riscv/riscv-gnu-toolchain git clone https://github.com/riscv/riscv-gnu-toolchain
cd riscv-gnu-toolchain cd riscv-gnu-toolchain
INS_DIR=~/projects/riscv/install/rv32i INS_DIR=~/projects/riscv/install/rv32i
./configure --prefix=$INS_DIR --with-arch=rv32i --with-abi=ilp32 ./configure --prefix=$INS_DIR \
--with-multilib-generator="rv32i-ilp32--;rv32imafd-ilp32--;rv32ima-ilp32--"
make make
\end{tty} \end{tty}
\end{minipage} \end{minipage}
@ -68,7 +73,7 @@ After building the toolchain, make it available by putting it into
your PATH by adding the following to the end of your \verb@.bashrc@ file: your PATH by adding the following to the end of your \verb@.bashrc@ file:
\begin{tty} \begin{tty}
export PATH=$PATH:~/projects/riscv/install/rv32i/bin export PATH=$PATH:$INS_DIR
\end{tty} \end{tty}
For this \verb@PATH@ change to take place, start a new terminal or paste the For this \verb@PATH@ change to take place, start a new terminal or paste the
@ -131,3 +136,31 @@ ddt> x
winans@ux410:~/projects/riscv/rvddt/examples$ winans@ux410:~/projects/riscv/rvddt/examples$
\end{tty} \end{tty}
\end{minipage} \end{minipage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{qemu}
You can download and install the RV32 qemu simulator by executing
the following commands.
At the time of this writing (2021-06) I use release v5.0.0.
Release v5.2.0 has issues that confuse GDB when printing the registers
and v6.0.0 has different CPU types that I have had trouble with when
executing privileged instructions.
\begin{minipage}{\textwidth}
\begin{tty}
INS_DIR=~/projects/riscv/install/rv32i
cd ~/projects/riscv
git clone git@github.com:qemu/qemu.git
cd qemu
git checkout v5.0.0
./configure --target-list=riscv32-softmmu --prefix=${INS_DIR}
make -j4
make install
\end{tty}
\end{minipage}