cnrv / fpga-rocket-chip

Wrapper for Rocket-Chip on FPGAs
Other
124 stars 26 forks source link

Boot linux failed. #9

Closed philipseins closed 4 years ago

philipseins commented 4 years ago

Hello, when i boot linux on the fpga, I found the boot.elf file was too large to load into the DDR. So I want to know the version of linux kernel you used. The riscv-linux repo that you provided is upstream now, so can you tell me the version or other sources of the linux kernel ?

wsong83 commented 4 years ago

I think it should be https://github.com/riscv/riscv-linux/commit/8fe28cb58bcb235034b64cbbb7550a8a43fd88be

Linux 4.20

philipseins commented 4 years ago

Thanks a lot, I will try it later. Besides, I noticed that FSBL limits the size of the image file in the sdload.c (#define MAX_FILE_SIZE 0x1000000). The vmlinux image file that we used is about 32MB, so I modified the Macro to 0x3000000. Do you think it will result in other effects?

wsong83 commented 4 years ago

Although I have not checked it personally, I think increase it from 16MB to something like 32MB or even 64MB should be fine. The bootloader need DDR space to cope SD image to the right virtual memory space. So the maximal file size should be less than half of the DDR size (in theory).

philipseins commented 4 years ago

Thanks.