-nographic and -daemonize wrt qemu-system-sparc
A message that is not in the archive (sent off-list or not yet received): [email protected]
[Replying to a very old email which I missed initially]
Todd, do you still have the issue you describe?
I mean, not that we changed lots in that area (I guess we changed nothing there), but i'm not sure I understand what is going on there, and why the behavour changed the way you describe. I guess there's some other bug somewhere which you see now.
Thanks,
/mjt
Quoted 91 lines · Todd T. Fries
So I'm having problems that I believe I've traced back to the commit
ab51b1d568e02c80b1abf9016bda3a86dc1db389on qemu-system-sparc.Specifically, the commit states that:
-nographic
is equivalent to (replacing the 'null' with 'none'):
-serial none -parallel none -monitor none -display none -vga none
However on qemu-system-sparc this is not the case.
Something about '-nographic -daemonize' works on qemu 1.3.1 to permit further specifying the serial port elsewhere (unix: or tcp: for example).
By 'works' I mean to say if you do this:
(cd53.iso is a 3.6M file)
wget http://ftp3.usa.openbsd.org/pub/OpenBSD/snapshots/sparc/cd53.iso
qemu-system-sparc -cdrom cd53.iso -boot dit works, as well as this:
qemu-system-sparc -cdrom cd53.iso -boot d -nographic -serial unix:./test.unix,server,nowait
Output looks like this:
Configuration device id QEMU version 1 machine id 32
CPUs: 1 x FMI,MB86904
UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.0 built on Aug 19 2012 13:36
Type 'help' for detailed information
Trying cdrom:d...
Not a bootable ELF image
Loading a.out image...
Loaded 66648 bytes
entry point is0x4000
bootpath: /iommu/sbus/espdma/esp/sd@2,0:dJumping to entry point 00004000 for type 00000005... switching to new context:
Quoted 1 line
Quoted 1 line
OpenBSD BOOT 2.6
Booting bsd
Loading at physical address 400000The problem occurs when I try to daemonize the same scenario.
So I should be able to do this:
qemu-system-sparc -cdrom cd53.iso -boot d -serial unix:./test.unix,server,nowait -parallel none -monitor none -display none -vga none
However, all I get is the following for output:
Configuration device id QEMU version 1 machine id 32
CPUs: 1 x FMI,MB86904
UUID: 00000000-0000-0000-0000-000000000000 Not a bootable ELF image
Loading a.out image...
Loaded 66648 bytes
entry point is0x4000
bootpath: /iommu/sbus/espdma/esp/sd@2,0:dJumping to entry point 00004000 for type 00000005... switching to new context:
Something is making it not continue after jumping to the newly loaded boot file..
I tried dropping '-vga none' and I see no changes (still not continuing). I tried dropping '-parallel none' and I see no changes (still not continuing).
If I drop '-display none' it 'works' but displays to graphics instead of serial which I would prefer.
If I add '-daemonize' it works just forks in the background, still opening an X terminal.
I can add '-vnc :3' but it obviously doesn't change things back to serial, just makes it so I can start it without an X display.
On qemu 1.3.1 I can add '-nographic' after '-daemonize' and it forks into the background, and works great for a serial console only simulate sparc.
Using the current git tree, qemu I am greeted with:
-nographic can not be used with -daemonizeWhat should I do to get the 1.3.1 behavior back?
Thanks,
Quoted 9 lines · Michael Tokarev
[Replying to a very old email which I missed initially]
Todd, do you still have the issue you describe?
I mean, not that we changed lots in that area (I guess we changed nothing there), but i'm not sure I understand what is going on there, and why the behavour changed the way you describe. I guess there's some other bug somewhere which you see now.
Hm. So I finally see the issue here, after I started messing with displays in qemu.
Quoted 8 lines
Quoted 7 lines · Todd T. Fries
So I'm having problems that I believe I've traced back to the commit
ab51b1d568e02c80b1abf9016bda3a86dc1db389on qemu-system-sparc.Specifically, the commit states that:
-nographic
Quoted 8 lines
Quoted 8 lines
is equivalent to (replacing the 'null' with 'none'):
-serial none -parallel none -monitor none -display none -vga none
However on qemu-system-sparc this is not the case.
Something about '-nographic -daemonize' works on qemu 1.3.1 to permit further specifying the serial port elsewhere (unix: or tcp: for example).
This is because of the following code:
hw/sparc/sun4m.c:sun4m_hw_init():
slavio_serial_ms_kbd_init(hwdef->ms_kb_base, slavio_irq[14],
display_type == DT_NOGRAPHIC, ESCC_CLOCK, 1);where 3rd arg for slavio_serial_ms_kbd_init() is `disabled'.
So without -nographic, the sun serial port becomes disabled and obviously does not work.
So apparently we have other uses of -nographic in the code. Another are 2 referenses in qemu-char.c:
qemu-char.c: stdio_allow_signal = display_type != DT_NOGRAPHIC;
qemu-char.c- backend->stdio->signal =qemu-char.c: qemu_opt_get_bool(opts, "signal", display_type != DT_NOGRAPHIC);
So we need to fix these too.
Should it be switched to display=none? Or alternatively, we have this in qemu-char.c already:
qemu-char.c: if (is_daemonized()) {
qemu-char.c: error_report("cannot use stdio with -daemonize");so maybe tie it to is_daemonized() ?
If -nographic is legacy, what are the alternatives to the above usages of it?
Thanks,
/mjt