[syslinux] syslinux vs isolinux - com32 serial port output problem

Geert Stappers stappers at stappers.nl
Thu May 12 14:05:26 PDT 2016


On Thu, May 12, 2016 at 06:14:31PM +0000, Janz, Burt via Syslinux wrote:
> On Thu, May 12, 2016 at 07:45:08PM +0200, Geert Stappers via Syslinux wrote:
> >
> > Tell more about the code that was added.  How it was build.
> >
> >
> > Not that I have profound knowledge of Syslinux code base,
> > but thing I can tell is that sharing which function call was used,
> > will help.
> >
> > What I guess that is wrong, is mixing modules from different builds.
> >
> 
> Hi Geert,

Hello Mailinglist,


> I'm building syslinux 6.04 from scratch to prevent any issues with
> mismatched com32 modules.  This gives me a "pure" set of modules as
> well as "pure" isolinux and syslinux cores.
> 
> menu.c32 works perfectly on both the USB and CD boot media: I can
> move around the menu and select the command that I wish to use.
> In all cases, both the USB and CD boot properly into the Linux
> kernel.  I cannot plug both a USB and CD into this system at the
> same time, so I'm quite sure that I'm booting from the correct media.
> For that matter, the BIOS even says "Boot from CD" and displays the
> isolinux-debug.bin messages before the menu appears - but only when
> booting from CD.
> 
> The problem manifests itself as a failure to send characters to COM2
> only when booting the CD.
> 
> If you look inside com32/menu/menumain.c right near the bottom of the
> file, you'll see "if (cmdline)" IIUC that's where the fully formatted
> command line is handed off from the menu to "execute()".  I added a
> "send_rdu_message()" function directly before "if (cmdline)".

--- a/com32/menu/menumain.c
+++ b/com32/menu/menumain.c
@@ -1151,6 +1151,8 @@ int main(int argc, char *argv[])
        local_cursor_enable(false);
        printf("\033[?25h\033[%d;1H\033[0m", END_ROW);
 
+       send_rdu_message();
+
        if (cmdline) {
            uint32_t type = parse_image_type(cmdline);
 

> My "send_rdu_message()" sets up the serial port (loads the speed
> divisor, enables the port, etc) and then pumps characters one at a time
> to the serial port (via "outb(ch,COM2+THR)". 

Acknowledge.   (so no "printf" function from Syslinux )

> This works properly when I boot the system from the USB drive.
> 
> Since I'm using the same menu.c32 file on both USB and CD, there should
> be no difference: I should see the characters on COM2 whether booting
> USB or CD.

Yep, but if it was, we wouldn't have this email thread  :-/


> So my question is this: is there something operationally different in
> the way isolinux.asm calls menu.c32? And could this be at the core of
> my problem?

I don't known.
I wonder if CDROM-drive interrupt is on the same IRQ as COM2?


Groeten
Geert Stappers
-- 
Leven en laten leven


More information about the Syslinux mailing list