Nikolai Vladychevski writes: 

> Hi again,  
> 
> when I compile this config file:  
> 
> 
> arch i386
> target /home/niko/freebios/m756
> mainboard pcchips/m756t
> option HAVE_FRAMEBUFFER
> docipl northsouthbridge/sis/630
> option USE_DOC_MIL
> linux /l2/linux-2.4.7-lb
> commandline root=/dev/hda6 console=tty0  
> 
> I get this error:  
> 
> ar cr linuxbios.a crt0.o boot.o i386_subr.o params.o hardwaremain.o 
> pirq_routing.o linuxbiosmain.o linuxpci.o newpci.o printk.o serial_subr.o 
> subr.o vsprintf.o memset.o memcpy.o memcmp.o malloc.o elfboot.o 
> do_inflate.o delay.o uniform_boot.o fill_inbuf.o rom_fill_inbuf.o 
> docmil_fill_inbuf.o tsunami_tigbus_rom_fill_inbuf.o serial_fill_inbuf.o 
> tftp_fill_inbuf.o boot.o i386_subr.o params.o hardwaremain.o 
> pirq_routing.o linuxbiosmain.o linuxpci.o newpci.o printk.o serial_subr.o 
> subr.o vsprintf.o memset.o memcpy.o memcmp.o malloc.o elfboot.o 
> do_inflate.o delay.o uniform_boot.o fill_inbuf.o
> rom_fill_inbuf.o docmil_fill_inbuf.o tsunami_tigbus_rom_fill_inbuf.o 
> serial_fill_inbuf.o tftp_fill_inbuf.o southbridge.o northbridge.o 
> superio.o mainboard.o irq_tables.o keyboard.o cpuid.o microcode.o mtrr.o 
> l2_cache.o
> gcc -nostdlib -r -o linuxbios.o crt0.o linuxbios.a 
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/libgcc.a
> echo "INCLUDE ldoptions" > ldscript.ld ; for file in 
> /home/niko/freebios/src/arch/i386/config/ldscript.base 
> /home/niko/freebios/src/cpu/i386/entry16.lds ; do echo "INCLUDE $file" >> 
> ldscript.ld ; done
> gcc -nostdlib -nostartfiles -static -o linuxbios -T ldscript.ld 
> linuxbios.o
> linuxbios.o: In function `final_mainboard_fixup':
> linuxbios.o(.text+0x4a81): undefined reference to `final_superio_fixup'
> collect2: ld returned 1 exit status
> make: *** [linuxbios] Error 1
> [root@qis m756]#  
> 
> 
> the problem is that final_superio_fixup() is not defined in my mainboard.c  
> 
> this is the mainboard.c I end up:
> #include "/home/niko/freebios/src/include/printk.h"  
> 
> void
> mainboard_fixup(void)
> {
> }  
> 
> void
> final_mainboard_fixup(void)
> {
>       void final_southbridge_fixup(void);
>       void final_superio_fixup(void);  
> 
> //      printk(KERN_INFO "PCCHIPS M756LMR+ (and similar)...");  
> 
>       final_southbridge_fixup();
>       final_superio_fixup();
> }  
> 
> 
> the function final_superio_fixup() is only declared, but not defined. Do I 
> have to define it myself? What should it have, can I just make a void 
> definition? or do this functions defined in some file I still did not 
> find? The layout linuxbios has is kinda dificult to understand.....  
> 
> 

ok, I got it compile after looking at the answer to my 1st question. Thanks! 

There just a strange thing, the config for m810MLR accepts the "printk" 
call, but mine (fro M756MLR motherboard) dont: 


this is the code: 

#include "printk.h" 

void
mainboard_fixup(void)
{
} 

void
final_mainboard_fixup(void)
{
       void final_southbridge_fixup(void);
       void final_superio_fixup(void); 

       printk(KERN_INFO "PCCHIPS M756LMR+ (and similar)..."); 

       final_southbridge_fixup();
#ifndef USE_NEW_SUPERIO_INTERFACE
       final_superio_fixup();
#endif;
} 


and this is the error: 


gcc -c  -I/home/niko/freebios/src/include 
 -I/home/niko/freebios/src/arch/i386/include 
 -I/usr/lib/gcc-lib/i386-redhat-linux/2.96/include  
 -DCMD_LINE='"root=/dev/hda1 console=ttyS0,115200 console=tty0 single"' 
 -DCONFIGURE_L2_CACHE -DENABLE_FIXED_AND_VARIABLE_MTRRS 
 -DFINAL_MAINBOARD_FIXUP -DHAVE_FRAMEBUFFER -DHAVE_PIRQ_TABLE 
 -DHEAP_SIZE='0x40000' -DINTEL_PPRO_MTRR -DMAX_CPUS='1' -DMEMORY_HOLE='1' 
 -DROM_IMAGE_SIZE='65536' -DSERIAL_CONSOLE -DSIS630 -DSMA_SIZE='0xA0' 
 -DSTACK_SIZE='0x10000' -DUPDATE_MICROCODE -DUSE_DOC_MIL 
 -DUSE_NEW_SUPERIO_INTERFACE -D_RAMBASE='0x4000' -D_ROMBASE='0x80000' -Di586
 -Di686 -O2 -nostdinc -nostdlib -fno-builtin -Wall -o mainboard.o 
/home/niko/freebios/src/mainboard/pcchips/m756t/mainboard.c
/home/niko/freebios/src/mainboard/pcchips/m756t/mainboard.c: In function 
`final_mainboard_fixup':
/home/niko/freebios/src/mainboard/pcchips/m756t/mainboard.c:14: warning: 
implicit declaration of function `printk'
/home/niko/freebios/src/mainboard/pcchips/m756t/mainboard.c:14: `KERN_INFO' 
undeclared (first use in this function)
/home/niko/freebios/src/mainboard/pcchips/m756t/mainboard.c:14: (Each 
undeclared identifier is reported only once
/home/niko/freebios/src/mainboard/pcchips/m756t/mainboard.c:14: for each 
function it appears in.)
/home/niko/freebios/src/mainboard/pcchips/m756t/mainboard.c:14: parse error 
before string constant
make: *** [mainboard.o] Error 1 


why would it ignore "#include "printk.h" , I also tried absolute path , but 
no luck.... werid thing, so I had to remoe the call in order to furtherly 
investigate what was that...... 


Regards
Nikolai 

Reply via email to