Hello, Rob,

This mail might be too late, but I want to report you that I
encountered similar trouble.

Using the linux kernel after the following commit, the qemu-sh
serial console shows no output.

  cd5f107628ab89c5dec5ad923f1c27f4cba41972

This trouble was discussed in sh-linux ML.

  http://marc.info/?l=linux-sh&m=127183863325672&w=2

To avoid this,

  - add "earlyprintk=sh-sci.1" to kernel command line, and
  - modify CONFIG_SERIAL_SH_SCI_NR_UARTS valud from 1 to 2,

in kernel configuration menu.

I hope that this is the trouble you see.

Regards,
Shin-ichiro KAWASAKI


(2010/03/15 9:08), Rob Landley wrote:
On Sunday 14 March 2010 16:28:32 Aurelien Jarno wrote:
On Sat, Mar 13, 2010 at 05:11:43PM -0600, Rob Landley wrote:
I found out that "-serial stdio" is apparently trying to open /dev/stdio,
which Ubuntu 9.04 hasn't got.  If I say -serial /dev/tty it works from
the command line (but not in scripts).

This is actually not specific at all to sh4. See this thread:
http://www.mail-archive.com/qemu-devel@nongnu.org/msg20920.html

http://www.mail-archive.com/qemu-devel@nongnu.org/msg22763.html

This is redundant.  -nographic implies -serial stdio.

Trying with just -nographic and no -serial lines, I get:

$ qemu-system-sh4 -M r2d -nographic -no-reboot -kernel zImage-sh4 -hda image-
sh4.sqf -append "root=/dev/sda rw init=/usr/sbin/init.sh panic=1 PATH=/usr/bin
console=ttySC0 noiotrap HOST=sh4"
long read to SH7750_WCR1_A7 (0x000000001f800008) ignored
long read to SH7750_WCR2_A7 (0x000000001f80000c) ignored
long read to SH7750_WCR3_A7 (0x000000001f800010) ignored
long read to SH7750_MCR_A7 (0x000000001f800014) ignored
long read to SH7750_MCR_A7 (0x000000001f800014) ignored

And it hangs.  No output from any of the kernel serial writes.

http://www.mail-archive.com/qemu-devel@nongnu.org/msg22775.html

    eg this should work as you'd expect it

      qemu -nodefaults -nographic -serial stdio

-nographic is basically equivalent to -serial mon:stdio,signal=on -vga none
except it operates on defaults. Your invocation actually ends up being very
different as it doesn't multiplex the monitor and it doesn't disable ctrl-c.
Basically, your invocation is equivalent to qemu -vga none -serial stdio

http://www.mail-archive.com/qemu-devel@nongnu.org/msg22775.html

$ qemu-system-sh4 -M r2d -nographic -no-reboot -kernel zImage-sh4 -hda image-
sh4.sqf -append "root=/dev/sda rw init=/usr/sbin/init.sh panic=1 PATH=/usr/bin
console=ttySC0 noiotrap HOST=sh4"  -vga none -serial stdio
chardev: opening backend "stdio" failed
qemu: could not open serial device 'stdio': Inappropriate ioctl for device

http://www.mail-archive.com/qemu-devel@nongnu.org/msg22777.html

$ qemu-system-sh4 -M r2d -nodefaults -nographic -serial stdio -no-reboot -
kernel zImage-sh4 -hda image-sh4.sqf -append "root=/dev/sda rw
init=/usr/sbin/init.sh panic=1 PATH=/usr/bin console=ttySC0 noiotrap HOST=sh4"
long read to SH7750_WCR1_A7 (0x000000001f800008) ignored
long read to SH7750_WCR2_A7 (0x000000001f80000c) ignored
long read to SH7750_WCR3_A7 (0x000000001f800010) ignored
long read to SH7750_MCR_A7 (0x000000001f800014) ignored
long read to SH7750_MCR_A7 (0x000000001f800014) ignored

And the hang's back, no output...

Ok, this seems to work:

qemu-system-sh4 -M r2d -nodefaults -nographic -serial null -serial stdio -no-
reboot -kernel zImage-sh4 -hda image-sh4.sqf -append "root=/dev/sda rw
init=/usr/sbin/init.sh panic=1 PATH=/usr/bin console=ttySC0 noiotrap HOST=sh4"

I no longer even pretend to know why...

Do I have to say "-nodefaults" on every other target as well to disable the
unwanted monitor I never knew was there?

Rob


Reply via email to