参考博客:
搭建riscv交叉编译环境
https://blog.csdn.net/qq_40836704/article/details/120391584
https://blog.csdn.net/ALLap97/article/details/112373544
报错:git submodule update –init –recursive 时候报如下错误:
Failed to connect to boringssl.googlesource.com port 443: Connection timed out”
解决方案
git clone https://github.com/google/boringssl.git
git clone --recursive https://github.com/riscv/riscv-gnu-toolchain
在 riscv-gnu-toolchain 的folder 下一定记得
git submodule update --init --recursive
否则再往后会有报错https://github.com/riscv-collab/riscv-gnu-toolchain/issues/371
INSTALL_PATH='/opt/riscv'
NUM_CPU=8
export PATH=$PATH:$INSTALL_PATH/BIN
./configure --prefix=$INSTALL_PATH
sudo make -j$NUM_CPU