-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Stuck when compiling on m1 chip mac os #76
Comments
I'm running Arch Linux with an amd64 laptop but meet the same problem. |
I have met the same problem with |
What worked for me was to pull the source for Qemu 4.2.1 and compile. I put this 4.2.1 version qemu-system-riscv64 in my path before the system version so it would be preferred. What I am unsure of is if a later version of Qemu would work, but this atleast let me boot from make qemu. Maybe someone with a faster rig could try newer versions to see if one of them will also suffice. Another strange thing which I am unsure if this is a generic risc-v/qemu issue or not but I cannot seem to get it to launch a graphics window like the x86_64 version does regardless of the version. Maybe someone more knowledgable can comment. |
@VitalyAnkh My OS info
Here is how to downgrade qemu and qemu-arch-extra
When asking you which version to downgrade, choose: |
@Taowyoo Thanks! This makes us run the tutorial smoothly, but I wonder how could we port xv6 to the latest qemu? I think it’s worthing doing. |
@VitalyAnkh Line 49 in 077323a
I am new to RISC-V and xv6 also qemu. But I will continue learning and working on this problem |
Nice catch. I tried debugging as well and I am also getting caught on mret but inside the timervec routine instead... when using QEMU 6.0.0 on Arch. I can send an interrupt signal and it will reloop back and get caught on the mret again. Line 121 in 077323a
|
This comment has been minimized.
This comment has been minimized.
This problem should be fixed by #62 |
I am trying to compile on Mac running Big Sur 11.2.3 and getting Any idea how to get around this. Any help is appreciated. |
This article may help you, but applies to qemu5.1.0 and xv6 os run well. |
I ran into the same problem. |
Two patches added to qemu-5.10.0 and it works! |
Solution: (Steps 2-5 have to be made on Ubuntu)
|
Hi @Taowyoo @Virtual-Machine, I got the same problem but did know how to debug on qemu, especially at the time of os booting. :/ Could I ask how did you debug this scenario? |
@u2386 to debug OS boot you can use the provided "make qemu-gdb" which should start up xv6 in qemu waiting for a gdb session to connect. If you then run gdb in another shell you can have it connect to the OS waiting in qemu. From there you should be able to set breakpoints, jump, read, inspect the OS as it boots up etc. Reviewing the Makefile should be helpful to see how it does this via command line flags. Also of relevance see the .gdbinit file: |
perfect answer.I used to know run |
Try to boot with riscv64-unknown-elf-gcc (g2ee5e430018-dirty) 12.2.0 and met the same problem. |
I was able to run xv6-x86 on my m1 mac running ubuntu arm64. Perform the following steps:
|
Hey, I'm also using M1 and a virtual Ubuntu ARM64 using UTM. How do I find the directory you mentioned at the third line? |
By directory I mean the location where you have downloaded the files of xv6. When you type |
Thanks. I'm getting the following error after running make TOLLPREFIX. Any ideas on how to solve it? `make TOLLPREFIX=i686-linux-gnu- *** Error: Couldn't find an i386--elf version of GCC/binutils. gcc -fno-pic -static -fno-builtin -fno-strict-aliasing -O2 -Wall -MD -ggdb -m32 -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie -no-pie -fno-pic -O -nostdinc -I. -c bootmain.c |
To run xv6, you need qemu. Do you have it installed> |
Thanks, but there's a crucial typo in your answer, it is TOOLPREFIX not TOLLPREFIX. Here's a corrected answer:
|
I was on Ubuntu 22.04.4 LTS with QEMU 6 and had the same issue. Using #62 solves the problem. After upgrading to Ubuntu 24.04.1 LTS and QEMU 8, this issue has also been resolved.
|
I use brew install RISC-V toolchain on m1 mac os, and
make qemu
it prints:
then seems like stuck.
The text was updated successfully, but these errors were encountered: