简体   繁体   中英

RISC-V Linux running on Qemu

I am trying to run RISC-V linux on Qemu, following the instruction: Running 64- and 32-bit RISC-V Linux on QEMU
I have downloaded and installed the RISC-V GNU compiller Toolchain

./configure --prefix=/opt/riscv
make linux

and when I execute the command:

make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- defconfig

I got the following error:

:~/Documents/riscv64-linux/linux$ make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- defconfig
*** Default configuration is based on 'defconfig'
scripts/Kconfig.include:39: compiler 'riscv64-unknown-linux-gnu-gcc' not found
make[1]: *** [scripts/kconfig/Makefile:73: defconfig] Error 1
make: *** [Makefile:602: defconfig] Error 2

Kindly, advice how can I fix this problem.

This is standart problem, try to type whereis riscv64-unknown-linux-gnu-gcc if it get nothing, try to type riscv64- and press tab , you should see necessary prefix you need paste after CROSS_COMPILE= . Also maybe you also need add PATH variable with path to riscv-toolchain's bin in ~/.bashrc or/and in ~/.profile .

Build own linux is a big task, maybe you should learn some manuals about toolchain and building linux.

riscv toolchain link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM