os Introduction to development environment and tools
# (ubuntu) install package
sudoaptinstallautoconfautomakeautotools-devcurllibmpc-devlibmpfr-devlibgmp-dev\gawkbuild-essentialbisonflextexinfogperflibtoolpatchutilsbc\zlib1g-devlibexpat-devpkg-configlibglib2.0-devlibpixman-1-devlibsdl2-dev\gittmuxpython3python3-pipninja-build
# install QEMU
mkdirdev
pushddev
wgethttps://download.qemu.org/qemu-7.0.0.tar.xz
tar-xfqemu-7.0.0.tar.xz
cdqemu-7.0.0
./configure--target-list=x86_64-softmmu,aarch64-softmmu,riscv64-softmmu--enable-debug
make-j$(nproc)
makeinstall
popd# Configure environment variables
vi~/.bashrc
exportPATH=$PATH:/path/to/qemu-7.0.0/build# Update the system path after configurationsource~/.bashrc# test qemu
qemu-system-riscv64--version
# install rust
curlhttps://sh.rustup.rs-sSf|sh
# Update the system path after configurationsource$HOME/.cargo/env
# test rust
rustc--version
# rust related package installation
rustuptargetaddriscv64gc-unknown-none-elf
cargoinstallcargo-binutils
rustupcomponentaddllvm-tools-preview
rustupcomponentaddrust-src
Common problems and solutions
# (centos) install package
sudoyuminstallautoconfautomakelibmpc-develmpfr-develgmp-develgawkbisonflex\texinfopatchutilsgccgcc-c++zlib-develexpat-develgit
# gcc version is too low
yuminstallcentos-release-scl
sclenabledevtoolset-8bash
# test gcc
gcc-v