[SeaBIOS] Question about linker building seabios

Marc Bertens mbertens at xs4all.nl
Sat Jan 15 21:07:55 CET 2011


Hi Kevin,

Fixed the error on the linker, but now i got another error which i don't
understand, can you help me ?

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_181202-mbertens-desktop")
Fixed space: 0xe05b-0x10000  total: 8101  slack: 15  Percent slack: 0.2%
16bit size:           37904
32bit segmented size: 2217
32bit flat size:      14007
32bit flat init size: 38848
Traceback (most recent call last):
  File "./tools/layoutrom.py", line 579, in <module>
    main()
  File "./tools/layoutrom.py", line 576, in main
    writeLinkerScripts(sections, entrysym, genreloc, out16, out32seg,
out32flat)
  File "./tools/layoutrom.py", line 257, in writeLinkerScripts
    + COMMONTRAILER)
TypeError: %x format: a number is required, not NoneType
make: *** [out/romlayout16.lds] Error 1

Regards,

Marc 


-----Original Message-----
From: Marc Bertens <mbertens at xs4all.nl>
To: Kevin O'Connor <kevin at koconnor.net>
Cc: seabios at seabios.org
Subject: [SeaBIOS] Question about linker building seabios
Date: Sat, 15 Jan 2011 10:56:43 +0100


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:

    // INT(3/4)h : Serial Hardware Service Entry Point (for keyboard
handling)
    void VISIBLE16 handle_console_serial( void )
    {
        ...    // my code
        ...
    done:
        eoi_pic1();
    }


    void
    serial_setup(void)
    {
        ...  // orginal code
    
        ...
        #if CONFIG_KEYBOARD_SERIAL
            con_addr = GET_BDA( port_com[ CONFIG_KEYBOARD_SERIAL -
1 ] );
            dprintf( 3, "keyboard on serial port %x\n", con_addr ); 
        # if CONFIG_KEYBOARD_SERIAL == 1 || CONFIG_KEYBOARD_SERIAL == 3 
            enable_hwirq( 4, FUNC16( handle_console_serial ) );
        # else
            enable_hwirq( 3, FUNC16( handle_console_serial ) );
        # endif
        #endif
    }

Regards,

Marc Bertens 

_______________________________________________
SeaBIOS mailing list
SeaBIOS at seabios.org
http://www.seabios.org/mailman/listinfo/seabios


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.seabios.org/pipermail/seabios/attachments/20110115/2c86cb91/attachment.html>


More information about the SeaBIOS mailing list