Hi Ron,
        I started looking at building the Via/Epia with the v2, and noticed that your 
last snapshot said that the mainboard Config.lb should set the ROM_SIZE to 
265K.

Here's a little patch that lets the config python use 
'default OPTION value' tag in the Mainboard Config.lb overriding the value set 
in config/Optins.lb (which has ROM_SIZE set to NONE)

or should the command be 'default OPTION=<value>' in which case, alter the 
line for 'rule default<<C>>: ...' to read
    rule default<<C>>:  DEFAULT ID EQ value   {{ if(C): mbdefault(ID,value) }}

Regards
Mark Wilkinson.

PS. Hope to burn a V2 epia bios tomorrow morning and test !!
diff -ur freebios2-1400/util/newconfig/config.g freebios2/util/newconfig/config.g
--- freebios2-1400/util/newconfig/config.g	2003-09-26 12:40:05.000000000 +0100
+++ freebios2/util/newconfig/config.g	2003-10-01 15:26:10.000000000 +0100
@@ -521,6 +521,15 @@
 		self.default = 1
 		self.loc = loc
 
+	def altdefault(self, value, loc):
+		global global_option_values
+		if (self.default):
+			warning("default value for %s already set" % self.name)
+		setdict(global_option_values, self.name, value)
+		self.defined = 1
+		self.default = 1
+		self.loc = loc
+
 	def setnodefault(self, loc):
 		self.default = 1
 		self.defined = 0
@@ -872,6 +881,16 @@
 	v = option_value(value)
 	o.setdefault(v, loc)
 
+def mbdefault(name, value):
+	global loc, global_options
+	o = getdict(global_options, name)
+	if (not o):
+		return
+	if (o.default):
+		print "setdefault: modifing default for %s" % name
+	v = option_value(value)
+	o.altdefault(v, loc)
+
 def setnodefault(name):
 	global loc, global_options
 	o = getdict(global_options, name)
@@ -1488,7 +1507,7 @@
     #mainboard config files are special, in that they can also have
     # default values.
     rule mainboard_cfgfile:	(uses<<1>>)* 
-                            (defstmts<<1>>)*
+                            (default<<1>>)*
     			(stmt<<1>>)*
 			EOF			{{ return 1 }}
 
@@ -1550,6 +1569,9 @@
     # ENTRY for parsing a delayed value
     rule delexpr:	"{" expr "}" EOF	{{ return expr }}
 
+
+    rule default<<C>>:  DEFAULT ID value	{{ if(C): mbdefault(ID, value) }}
+
     rule defstmts<<ID>>:			{{ d = 0 }}
 			( DEFAULT
 			  ( value		{{ setdefault(ID, value) }}

Reply via email to