[BUILDROM] Add support for the Cheetah FAM10 target to buildrom

This adds support for the Cheetah FAM10 target in LinuxBIOS to
buildrom.  Simple port, uses most of the existing S-C infrastructure.
Now with LAB support.

Singed-off-by: Marc Jones <marc.jones@amd.com>

Index: buildrom/config/platforms/Config.in
===================================================================
--- buildrom.orig/config/platforms/Config.in	2007-12-20 11:24:57.000000000 -0700
+++ buildrom/config/platforms/Config.in	2007-12-19 09:50:31.000000000 -0700
@@ -104,6 +104,11 @@
        select PLATFORM
        select PLATFORM_SUPPORT_64BIT
 
+config PLATFORM_CHEETAH_FAM10
+	bool "AMD Serengeti-Cheetah with fam10 processor"
+	depends VENDOR_AMD
+	select PLATFORM
+	select PLATFORM_SUPPORT_64BIT
 endchoice
 
 config BUILD_QEMU
Index: buildrom/config/platforms/platforms.conf
===================================================================
--- buildrom.orig/config/platforms/platforms.conf	2007-12-20 11:24:53.000000000 -0700
+++ buildrom/config/platforms/platforms.conf	2007-12-20 11:30:06.000000000 -0700
@@ -16,6 +16,7 @@
 PLATFORM-$(CONFIG_PLATFORM_TYAN_S2891) = tyan-s2891.conf
 PLATFORM-$(CONFIG_PLATFORM_SUPERMICRO_H8DMR) = supermicro-h8dmr.conf
 PLATFORM-$(CONFIG_PLATFORM_SERENGETI_CHEETAH) = serengeti_cheetah.conf
+PLATFORM-$(CONFIG_PLATFORM_CHEETAH_FAM10) = serengeti_cheetah.conf
 PLATFORM-$(CONFIG_PLATFORM_GA_2761GXDK) = ga-2761gxdk.conf
 PLATFORM-$(CONFIG_PLATFORM_QEMU-i386) = qemu.conf
 
Index: buildrom/config/platforms/serengeti_cheetah.conf
===================================================================
--- buildrom.orig/config/platforms/serengeti_cheetah.conf	2007-12-20 11:24:48.000000000 -0700
+++ buildrom/config/platforms/serengeti_cheetah.conf	2007-12-20 11:30:27.000000000 -0700
@@ -1,5 +1,5 @@
 # Support for the AMD Serengeti_Cheetah Platform
-# This should work for most K8+8111 platforms
+# This should work for most K8/fam10+8111 platforms
 
 #### Platform configuration
 
@@ -42,12 +42,21 @@
 
 # LinuxBIOS configuration
 
+ifeq ($(CONFIG_PLATFORM_CHEETAH_FAM10),y)
+LINUXBIOS_VENDOR=amd
+LINUXBIOS_BOARD=serengeti_cheetah_fam10
+LINUXBIOS_CONFIG=Config.lb
+LINUXBIOS_TDIR=serengeti_cheetah_fam10
+LINUXBIOS_TAG=3018
+LINUXBIOS_ROM_NAME=amd-cheetah-fam10.rom
+else
 LINUXBIOS_VENDOR=amd
 LINUXBIOS_BOARD=serengeti_cheetah
 LINUXBIOS_CONFIG=Config.lb
 LINUXBIOS_TDIR=serengeti_cheetah
 LINUXBIOS_TAG=2950
 LINUXBIOS_ROM_NAME=serengeti_cheetah.rom
+endif
 
 # FILO configuration
 
Index: buildrom/packages/linuxbios/patches/serengeti_cheetah_fam10-lab.patch
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ buildrom/packages/linuxbios/patches/serengeti_cheetah_fam10-lab.patch	2007-12-20 14:30:38.000000000 -0700
@@ -0,0 +1,44 @@
+Index: svn/targets/amd/serengeti_cheetah_fam10/Config.lb
+===================================================================
+--- svn/targets/amd/serengeti_cheetah_fam10/Config.lb	(revision 3018)
++++ svn/targets/amd/serengeti_cheetah_fam10/Config.lb	(working copy)
+@@ -29,29 +29,14 @@
+ # At a maximum only compile in this level of debugging
+ 	option  MAXIMUM_CONSOLE_LOGLEVEL=11
+
+-# 512KB ROM
+-option ROM_SIZE=512*1024
++# 1024KB ROM
++option ROM_SIZE=1024*1024
++option FALLBACK_SIZE=ROM_SIZE-FAILOVER_SIZE
+
+-# Cheetah Family 10
+-#romimage "normal"
+-#	1MB ROM
+-#	option ROM_SIZE = 0x100000
+-#	option USE_FAILOVER_IMAGE=0
+-#	option USE_FALLBACK_IMAGE=0
+-#	option ROM_IMAGE_SIZE=0x20000
+-#	option ROM_IMAGE_SIZE=0x30000
+-#	option XIP_ROM_SIZE=0x40000
+-#	option LINUXBIOS_EXTRA_VERSION="$(shell cat ../../VERSION)_Normal"
+-#	payload ../payload.elf
+-#end
+-
+ romimage "fallback"
+ 	option USE_FAILOVER_IMAGE=0
+ 	option USE_FALLBACK_IMAGE=1
+-#	option ROM_IMAGE_SIZE=0x13800
+-#	option ROM_IMAGE_SIZE=0x19800
+-	option ROM_IMAGE_SIZE=0x3f000
+-#	option ROM_IMAGE_SIZE=0x15800
++	option ROM_IMAGE_SIZE=0x30000
+ 	option XIP_ROM_SIZE=0x40000
+ 	option LINUXBIOS_EXTRA_VERSION="$(shell cat ../../VERSION)_Fallback"
+ 	payload ../payload.elf
+@@ -65,6 +50,5 @@
+ 	option LINUXBIOS_EXTRA_VERSION="$(shell cat ../../VERSION)_Failover"
+ end
+
+-#buildrom ./amd-cheetah-fam10.rom ROM_SIZE "normal" "fallback" "failover"
+ buildrom ./amd-cheetah-fam10.rom ROM_SIZE "fallback" "failover"
Index: buildrom/packages/linuxbios/serengeti_cheetah.mk
===================================================================
--- buildrom.orig/packages/linuxbios/serengeti_cheetah.mk	2007-12-12 15:33:56.000000000 -0700
+++ buildrom/packages/linuxbios/serengeti_cheetah.mk	2007-12-20 15:58:07.000000000 -0700
@@ -16,6 +16,13 @@
 endif
 
 
+ifeq ($(CONFIG_PLATFORM_CHEETAH_FAM10),y)
+ifeq ($(CONFIG_PAYLOAD_LAB),y)
+	LINUXBIOS_PATCHES += $(PACKAGE_DIR)/linuxbios/patches/serengeti_cheetah_fam10-lab.patch
+endif
+endif
+
+ifeq ($(CONFIG_PLATFORM_SERENGETI_CHEETAH),y)
 ifeq ($(CONFIG_PAYLOAD_LAB),y)
 	LINUXBIOS_PATCHES += $(PACKAGE_DIR)/linuxbios/patches/serengeti_cheetah-lab.patch
 else
@@ -25,6 +32,7 @@
 ifeq ($(CONFIG_SIMNOW),y)
 LINUXBIOS_PATCHES += $(PACKAGE_DIR)/linuxbios/patches/simnow.patch
 endif
+endif
 
 LINUXBIOS_BASE_DIR=svn
 LINUXBIOS_URL=svn://linuxbios.org/repos/trunk/LinuxBIOSv2
