Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*** failed to create busybear.bin #13

Open
daqiren888 opened this issue Sep 14, 2019 · 5 comments
Open

*** failed to create busybear.bin #13

daqiren888 opened this issue Sep 14, 2019 · 5 comments

Comments

@daqiren888
Copy link

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.

  1. git clone --recursive https://github.com/riscv/riscv-gnu-toolchain
  2. git clone https://github.com/qemu/qemu
  3. git clone https://github.com/torvalds/linux
  4. git clone https://github.com/riscv/riscv-pk
  5. git clone https://github.com/michaeljclark/busybear-linux

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

@reimuser
Copy link

Did you figure out what the problem was?

@daqiren888
Copy link
Author

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.

@reimuser
Copy link

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.

@reimuser
Copy link

reimuser commented Nov 12, 2019

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.

@daqiren888
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants