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

Boot RISC-V Linux Failed, ERROR: Invalid opcode: 30529073 at PC: 8040016c #25

Open
RonxBulld opened this issue Oct 3, 2023 · 0 comments

Comments

@RonxBulld
Copy link

RonxBulld commented Oct 3, 2023

I assembly riscv-gnu-toolchain, riscv-linux-boot, riscv-linux-prebuilt and biriscv in one path, and run script such as:

#!/bin/sh

set -ex

RISCV_ROOT=`pwd`/riscv
if [ -d $RISCV_ROOT/tools ]; then
	echo $RISCV_ROOT/tools
else
	cd $RISCV_ROOT/riscv-gnu-toolchain
	git clean -fx -d
	git checkout .
	./configure --prefix=$RISCV_ROOT/tools --with-arch=rv32imzicsr
	make -j12
fi

export PATH=$PATH:$RISCV_ROOT/tools/bin

cd $RISCV_ROOT/riscv-linux-boot
make LINUX_DIR=../riscv-linux-prebuilt VMLINUX=../riscv-linux-prebuilt/kernel/vmlinux-rv32ima-5.0 DTS_FILE=../riscv-linux-prebuilt/dts/config32.dts

cd $RISCV_ROOT/biriscv/tb/tb_core_icarus
make clean
ELF_FILE=/home/uuz/riscv/riscv-linux-boot/riscv-linux-boot.elf make VERBOSE=1 run

vvp output the "RISC-V Linux Boot" LOGO:
| __ \|_ _|/ ____|/ ____| \ \ / / | | (_) | _ \ | | | |__) | | | | (___ | | _____\ \ / / | | _ _ __ _ ___ __ | |_) | ___ ___ | |_ | _ / | | \___ \| | |______\ \/ / | | | | '_ \| | | \ \/ / | _ < / _ \ / _ \| __| | | \ \ _| |_ ____) | |____ \ / | |____| | | | | |_| |> < | |_) | (_) | (_) | |_ |_| \_\_____|_____/ \_____| \/ |______|_|_| |_|\__,_/_/\_\ |____/ \___/ \___/ \__|
And then, report the error message:
ERROR: Invalid opcode: 30529073
at PC: 8040016c
ASSERT: ASSERT !"error" :0x109
How to solve this problem? Thanks everyone.

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

1 participant