minoca / os

Minoca operating system
Other
2.71k stars 231 forks source link

Want to testing Minoca on mac directly using qemu #148

Closed willmafh closed 6 years ago

willmafh commented 6 years ago

I run the command from os/docs/qemu.txt: qemu-system-x86_64 -hda $SRCROOT/x86dbg/bin/pc.img -m 256 -vnc 0.0.0.0:0 -serial pty But sadly it didn't work. I don't have a windows environment and want to directly run minoca os using qemu in my Mac, anyone can help...Is there anything like the package in windows, then I can test it directly... The operating system is awesome, but it doesn't have enough documentations, sad...

wechatimg439

evangreen commented 6 years ago

Sorry about the lack of documentation at the moment. For the brave users only I suppose.

Based on the error you posted it looks like Qemu is complaining about the command line options "-serial pty". From my brief browsing of the documentation it looks like that's a Linux-only feature. Maybe try the pipe or chardev options?

willmafh commented 6 years ago

@evangreen Thank you for your responding...I've spent lots of time trying to boot it up on Mac, but it's still not work...I tried the chardev option, but it won't show any message in terminal. The following is my environment, can you please give me more details on how to do that... I wish I could have something like Windows' Starter Packer, then I can play with it directly ... I love the system and the codes are beautiful and clean, so I am really trying to boot it up and to play with it.

screen shot 2018-04-20 at 8 36 40 pm
evangreen commented 6 years ago

Without any details it's challenging to figure out what your issue might be. Are you still struggling with forming a proper Qemu command line? Have you tried without any serial port options? Do you see anything, like a green screen? The chardev option looks like it required additional command line arguments, what did you supply when you tried that?

willmafh commented 6 years ago

@evangreen It works now...I tried many times later, adding/removing -chardev and other options...And finally I booted it up by the simplest command: qemu-system-x86_64 pc.img...And then it shows up a green screen like in Windows, but I don't know how to turn the debugger window on...Another question is what documents/specs do you read when you write the initialization code of processor and acpi, etc... I am reading some init code...Can you give me some hints???

evangreen commented 6 years ago

That's great that you're making progress. If you don't get all the way to a command line, then it sounds like some debugging needs to be done. You can either debug by adding print statements to the screen with something like KeVideoPrintString, or you can try to get the kernel debugger working, which would be much faster, but brings you back around to getting a valid serial command line.

I can't quite remember, but I think we build a command line version of the debugger for Mac. In commos.c it looks like TCP sockets are supported. So you might be able to get a qemu TCP socket for serial with something like "-chardev socket,id=myid,port=5678,host=127.0.0.1,nodelay,server -serial chardev:myid", and then a debugger command line with "-k tcp:127.0.0.1:5678". I haven't tried these out, so they may need tweaking (let me know what works).

Processor initialization specifications can be found from the Intel manuals (I want to say it's in volume 3A somewhere?). The ACPI specification can be found online. I believe they're on version 5 or 6, but most of the new stuff isn't needed, so you can use version 3 or 4 as a mostly-complete and slightly smaller reference. The folks at osdev are also a good resource. You can try googling "\<some topic> osdev tutorial".