[syslinux] The simple menu system doesn't work with serial console

Geert Stappers stappers at stappers.nl
Wed Nov 1 11:10:38 PST 2006


Op 30-10-2006 om 08:57 schreef hiranotaka at zng.info:
> 2006/10/30, hiranotaka at zng.info <hiranotaka at zng.info>:
> > Hello,
> >
> > I have just get started using pxelinux, and encountered a problem.
> > The document says the simple menu system supports serial console,
> > and it works on syslinux 0.2x, but it doesn't seem to work in 0.3x and 0.4x.
> > I confirmed that this patch fixed the bug.
> >
> > *** com32/lib/sys/xserial_write.c~      2006-10-30 08:30:35.000000000 +0900
> > --- com32/lib/sys/xserial_write.c       2006-10-30 08:31:30.000000000 +0900
> > ***************
> > *** 43,49 ****
> >   {
> >     static com32sys_t ireg;     /* Zeroed with the BSS */
> >
> > !   ireg.eax.w[0] = 0x0400 | (unsigned char)ch;
> >
> >     __intcall(0x21, &ireg, NULL);
> >   }
> > --- 43,50 ----
> >   {
> >     static com32sys_t ireg;     /* Zeroed with the BSS */
> >
> > !   ireg.eax.b[1] = 0x04;
> > !   ireg.edx.b[0] = ch;
> >
> >     __intcall(0x21, &ireg, NULL);
> >   }
> >

As unified diff

--- a/com32/lib/sys/xserial_write.c
+++ b/com32/lib/sys/xserial_write.c
@@ -43,7 +43,8 @@ static void emit(char ch)
 {
   static com32sys_t ireg;      /* Zeroed with the BSS */

-  ireg.eax.w[0] = 0x0400 | (unsigned char)ch;
+  ireg.eax.b[1] = 0x04;
+  ireg.edx.b[0] = ch;

   __intcall(0x21, &ireg, NULL);
 }


As I see that, it will work on _all_ compilers.

> Oops, not 0.2x, 0.3x and 0.4x, but 3.2x, 3.3x, 3.4x.

Please reply below the text.
(mind the readers of the archive)


Cheers
Geert Stappers




More information about the Syslinux mailing list