Open daqiren888 opened 4 years ago
Did you figure out what the problem was?
Yes, finally found the problem was about the configurations:
At step 1, I used --with-abi=lp64 to build the riscv-gnu-toolchain.
At step 5, since I used lp64 at step 1, I should firstly modify the configuration file at /busybear-linux/conf/busybear.config to let --with-abi=lp64 ( by default the value was --with-abi=lp64d )
problem solved, and everything is good.
Ok. Thank you for your response! I configured the riscv-gnu-toolchain with ./configure --prefix=/opt/riscv32 --with-arch=rv32ima --with-abi=ilp32 and changed the busybear.config file to --with-abi=lp32 Maybe there is the problem... I try to change the ./configure to --with-abi=lp32. Did you change the busybear files as described in busybear-linux.diff?
I will write an update later.
It works now. I changed --with-abi=lp32 to --with-abi=ilp32 in the busybear.conf file.
Now, I fail with sudo qemu-system-riscv32 -nographic -machine virt \ ... Then I get: bbl loader ../machine/minit.c:79: assertion failed: !(read_csr(misa) & fd_mask) Power off Any idea? Apparently it is due to riscv-pk.
Here is what I did and it works:
Riscv-gnu-toolchain: ./configure --prefix=(my folder) --with-arch=rv64imafdc --with-abi=lp64
busybear.config file: --with-abi=lp64
Start qemu with:
sudo qemu-system-riscv64 -nographic -machine virt -kernel riscv-pk/build/bbl -append "root=/dev/vda ro console=ttyS0" -drive file=busybear-linux/busybear.bin,format=raw,id=hd0 -device virtio-blk-device,drive=hd0
I am building busybear-linux following the instructions on : https://buildmedia.readthedocs.org/media/pdf/risc-v-getting-started-guide/latest/risc-v-getting-started-guide.pdf
from 1-5 step by step.
My platform is ubuntu 19.04 I have started from installing the riscv-gnu-toolchain,
I always failed like the follows. Can anyone help? thank you.
./scripts/build.sh 100+0 records in 100+0 records out 104857600 bytes (105 MB, 100 MiB) copied, 0.0558494 s, 1.9 GB/s mke2fs 1.44.6 (5-Mar-2019) Discarding device blocks: done
Creating filesystem with 102400 1k blocks and 25688 inodes Filesystem UUID: d9ec9fa2-b0d0-40db-a42e-b13aa7d5e13b Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729
Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done
*** failed to create busybear.bin