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

xv6 won't boot on MacOS qemu? #4

Open
anta40 opened this issue Oct 12, 2022 · 0 comments
Open

xv6 won't boot on MacOS qemu? #4

anta40 opened this issue Oct 12, 2022 · 0 comments

Comments

@anta40
Copy link

anta40 commented Oct 12, 2022

I'm building xv6 on MacOS Big Sur with x86_64-elf-gcc installed:

$ x86_64-elf-gcc --version
x86_64-elf-gcc (GCC) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Running make (after editing the Makefile: changed TOOLPREFIX="" to TOOLPREFIX=x86_64-elf-gcc-) yields this error:

x86_64-elf-gcc -fno-builtin -fno-pic -m32 -nostdinc -Iinclude -O -o out/bootmain.o -c kernel/bootmain.c
x86_64-elf-gcc -fno-builtin -fno-pic -m32 -nostdinc -Iinclude -o out/bootasm.o -c kernel/bootasm.S
x86_64-elf-ld -m elf_i386 -nodefaultlibs -N -e start -Ttext 0x7C00 -o out/bootblock.o out/bootasm.o out/bootmain.o
x86_64-elf-ld: Error: unable to disambiguate: -nodefaultlibs (did you mean --nodefaultlibs ?)
make: *** [out/bootblock] Error 1

So I did some modifications on Makefile. Then after running make, I got a xv6.img and fs.img
The problem is after running make qemu, xv6 won't boot. qemu stuck at print "Booting from hard disk...", and nothing happens after that. On the other side, the original xv6 can be build and works fine on Linux and MacOS.

@anta40 anta40 changed the title xv6 won't boot? xv6 won't boot on MacOS qemu? Oct 14, 2022
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