QEMU-PPC is working unstable and absent net.

About QEMU, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
goodbyespy
Space Cadet
Posts: 8
Joined: Sun May 20, 2018 6:19 pm

QEMU-PPC is working unstable and absent net.

Post by goodbyespy »

Hello!
I am using FreeBSD STABLE 10.4.
When I am trying to launch MAC OS 9.2.1 sometimes OS launched, but sometimes does not.
But always I got messages:

Code: Select all

Trying to write invalid spr 0 (0x000) at 00f113c0
Trying to read invalid spr 0 (0x000) at 00f113c8
Trying to write privileged spr 955 (0x3bb) at 00f164b8
Trying to write invalid spr 959 (0x3bf) at 00f16520
Trying to read invalid spr 959 (0x3bf) at 00f16528
Trying to write privileged spr 955 (0x3bb) at 00f164b8
Trying to write invalid spr 959 (0x3bf) at 00f16520
Trying to read invalid spr 959 (0x3bf) at 00f16528
Sometimes I got message:

Code: Select all

main-loop: WARNING: I/O thread spun for 1000 iterations
Also I do not get network.

I think, that I made a mistake with the command line.

Code: Select all

echo "Launcing MAC ."
qemu-system-ppc -L pc-bios -M mac99 -m 512 \
-prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -boot c \
-drive file=mac90.img,format=raw,media=disk \
-drive file=/DATA01/MAC/macos_921_ppc.iso,format=raw,media=cdrom \
-device usb-mouse -device usb-kbd \
-net nic,macaddr=08:00:53:55:4E:00 \
-net tap,vlan=0,ifname=tap0,script=no,downscript=no
Help me please with advice.

p.s. Screenshots
Image
Image
User avatar
Cat_7
Expert User
Posts: 5100
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: QEMU-PPC is working unstable and absent net.

Post by Cat_7 »

Hi,

The first set of warnings is harmless. We all get the "Trying to write ... " messages.

But it seems you are running an older Qemu. Your openbios date says March 15 2017.
Can you compile Qemu yourself?

To get networking going, I suggest you first try with user networking:
So remove:

Code: Select all

-net nic,macaddr=08:00:53:55:4E:00 \
-net tap,vlan=0,ifname=tap0,script=no,downscript=no
and add:

Code: Select all

-netdev user,id=network01 -device sungem,netdev=network01 
It might be your older build does not yet support the sungem network device. If you get a message saying the device is not supported, you would need to install the realtek8139 drivers in Mac OS. You can find them in an iso here: http://www.open.ou.nl/hsp/downloads3/Ma ... rivers.zip

Then use this as command line:

Code: Select all

-netdev user,id=network01 -device rtl8139,netdev=network01 
Best,
Cat_7
goodbyespy
Space Cadet
Posts: 8
Joined: Sun May 20, 2018 6:19 pm

Re: QEMU-PPC is working unstable and absent net.

Post by goodbyespy »

Hello!
Thank you very much Cat_7.

I have downloaded and installed drivers for the rtl8139.
But when I am using the script:

Code: Select all

# Run MAC 99 with MAC OS 9.0
echo "Launching MAC ..."
qemu-system-ppc  -M mac99 -m 256 \
-monitor tcp::62000,server,nowait \
-prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -boot c \
-drive file=mac90.img,format=raw,media=disk \
-drive file=/DATA01/MAC/MacOSRealtekDrivers.iso,format=raw,media=cdrom \
-net nic,macaddr=08:00:4D:41:43:01,model=rtl8139 \
-net tap,vlan=0,ifname=tap0,script=no,downscript=no \
-device usb-mouse -device usb-kbd
I get the next configuration:

Code: Select all

(qemu) info network
info network
hub 0
 \ hub0port1: tap.0: index=0,type=tap,ifname=tap0,script=no,downscript=no
 \ hub0port0: rtl8139.0: index=0,type=nic,model=rtl8139,macaddr=08:00:4d:41:43:01
(qemu)
and network is working.

When I am using the script:

Code: Select all

# Run MAC 99 with MAC OS 9.0
echo "Launching MAC ..."
qemu-system-ppc -L pc-bios -M mac99 -m 256 \
-monitor tcp::62000,server,nowait \
-prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -boot c \
-drive file=mac90.img,format=raw,media=disk \
-drive file=/DATA01/MAC/MacOSRealtekDrivers.iso,format=raw,media=cdrom \
-device rtl8139,id=network01 \
-netdev tap,id=network01,ifname=tap0,script=no,downscript=no \
-device usb-mouse -device usb-kbd
I get the next configuration:

