<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.3">
</HEAD>
<BODY>
Hi Kevin,<BR>
<BR>
Fixed the error on the linker, but now i got another error which i don't understand, can you help me ?<BR>
<BR>
make<BR>
  Compiling whole program out/ccode.16.s<BR>
  Compiling (16bit) out/code16.o<BR>
  Compiling whole program out/ccode32flat.o<BR>
  Building ld scripts (version "pre-0.6.2-20110115_181202-mbertens-desktop")<BR>
Fixed space: 0xe05b-0x10000  total: 8101  slack: 15  Percent slack: 0.2%<BR>
16bit size:           37904<BR>
32bit segmented size: 2217<BR>
32bit flat size:      14007<BR>
32bit flat init size: 38848<BR>
Traceback (most recent call last):<BR>
  File "./tools/layoutrom.py", line 579, in <module><BR>
    main()<BR>
  File "./tools/layoutrom.py", line 576, in main<BR>
    writeLinkerScripts(sections, entrysym, genreloc, out16, out32seg, out32flat)<BR>
  File "./tools/layoutrom.py", line 257, in writeLinkerScripts<BR>
    + COMMONTRAILER)<BR>
TypeError: %x format: a number is required, not NoneType<BR>
make: *** [out/romlayout16.lds] Error 1<BR>
<BR>
Regards,<BR>
<BR>
Marc <BR>
<BR>
<BR>
-----Original Message-----<BR>
<B>From</B>: Marc Bertens <<A HREF="mailto:Marc%20Bertens%20%3cmbertens@xs4all.nl%3e">mbertens@xs4all.nl</A>><BR>
<B>To</B>: Kevin O'Connor <<A HREF="mailto:Kevin%20O'Connor%20%3ckevin@koconnor.net%3e">kevin@koconnor.net</A>><BR>
<B>Cc</B>: <A HREF="mailto:seabios@seabios.org">seabios@seabios.org</A><BR>
<B>Subject</B>: [SeaBIOS] Question about linker building seabios<BR>
<B>Date</B>: Sat, 15 Jan 2011 10:56:43 +0100<BR>
<BR>
<PRE>
Hi Kevin,

I'm adding a VT100 serial console to the seabios code. 
Which can be set to port COM1 or COM2. 
I added the interrupt vector in the serial_setup() routine. 
And made the interrupt service routine. The compiling goes 
fine, no problems there. But in the linking stage an error 
is reported to the line of the interrupt service routine: 

make
  Compiling whole program out/ccode.16.s
  Compiling (16bit) out/code16.o
  Compiling whole program out/ccode32flat.o
  Building ld scripts (version "pre-0.6.2-20110115_103541-mbertens-desktop")
Fixed space: 0xe05b-0x10000  total: 8101  slack: 15  Percent slack: 0.2%
16bit size:           37264
32bit segmented size: 2217
32bit flat size:      14007
32bit flat init size: 38848
  Linking out/rom16.o
  Stripping out/rom16.strip.o
  Linking out/rom32seg.o
  Stripping out/rom32seg.strip.o
  Linking out/rom.o
`.discard.func16.src/serial.c.261' referenced in section `.text.init_hw.54839' of out/code32flat.o: defined in discarded section `.discard.func16.src/serial.c.261' of out/code32flat.o
make: *** [out/rom.o] Error 1

Can you tell me what i'm doing wrong or missing to do?

Below here are the code snippets:
</PRE>
<TT>    // INT(3/4)h : Serial Hardware Service Entry Point (for keyboard handling)</TT><BR>
<TT>    void VISIBLE16 handle_console_serial( void )</TT><BR>
<TT>    {</TT><BR>
<TT>        ...    // my code</TT><BR>
<TT>        ...</TT><BR>
<TT>    done:</TT><BR>
<TT>        eoi_pic1();</TT><BR>
<TT>    }</TT><BR>
<BR>
<BR>
<TT>    void</TT><BR>
<TT>    serial_setup(void)</TT><BR>
<TT>    {</TT><BR>
<TT>        ...  // orginal code</TT><BR>
<TT>    </TT><BR>
<TT>        ...</TT><BR>
<TT>        #if CONFIG_KEYBOARD_SERIAL</TT><BR>
<TT>            con_addr = GET_BDA( port_com[ CONFIG_KEYBOARD_SERIAL - 1 ] );</TT><BR>
<TT>            dprintf( 3, "keyboard on serial port %x\n", con_addr ); </TT><BR>
<TT>        # if CONFIG_KEYBOARD_SERIAL == 1 || CONFIG_KEYBOARD_SERIAL == 3 </TT><BR>
<TT>            enable_hwirq( 4, FUNC16( handle_console_serial ) );</TT><BR>
<TT>        # else</TT><BR>
<TT>            enable_hwirq( 3, FUNC16( handle_console_serial ) );</TT><BR>
<TT>        # endif</TT><BR>
<TT>        #endif</TT><BR>
<TT>    }</TT><BR>
<BR>
Regards,<BR>
<BR>
Marc Bertens 
<PRE>
_______________________________________________
SeaBIOS mailing list
<A HREF="mailto:SeaBIOS@seabios.org">SeaBIOS@seabios.org</A>
<A HREF="http://www.seabios.org/mailman/listinfo/seabios">http://www.seabios.org/mailman/listinfo/seabios</A>
</PRE>
<BR>
</BODY>
</HTML>