> After preparing epia-m build ( ./buildtarget via/epia-m/ ), I move to
> via/epia-m/epia-m and run 'make'. I get this error during linkage:
>
> .... cut.....
> gcc -m32 -nostdlib -r -o linuxbios_ram.o c_start.o vt8235_lpc.o
> uart8250_console.o vt8235.o vt8235_ide.o mainboard.o vt8235_usb.o
> vt8235_nic.o model_centaur_init.o
> linuxbios.a /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/libgcc.a
> gcc -m32 -nostdlib -nostartfiles -static -o linuxbios_ram -T
> /home/bubak/epia/bios/LinuxBIOSv2/src/config/linuxbios_ram.ld
> linuxbios_ram.o
> linuxbios_ram.o(.text+0x8bc): In function `vga_fixup':
> : undefined reference to `setup_realmode_idt'
> linuxbios_ram.o(.text+0x8cd): In function `vga_fixup':
> : undefined reference to `do_vgabios'
> linuxbios_ram.o(.text+0x8e0): In function `vga_fixup':
> : undefined reference to `vga_enable_console'
> collect2: ld returned 1 exit status
> make[1]: *** [linuxbios_ram] Error 1
> make[1]: Leaving directory
> `/home/bubak/epia/bios/LinuxBIOSv2/targets/via/epia-m/epia-m/normal'
> make: *** [normal/linuxbios.rom] Error 1
>
> Any ideas please?

It seems that someone has been over enthusiastic about pruning what might be considered to be old code out of the code base. The above references are in a file 'vgabios.c' which once belonged in the src/pc80 directory. Its companion file 'vgachip.h' is also missing.
 
This was the code that ran the VGA bios in real mode, and I understand that this solution has been dropped in favour of running the vga bios through an emulator. However the code to do this has not yet appeared in the epia-m target.
 
I think the emulator is a great idea, but I'm not sure how VIA-ble it is on the VIA epia-m (or epia for that matter):
 
- the EPIA 600Mhz processor is a small and slow processor
 
- the EPIA-M VGA BIOS is big and complicated. I think most of the complexity has to do with the vt1622/vt1623 TV encoder attached to the VGA chip and which controls which outputs are enabled. 
 
- running in real mode (once upon a time when Linuxbios2 was working on epia-m) the VGA BIOS would take 3 to 4 seconds to initialise. Thats full speed 16 bit code = a lot of work. However that is acceptable in terms of overall boot time.
 
- running the vga bios through a year old testbios takes somewhere in the order of  30 seconds (not actually timed it). I appreciate that a lot of effort has gone into improving the efficiency of the emulator, but even if it is twice as efficicient then we are talking 15 seconds or so to emulate the bios. I dont think that this is acceptable as a linuxbios boot time.
 
Thus I speculate that the epia-m targets are going to need the original real mode VGA Bios initialisation.
 
I have just started working on Linuxbios and the epia-m target again, and intend coming up with a fully functional version within the next 2 to 3 weeks. During that time I will explore the above issues more thoroughly. What I suspect might happen is that the vgabios.c file is moved into the src/mainboard/via/epia-m directory so that it becomes a target specific file rather than pollute the src/pc80 directory.
 
Even with that file restored into the epia-m directory, however, the target is still broken - it does a partial boot but gets stuck somewhere allocating PCI resources. Again I intend to resolve these issues.
 
Hope this helps
Nick Barker