I'm trying to boot the Linux kernel in the generated Rocket Chip emulator using the DefaultConfig configuration.
I'm following the steps shown in the RISCV tools repository wiki and I've been able to successfully build and boot the Linux kernel on the ISA emulator spike by:
- Compiling the
riscv64-unknown-linux-gcc
cross-compiler. - Building the Linux kernel 4.6 (RISC-V flavour found in the riscv-linux repository)
- Rebuilding the
bbl
bootloader pointing it to the builtvmlinux
image (--with-payload
option).
However, when trying to run this very same bbl
bootloader in the Rocket Chip emulator generated by the default configuration file, the kernel doesn't boot but the process keeps spinning as if it were stuck in an infinite loop. No informative message or errors are given, it just consumes 100% CPU until killed with the Ctrl-C
keystroke (after waiting a considerable amount of time).
I believe my generated Rocket Chip emulator is correct as I am able to run cross-compiled programs through the proxy kernel (pk) or even bare metal without any problems. Also, all tests and benchmarks are passed (make run-asm-tests
and make run-bmark-tests
).
I haven't been able to find any clear documentation of anyone booting the kernel in the chip emulator (most use an FPGA) and at this point I doubt whether it is even possible.
Has anyone been able to achieve it in the emulator? Am I missing any step? Any hint is appreciated.