Folks, First, let me thank everyone involved for making QEMU available on the Solaris platform. It''s turning out to be really handy.... Here at work we''re required to use GroupWise calendaring (at least for the time being), and I''m trying to get a bit more organized, so thought I''d start (again) using a Palm handheld to take my calendar, etc. with me. The new Palm''s all come with USB, so I was disappointed to see no apparent way for a guest OS to talk to a host USB port. USB is experimental on Linux only, I''ve read. Fortunately, serial port access appears to be well developed, and one can get an add-on serial cable for modern Palm''s. However, the serial code evidently was not compiled in to the currently-available packages in the OpenSolaris QEMU downloads area. Being the impatient sort, I took a look, then rearranged some "#if" statements, and got it to compile in my Solaris-10U3 environment. The resulting QEMU works fine for connecting to a real tty; I was able to sync my old RS232 Palm III with the Palm Desktop app running on a guest Windows 98 VM. Baud rate appears to change when apps on the guest change settings, so things are definitely connected in a useful way. The patch is a little sloppy in that I didn''t test the pty option, which is also now "live" in the Solaris QEMU, but it meets my needs for the moment, and I''ll submit the patch shortly to qemu-devel so they can make of it what they will. Regards, Marion
Marion Hakanson
2007-Jun-20 02:32 UTC
[qemu-discuss] Re: patch enabling serial (tty) support
Hmm, the patch was in an attachment, and it came to me via the list intact, but there''s no such attachment visible here. I''ll try the cut-and- paste approach, below. I''ve also done a "file attachment" via the browser interface to the list; Whitespace is probably better preserved within the attachment above. Suspenders and a belt. Marion ====================================================--- ./vl.c.0 Sun Jun 10 12:21:04 2007 +++ ./vl.c Sun Jun 17 16:16:15 2007 @@ -1761,7 +1761,7 @@ return chr; } -#if defined(__linux__) +#if defined(__linux__) || defined(__sun__) static CharDriverState *qemu_chr_open_pty(void) { struct termios tty; @@ -1768,10 +1768,12 @@ char slave_name[1024]; int master_fd, slave_fd; +#if defined(__linux__) /* Not satisfying */ if (openpty(&master_fd, &slave_fd, slave_name, NULL, NULL) < 0) { return NULL; } +#endif /* Disabling local echo and line-buffered output */ tcgetattr (master_fd, &tty); @@ -1919,6 +1921,7 @@ return chr; } +#if defined(__linux__) typedef struct { int fd; int mode; @@ -2061,8 +2064,9 @@ return chr; } +#endif /* __linux__ */ -#else +#else /*! __linux__ && ! __sun__ */ static CharDriverState *qemu_chr_open_pty(void) { return NULL; @@ -2951,11 +2955,11 @@ } else if (!strcmp(filename, "stdio")) { return qemu_chr_open_stdio(); } else -#endif #if defined(__linux__) if (strstart(filename, "/dev/parport", NULL)) { return qemu_chr_open_pp(filename); } else +#endif if (strstart(filename, "/dev/", NULL)) { return qemu_chr_open_tty(filename); } else =====================================================-- This message posted from opensolaris.org -------------- next part -------------- A non-text attachment was scrubbed... Name: qemu.patch Type: application/octet-stream Size: 1281 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/qemu-discuss/attachments/20070619/e7b214bd/attachment.obj>