I'm trying to run a RISCV Linux system in QEMU, following the official steps for it, here: https://risc-v-getting-started-guide.readthedocs.io/en/latest/linux-qemu.html
My problem starts where most people's problem starts, in the
cd linux
git checkout v5.4.0
make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- defconfig
With that, I found the official toolchain for compiling, https://github.com/riscv-collab/riscv-gnu-toolchain.
I've setup my path to include /opt/riscv as suggested, I have all the dependencies listed, and ran ./configure --prefix=/opt/riscv
successfully.
When running sudo make -j linux
(running without sudo only throws permission errors), it seems to work normally, but after a few seconds it starts closing all my windows and then my session. I have to log back in and there's nothing. I can't tell whether it's crashing my user session or simply logging me out. I believe it's the first since there's no point in a make action closing windows just because.
The problem is I don't know where to start debugging, or what I could be doing wrong, so I don't have enough information to know if it's worth opening an issue in the repo.
The only part where my flow deviates from the steps in the guide is when it says to checkout the 5.0.0 branch in the linux folder, because there's only the 5.0 branch, but I doubt that's it since I still haven't gotten to the kernel compilation part.
My system: HP 15 laptop, Ryzen 5 5500U, 8gb ram. Running Debian 11 Bullseye, kernel 5.10.0-23-amd64
I've been reading other posts in here and Github, but haven't had any luck. I've tried re-doing the process from scratch. I haven't gotten my Linux Mint desktop back but I still have to try the workflow there.