summaryrefslogtreecommitdiff
path: root/util/newconfig
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2003-08-04 21:05:19 +0000
committerRonald G. Minnich <rminnich@gmail.com>2003-08-04 21:05:19 +0000
commita43048d371ad4bfaa7a53b3621770907b5d1879d (patch)
treebccf1717d1ffd37b214ed35c371d3bc2aff500f9 /util/newconfig
parentbbb6d1020f97b2694f496d87c1f49a0cb2e0bb96 (diff)
Commits for the new config static device design, to allow more than one static
cpu of a certain type and to eliminate the cpu p5 cpu p6 cpu k7 nonsense in the old config files. Next step is to hook into Eric's pci device stuff. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1067 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/newconfig')
-rw-r--r--util/newconfig/config.g17
1 files changed, 17 insertions, 0 deletions
diff --git a/util/newconfig/config.g b/util/newconfig/config.g
index 5ad4e349cd..a216c55381 100644
--- a/util/newconfig/config.g
+++ b/util/newconfig/config.g
@@ -21,6 +21,9 @@ alloptions = 0 # override uses at top level
local_path = re.compile(r'^\.')
include_pattern = re.compile(r'%%([^%]+)%%')
+# the cpu type for this mainboard
+cpu_type = 0
+
# -----------------------------------------------------------------------------
# Utility Classes
# -----------------------------------------------------------------------------
@@ -1062,8 +1065,22 @@ def target(name):
print "Will place Makefile, crt0.S, etc. in %s" % target_dir
+def cpudir(path):
+ global cpu_type
+ if (cpu_type and (cpu_type != path)):
+ fatal("Two different CPU types: %s and %s" % (cpu_type, path))
+ srcdir = "/cpu/%s" % path
+ dodir(srcdir, "Config.lb")
+ cpu_type = path
+
def part(type, path, file, name):
global curimage, dirstack, partstack
+ # special case for 'cpu' parts.
+ # we could add a new function too, but this is rather trivial.
+ # if the part is a cpu, and we haven't seen it before,
+ # arrange to source the directory /cpu/'type'
+ if (type == 'cpu'):
+ cpudir(path)
partdir = os.path.join(type, path)
srcdir = os.path.join(treetop, 'src')
fulldir = os.path.join(srcdir, partdir)