Open phillippZZ opened 3 weeks ago
hmm maybe replacing https://github.com/litex-hub/linux-on-litex-vexriscv/blob/ea17e31537cdabe780cf5747cbe5b37ea09f717f/buildroot/configs/litex_vexriscv_defconfig#L25C1-L25C21 with BR2_GCC_VERSION_12_X=y ?
Not sure
It doesn't work. And I tried to add "March=rv32i_zicsr" somewhere for gcc but couldn't find a place to add it😅
This is related to :
BR2_TARGET_OPENSBI=y BR2_TARGET_OPENSBI_CUSTOM_GIT=y BR2_TARGET_OPENSBI_CUSTOM_REPO_URL="https://github.com/litex-hub/opensbi.git" BR2_TARGET_OPENSBI_CUSTOM_REPO_VERSION="1.3.1-linux-on-litex-vexriscv" BR2_TARGET_OPENSBI_PLAT="litex/vexriscv" BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG=n
That opensbi branch seems to bo too outdated.
Sorry, I don't know what I'm supposed to do now. Do I use "https://github.com/riscv-software-src/opensbi" in "litex_vexriscv_defconfig", or keep using "https://github.com/litex-hub/opensbi.git" and follow @trabucayre 's instruction?
To enable RVC in config, I did the following:
BR2_RISCV_ISA_CUSTOM_RVC=y BR2_RISCV_ISA_RVC=y
Did I configure it in the correct way? And I don't know where to add "--with-rvc". Do I do it when building "riscv64-unknown-elf-gcc"? For now, I'm using "riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14" from the following flow:
$ wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14.tar.gz $ tar -xvf riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14.tar.gz $ export PATH=$PATH:$PWD/riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14/bin/
@trabucayre My bad, you are right ^^ the version is good.
@phillippZZ By a happy hazard, i just hit the same issue.
I got things to compile with (didn't used RVC, i was on opensbi 1.4 on the generic platform, not the litex one, so it isn't 1 to 1 necessarly):
make ... \
PLATFORM_RISCV_XLEN=32 \
PLATFORM_RISCV_ISA=rv32ima_zicsr_zifencei \
PLATFORM_RISCV_ABI=ilp32 \
...
@Dolu1990 Thank you.
Do I download opensbi 1.4 and compile it with something like:
$ wget https://github.com/riscv-software-src/opensbi/archive/refs/tags/v1.4.zip $ unzip v.1.4.zip $ cd opensbi $ make CROSS_COMPILE=riscv-none-embed- PLATFORM=generic PLATFORM_RISCV_XLEN=32 PLATFORM_RISCV_ISA=rv32ima_zicsr_zifencei PLATFORM_RISCV_ABI=ilp32
Somehow I get:
Assembler messages: Error: cannot find default versions of the ISA extension
zicsr' Error: cannot find default versions of the ISA extension
zifencei'
Maybe there's something wrong with my riscv-none-embed-gcc.
Also, should I modify litex_vexriscv_defconfig as the following:
BR2_TARGET_OPENSBI=y BR2_TARGET_OPENSBI_CUSTOM_GIT=n BR2_TARGET_OPENSBI_CUSTOM_DIR="/path/to/local/opensbi" BR2_TARGET_OPENSBI_PLAT="generic" BR2_TARGET_OPENSBI_INSTALL_DYNAMIC_IMG=n
UPDATES: Insteading of integrating my program while building the linux image, I chose not to build a new linux image and put my program into the rootf.cpio downloaded via "https://github.com/litex-hub/linux-on-litex-vexriscv/files/8331338/linux_2022_03_23.zip". But I couldn't invoke the program by using "./program" or "source program".
After several attempts, I found that "sh XX.sh" works
Don't use opensbi 1.4, as i proposed, it is for when you use the generic opensbi platform, which is the same as proposed on linux-on-litex-vexriscv.
How did you made your program file ?
I didn't use opensbi 1.4 or build the linux image. I simply compiled a project called IsolBench with "riscv64-unknown-linux-gnu-gcc" and moved it into the rootf.cpio. Then I simulated the linux with the files downloaded from "https://github.com/litex-hub/linux-on-litex-vexriscv/files/8331338/linux_2022_03_23.zip". As you can see, some of the scripts don't work since the linux image doesn't support certain functionalities.
Could you tell me how I can solve these issues? And IsolBench can be downloaded from "https://github.com/CSL-KU/IsolBench"
Hi, everyone.
I tried to build a linux image with following commands:
Then I got a lot of errors due to "ziscr":
How can I solve this issue?