If you run coreboot on a system with on-board graphics, you have to embed a VGA on the top level, enter the file name of your option rom and the PCI ID of the associated graphics device in the form <vendor_id>,<device_id>:

−

thing in the coreboot image.

+

−

So you need to compute the address in the systems memory space where the start of the video bios will show up.

+

VGA BIOS --->

+

[*] Add a VGA BIOS image

+

(oprom-0.rom) VGA BIOS path and filename

+

(8086,27a2) VGA device PCI IDs

−

To do this you take the 4Gb of address and subtract the size of your coreboot image.

+

That's it, exit configuration, and run make to get your VGA enabled coreboot image.

−

0x100000000 - (ROM size in Kb * 1024)

+

−

You can do this in bash by:

+

== How to retrieve a good video bios ==

−

biossize=256

+

=== RECOMMENDED: Extracting from your vendor bios image ===

−

printf "0x%x\n" $(( 0x100000000 - ($biossize*1024) ))

+

−

Addresses for popular chip sizes:

+

The recommended method is to take your mainboard vendor's BIOS image and extract the VGA BIOS using a tool called [[bios_extract]].

−

256K 0xfffc0000

+

−

512k 0xfff80000

+

−

1024k 0xfff00000

+

+

$ git clone http://review.coreboot.org/p/bios_extract.git

−

=== Target Configuration ===

+

This is the most reliable way:

+

* You are guaranteed to get an image that fits to your onboard VGA

+

* Even if your VGA BIOS uses self-modifying code you get a correct image

−

2. You still need to modify your target 'Config.lb' to reserve space for the additional video bios. Reduce the size of your coreboot image by the size of the video bios. You will prepend the video bios to the coreboot image in step 3.

+

Decompress your rom image with:

+

$ ./bios_extract hdmag217.rom

−

in the normal section

+

If bios_decode fails with a message like

+

Using file "hdmag217.rom" (513kB)

+

Found Phoenix BIOS "Phoenix ServerBIOS 3 Release 6.0 "

+

Version "DEVEL4E0", created on 03/20/06 at 14:37:39.

+

Error: Invalid module signature at 0x80581

−

<source lang="bash">

+

then you have to cut the flash chip description off the image. In this case the BIOS image is 512KB, so you do

−

romimage "normal"

+

$ dd if=hdmag217.rom of=hdma.rom bs=512k count=1

−

# 48K for SCSI FW or ATI ROM

+

1+0 records in

−

option ROM_SIZE = 475136

+

1+0 records out

−

</source>

+

524288 bytes transferred in 0.000883 secs (593688784 bytes/sec)

−

or if you only have a "fallback" boot then use the "fallback" section instead.

−

In the above example the bios chip is 512Kb part. The video bios is 48Kb. So (512*1024)-(48*1024) = 475136.

You need to make sure the final_coreboot.rom size is the size of your ROM chip. Normally 256kb, 512kb, or 1024Kb.

+

−

+

−

dd is helpfull to get your <videobios.bin> when booted under the factory BIOS.

+

−

+

−

+

−

== How to retrieve a good video bios ==

+

−

+

−

=== Extracting from your vendor bios image ===

+

−

+

−

The recommended method is to take your mainboard vendor's BIOS image and extract the VGA BIOS using a tool called awardeco/amideco/phnxdeco. This is the most reliable way:

+

−

* You are guaranteed to get an image that fits to your onboard VGA

+

−

* Even if your VGA BIOS uses self-modifying code you get a correct image

+

=== Downloading ===

=== Downloading ===

Line 109:

Line 125:

There are sites that have video bios roms on their website. (I know of this one for nvidia cards: [http://whitebunny.demon.nl/hardware/chipset_nvidia.html])

There are sites that have video bios roms on their website. (I know of this one for nvidia cards: [http://whitebunny.demon.nl/hardware/chipset_nvidia.html])

−

=== Extracting from the system ===

+

For Intel onboard graphics you can download the vbios(vga bios) from Intel's download section. The vbios is included with some versions of the graphics driver. The summary will say something like "NOTE:These materials are intended for use by developers.Includes VBIOS". The actual vbios file is the *.dat file included with the graphics driver.

−

However you should be able to retrieve your own video bios as well with linux.

+

=== Extracting from the system (if everything else fails) ===

−

* Boot up a machine with a commercial bios (not coreboot) with the video card you wish to work under coreboot.

+

−

* From the command line enter:<br /><code>dd if=/dev/mem of=vgabios.bin skip=1536 count=128 or <br />dd if=/dev/mem of=vgabios.bin bs=1k count=64 skip=768<br />This assumes you card's bios is cached at 0xc0000, and is 64K long. You<br />can see where and how much your card's bios is using by<br />doing a cat iomem | grep "Video ROM"<br /></code>

+

−

** dd Explained (man dd to learn more):

+

−

*** if is the location to retrieve from.

+

−

*** of is the output file (your rom image)

+

−

*** skip jumps n blocks where the default n is 512 bytes

+

−

*** count is how many blocks you wish to read

+

−

*** bs is the block size

+

−

* You now have a video bios image

+

−

==== Perl script to dump out your video bios ====

+

However you might be able to retrieve your on-board video bios with Linux as well.

−

This is a simple script that computes the size and offset then uses

+

* Boot up a machine with a commercial bios (not coreboot) with the video card you wish to work under coreboot.

−

the command dd to dump your video bios to a file.

+

* You can see where and how much your card's bios is using by doing a

−

+

<source lang="bash">cat /proc/iomem | grep 'Video ROM'</source>

−

<source lang="perl">

+

* From the command line enter:<br /><source lang="bash">dd if=/dev/mem of=vgabios.bin bs=1k count=64 skip=768</source> This assumes you card's bios is cached at 0xc0000, and is 64K long.

Alternatively you can choose the "Secure mode" to run the VGA option rom in a contained environment.

If you have no on-board graphics, you are done configuring coreboot at this point. You may exit configuration, and run make to get your VGA enabled coreboot image.

On-board Video Devices

If you run coreboot on a system with on-board graphics, you have to embed a VGA on the top level, enter the file name of your option rom and the PCI ID of the associated graphics device in the form <vendor_id>,<device_id>:

Downloading

There are sites that have video bios roms on their website. (I know of this one for nvidia cards: [1])

For Intel onboard graphics you can download the vbios(vga bios) from Intel's download section. The vbios is included with some versions of the graphics driver. The summary will say something like "NOTE:These materials are intended for use by developers.Includes VBIOS". The actual vbios file is the *.dat file included with the graphics driver.

Extracting from the system (if everything else fails)

However you might be able to retrieve your on-board video bios with Linux as well.

Boot up a machine with a commercial bios (not coreboot) with the video card you wish to work under coreboot.

You can see where and how much your card's bios is using by doing a

cat/proc/iomem |grep'Video ROM'

From the command line enter:

ddif=/dev/mem of=vgabios.bin bs=1k count=64skip=768

This assumes you card's bios is cached at 0xc0000, and is 64K long.

ddif=/dev/mem of=video.bios.bin.4 bs=65536count=1skip=12

This works for many of the VIA Epia boards.
Alternatively you can automatically generate it using this nice script from Peter Stuge: