[LinuxBIOS] Which svn revision works with VIA EPIA M-II?

Myles Watson myles at pel.cs.byu.edu
Fri Nov 9 22:55:58 CET 2007


This may not fix everything, but it should help.
Myles

> Coquelicot
> Sent: Friday, November 09, 2007 11:52 AM
> To: linuxbios at linuxbios.org
> Subject: [LinuxBIOS] Which svn revision works with VIA EPIA M-II?
> 
> Hi guys,
> 
> I finally have spare ROM chips to play with and I am ready to put
> LinuxBIOS on them - I have problems with compiling the beast, however.
> I have checkied out the latest revision from SVN and here's what I'm
> getting when trying to compile:
> 
> 
> 
> --------------- CUT --------------------
> 
> gcc -m32 -nostdlib -nostartfiles -static -o linuxbios_ram -T
> /home/luke/src/carpc-project/LinuxBIOSv2/src/config/linuxbios_ram.ld
> linuxbios_ram.o
> nm -n linuxbios_ram | sort > linuxbios_ram.map
> objcopy --gap-fill 0xff -O binary linuxbios_ram linuxbios_ram.bin
> gcc -O2 -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG -DBITSIZE=32
> -DENDIAN=0 /home/luke/src/carpc-project/LinuxBIOSv2/util/nrv2b/nrv2b.c
> -o nrv2b
> ./nrv2b e linuxbios_ram.bin linuxbios_ram.nrv2b
> input/output = 64748/29627 = 2.185
> cp linuxbios_ram.nrv2b linuxbios_ram.rom
> echo '/*ldoptions*/' > ldscript.ld; cat ldoptions >> ldscript.ld ; for
> file in  /home/luke/src/carpc-
> project/LinuxBIOSv2/src/arch/i386/init/ldscript_fallback.lb
> /home/luke/src/carpc-project/LinuxBIOSv2/src//cpu/x86/16bit/entry16.lds
> /home/luke/src/carpc-project/LinuxBIOSv2/src//cpu/x86/32bit/entry32.lds
> /home/luke/src/carpc-project/LinuxBIOSv2/src//cpu/x86/16bit/reset16.lds
> /home/luke/src/carpc-project/LinuxBIOSv2/src//arch/i386/lib/id.lds
> /home/luke/src/carpc-project/LinuxBIOSv2/src//arch/i386/lib/failover.lds
> ; do echo /\* $file \*/ >> ldscript.ld; cat $file >> ldscript.ld ;
> done
> gcc -m32 -nostdlib -nostartfiles -static -o linuxbios -T ldscript.ld
> crt0.o
> /usr/bin/ld: warning: dot moved backwards before `.reset'
> /usr/bin/ld: warning: dot moved backwards before `.id'
> /usr/bin/ld: warning: dot moved backwards before `.id'
> /usr/bin/ld: warning: dot moved backwards before `.id'
> /usr/bin/ld: section .id [00000000ffffffd9 -> 00000000ffffffef]
> overlaps section .rom [00000000ffffb3bf -> 000000010000192f]
> /usr/bin/ld: linuxbios: section .id lma 0xffffffd9 overlaps previous
> sections
> collect2: ld returned 1 exit status
> make[1]: *** [linuxbios] Error 1
> make[1]: Leaving directory
> `/home/luke/src/carpc-project/LinuxBIOSv2/targets/via/epia-m/epia-
> m/fallback'
> make: *** [fallback/linuxbios.rom] Error 1
> 
> --------------- CUT --------------------
> 
> Here's my Config.lb:
> 
> 
> --------------- CUT --------------------
> 
> # Sample config file for EPIA-M
> # This will make a target directory of ./epia-m
> 
> target epia-m
> 
> mainboard via/epia-m
> 
> option  MAXIMUM_CONSOLE_LOGLEVEL=8
> option  DEFAULT_CONSOLE_LOGLEVEL=8
> option  CONFIG_CONSOLE_SERIAL8250=1
> 
> option ROM_SIZE=256*1024
> option HAVE_OPTION_TABLE=1
> option CONFIG_ROM_PAYLOAD=1
> option HAVE_FALLBACK_BOOT=1
> 
> ###
> ### Compute the location and size of where this firmware image
> ### (linuxBIOS plus bootloader) will live in the boot rom chip.
> ###
> option FALLBACK_SIZE=0x18000

  option FALLBACK_SIZE=ROM_SIZE

> 
> ## LinuxBIOS C code runs at this location in RAM
> option _RAMBASE=0x00004000
> 
> ###
> ### Compute the start location and size size of
> ### The linuxBIOS bootloader.
> ###
> 


Take out this section, because you don't want to build "normal" anymore.
> #
> # EPIA-M
> #
> romimage "normal"
>         option USE_FALLBACK_IMAGE=0
>         option ROM_IMAGE_SIZE=0xc000
>         option ROM_SECTION_OFFSET=0x10000
>         option ROM_SECTION_SIZE=0x18000
>         option LINUXBIOS_EXTRA_VERSION=".0-Normal"
>         payload $(HOME)/src/carpc-project/filo-0.5/filo.elf
> end
> 


> romimage "fallback"
>         option USE_FALLBACK_IMAGE=1
>         option ROM_IMAGE_SIZE=0xc000
>         option LINUXBIOS_EXTRA_VERSION=".0-Fallback"
>         payload $(HOME)/src/carpc-project/filo-0.5/filo.elf
> end
> 
> #buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback"
> buildrom ./linuxbios.rom ROM_SIZE "fallback"
> 
> 
> --------------- CUT --------------------
> 
> I have commented out the normal build because I want to prepend
> original VGA BIOS from the board to LinuxBIOS and I guess the fallback
> one is the right one to use (at least according to LinuxBIOS
> documentation (documentation/HOWTO/EPIA-M-howto). This file also
> states how to get the VGA bios:
> 
> dd if=/dev/mem of=/video.bios.bin \
>                    bs=1 count=65536 skip=790528
> 
> while Confirmed working SVN revisions at
> 
>   http://www.linuxbios.org/index.php/Confirmed_working_svn_revisions
> 
> says something different:
> 
> dd if=/dev/mem of=video.bios.bin.4 bs=65536 count=1 skip=12
> 
> (I have checked that generated files differ)

The reason that they're different is that 12*65536 != 790528

You should check the first few bytes of a video ROM to look for the
signature (AA55)

You can also use strings. The ROMs I've seen have some recognizable strings
in them.

Myles

> 
> Big thanks,
> 
> 
> --
> Coquelicot
> 
> --
> linuxbios mailing list
> linuxbios at linuxbios.org
> http://www.linuxbios.org/mailman/listinfo/linuxbios





More information about the coreboot mailing list