Code: Select all

(qemu) info network
info network
network01: index=0,type=tap,ifname=tap0,script=no,downscript=no
network01: index=0,type=nic,model=rtl8139,macaddr=52:54:00:12:34:56
(qemu)
and net is not working.

I do not know how make hub ports with devices tap and rtl in a new syntax.

Can anybody advise me with
How make hub ports in a new syntax?

Thanks.
p.s. screenshot with the older syntax
Image
User avatar
Cat_7
Expert User
Posts: 5100
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: QEMU-PPC is working unstable and absent net.

Post by Cat_7 »

Is this not enough? Does the tap device get created without scripts?

-netdev tap,id=network01,script=no,downscript=no \
-device rtl8139,netdev=network01 \

Best,
Cat_7
goodbyespy
Space Cadet
Posts: 8
Joined: Sun May 20, 2018 6:19 pm

Re: QEMU-PPC is working unstable and absent net.

Post by goodbyespy »

Hi!
Well, I am using tap device with another simulators, SimH for example, so I create it other script:

Code: Select all

# Script to create tap0 device for emulators.
# ------------------------------------------
echo "Creating tap0 ..."
ifconfig tap0 create
sleep 3
echo "Creating bridge0 ..."
ifconfig bridge0 create
sleep 3
echo "Configuring bridge0 ..."
ifconfig bridge0 addm em0 addm tap0
sleep 3
echo "Upping tap0 and bridge0 ..."
ifconfig bridge0 up
sleep 2
ifconfig tap0 up
# -----------------------------------------
Thanks,
Oleg
User avatar
Cat_7
Expert User
Posts: 5100
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: QEMU-PPC is working unstable and absent net.

Post by Cat_7 »

Hi,

I'm sorry but my knowledge about qemu networking doesn't reach that far.
And my fedora host doesn't behave like your host.

Best,
Cat_7
User avatar
mabam
Master Emulator
Posts: 322
Joined: Wed Apr 10, 2013 9:32 am

Re: QEMU-PPC is working unstable and absent net.

Post by mabam »

goodbyespy wrote:I do not know how make hub ports with devices tap and rtl in a new syntax
Cat_7 wrote:Is this not enough? Does the tap device get created without scripts?

-netdev tap,id=network01,script=no,downscript=no \
-device rtl8139,netdev=network01 \
I'm not sure I really understand the question. But if this is about using (up)script and downscript, possibly the following could be of help:
https://emaculation.com/forum/viewtopic ... 314#p56752
http://drupal.bitfunnel.net/drupal/macosx-bridge-qemu

I'm sorry in case this answer is "off". I don't know much about networking either.
mcayland
Granny Smith
Posts: 111
Joined: Sun Nov 01, 2015 10:33 pm

Re: QEMU-PPC is working unstable and absent net.

Post by mcayland »

goodbyespy wrote:Hello!
Thank you very much Cat_7.

I have downloaded and installed drivers for the rtl8139.
But when I am using the script:

Code: Select all

# Run MAC 99 with MAC OS 9.0
echo "Launching MAC ..."
qemu-system-ppc  -M mac99 -m 256 \
-monitor tcp::62000,server,nowait \
-prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -boot c \
-drive file=mac90.img,format=raw,media=disk \
-drive file=/DATA01/MAC/MacOSRealtekDrivers.iso,format=raw,media=cdrom \
-net nic,macaddr=08:00:4D:41:43:01,model=rtl8139 \
-net tap,vlan=0,ifname=tap0,script=no,downscript=no \
-device usb-mouse -device usb-kbd
I get the next configuration:

Code: Select all

(qemu) info network
info network
hub 0
 \ hub0port1: tap.0: index=0,type=tap,ifname=tap0,script=no,downscript=no
 \ hub0port0: rtl8139.0: index=0,type=nic,model=rtl8139,macaddr=08:00:4d:41:43:01
(qemu)
and network is working.

When I am using the script:

Code: Select all

