[coreboot] [PATCH] Add support for Asus M4A785-M, with build instructions

Juhana Helovuo juhe at iki.fi
Thu Sep 9 18:12:55 CEST 2010

On Sat, 2010-09-04 at 15:23 -0600, Myles Watson wrote:

> It would be a lot easier to review if you split the patch into smaller pieces.
> 1. Use svn cp to copy the tilapia board directory for your board
> 2. Make the changes so it works for your board (just copy the files
> you already have from another location)
> 3. svn diff
> This will produce a patch with only your changes.
> Split out work-around patches as well.  Something is broken for your
> board, and that needs to be fixed, but I don't think we should change
> the PCI scan code.

Ok, this makes sense. The previous patch I sent was unnecessarily large.

There are now three smaller patches attached:

(1) Changes specific to this board. Fairly small changes from AMD
Tilapia. Requires (2) to work.

(2) Small, hopefully non-intrusive, patches to generic code that are
required to prevent hangups/crashes on this board.

(3) Multiboot table patch required to get UMA and high coreboot tables
locations to Grub and Linux. Independent of (1) and (2).

Signed-off-by: Juhana Helovuo <juhe at iki.fi>

I tested appying these patches, building and flashing using the
following procedure:

1. Check out Coreboot from SVN
 % svn co svn://coreboot.org/coreboot/trunk coreboot

 * The revision used here was 5792.

2. chdir to coreboot

3. svn cp src/mainboard/amd/tilapia_fam10 src/mainboard/asus/m4a785-m

4. patch

 % patch -p1 < ../patches/asus-m4a785m-small-patch.patch
 % patch -p1 < ../patches/multiboot-table-after-cb-table-r5756-v2.patch
 % patch -p1 < ../patches/generic-code-patches-for-m4a785m.patch

5. make menuconfig

 * Select mainboard vendor & model
 * ROM chip size 1 MByte

 * Select: Use VGA console once initialized
 * Select Use onboard VGA as primary video device

 * Add payload (grub2 and coreinfo tested to work)

 * Add VGA BIOS: 

The BIOS for the on-board ATI Radeon HD 4200 can be extracted with dd
from /dev/mem as shown in http://www.coreboot.org/VGA_support . The
bios_extract utility can extract some other option ROMs, but it crashes
before it gets the VGA ROM.

 * If on-board VGA BIOS is added, set VGA device PCI IDs to "1002,9710"

6. make

* The result should be a working coreboot.rom.

This procedure worked for me. Can someone acknowledge that the patches
do not break anything?

The changes required in generic code are a bit ugly, but I am not
familiar enough with Coreboot to figure out any neater solution.

Best regards,
Juhana Helovuo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: asus-m4a785m-small-patch.patch
Type: text/x-patch
Size: 17644 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100909/a4e41f7f/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generic-code-patches-for-m4a785m.patch
Type: text/x-patch
Size: 4199 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100909/a4e41f7f/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiboot-table-after-cb-table-r5756-v2.patch
Type: text/x-patch
Size: 6599 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100909/a4e41f7f/attachment-0002.patch>

More information about the coreboot mailing list