# Run MAC 99 with MAC OS 9.0
echo "Launching MAC ..."
qemu-system-ppc -L pc-bios -M mac99 -m 256 \
-monitor tcp::62000,server,nowait \
-prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -boot c \
-drive file=mac90.img,format=raw,media=disk \
-drive file=/DATA01/MAC/MacOSRealtekDrivers.iso,format=raw,media=cdrom \
-device rtl8139,id=network01 \
-netdev tap,id=network01,ifname=tap0,script=no,downscript=no \
-device usb-mouse -device usb-kbd
I get the next configuration:

Code: Select all

(qemu) info network
info network
network01: index=0,type=tap,ifname=tap0,script=no,downscript=no
network01: index=0,type=nic,model=rtl8139,macaddr=52:54:00:12:34:56
(qemu)
and net is not working.

I do not know how make hub ports with devices tap and rtl in a new syntax.

Can anybody advise me with
How make hub ports in a new syntax?
FWIW -net nic with vlan has been deprecated for a while and will be removed in the upcoming QEMU 3.0 release so instead you'll need to use -netdev hubport as indicated in the patch to remove -net nic with vlan here: https://lists.gnu.org/archive/html/qemu ... 05449.html
goodbyespy
Space Cadet
Posts: 8
Joined: Sun May 20, 2018 6:19 pm

Re: QEMU-PPC is working unstable and absent net.

Post by goodbyespy »

Hi!
I am trying to use a new syntax, but I do not know how

Code: Select all

-netdev id=network01,type=hubport,hubid=0 \
-device rtl8139,id=network01,mac=08:00:4D:41:43:01,vlan=0 \
-netdev tap,id=network02,ifname=tap0,script=no,downscript=no
in the qemu monitor

Code: Select all

QEMU 2.9.0 monitor - type 'help' for more information
(qemu) info network
info network
hub 0
 \ network01: network01: index=0,type=nic,model=rtl8139,macaddr=08:00:4d:41:43:01
network02: index=0,type=tap,ifname=tap0,script=no,downscript=no
(qemu)
How can I connect a tap device to the hubport?

Manual is a very short and without examples.

Thanks for the help.
mcayland
Granny Smith
Posts: 111
Joined: Sun Nov 01, 2015 10:33 pm

Re: QEMU-PPC is working unstable and absent net.

Post by mcayland »

goodbyespy wrote:

Code: Select all

# Run MAC 99 with MAC OS 9.0
echo "Launching MAC ..."
qemu-system-ppc -L pc-bios -M mac99 -m 256 \
-monitor tcp::62000,server,nowait \
-prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -boot c \
-drive file=mac90.img,format=raw,media=disk \
-drive file=/DATA01/MAC/MacOSRealtekDrivers.iso,format=raw,media=cdrom \
-device rtl8139,id=network01 \
-netdev tap,id=network01,ifname=tap0,script=no,downscript=no \
-device usb-mouse -device usb-kbd
Ah wait I think I see it - you don't need a hubport at all, there is just a simple mistake in the section above: you've accidentally used -id for rtl8139 which sets the id, whereas instead you need to bind it to the netdev e.g.

Code: Select all

# Run MAC 99 with MAC OS 9.0
echo "Launching MAC ..."
qemu-system-ppc -L pc-bios -M mac99 -m 256 \
-monitor tcp::62000,server,nowait \
-prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -boot c \
-drive file=mac90.img,format=raw,media=disk \
-drive file=/DATA01/MAC/MacOSRealtekDrivers.iso,format=raw,media=cdrom \
-device rtl8139,netdev=network01 \
-netdev tap,id=network01,ifname=tap0,script=no,downscript=no \
-device usb-mouse -device usb-kbd
goodbyespy
Space Cadet
Posts: 8
Joined: Sun May 20, 2018 6:19 pm

Re: QEMU-PPC is working unstable and absent net.

Post by goodbyespy »

Hi!

Thanks so much Mcayland!

Now, I am using a new syntax.

Code: Select all

# Run MAC 99 with MAC OS 9.0
echo "Launching MAC ..."
qemu-system-ppc -L pc-bios -M mac99 -m 256 \
-monitor tcp::62000,server,nowait \
-prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -boot c \
-drive file=mac90.img,format=raw,media=disk \
-drive file=/DATA01/MAC/MacOSRealtekDrivers.iso,format=raw,media=cdrom \
-device rtl8139,netdev=network01,mac=08:00:4D:41:43:01 \
-netdev tap,id=network01,ifname=tap0,script=no,downscript=no \
-device usb-mouse -device usb-kbd
Issue with network solved.
Post Reply