Patch for V2 new config

Greg Watson gwatson at lanl.gov
Wed Oct 1 12:39:01 CEST 2003


Mark,

Understood. The thing I don't like about Ron's solution is that is 
relies on an option effectively having two values simultaneously - a 
default value and a set value. Being able to modify both these values 
independently, then relying on a side effect to determine the actual 
value seems a recipe for future problems and confusion. My original 
intention was the that default value would just be the initial value 
of the option, nothing more than that.

What Ron and you have highlighted is that there is a need for 
part-specific default values for options (maybe more than just the 
mainboard.) My suggestion is that these default values be dealt with 
by either explicitly setting the option value (using the ~ operator) 
or through some other explicit mechanism.

One possibility would be to add a Default.lb file in the part 
directory (containing lines like 'ROM_SIZE=65536')  then in the 
target config file saying:

loadoptions
loaddefaults mainboard/via/epia
loaddefaults cpu/i386

The important thing is that these are loaded in the target config 
file, before any option values are set.

Greg

At 4:44 PM +0100 1/10/03, Mark Wilkinson wrote:
>Hi Greg,
>
>On Wednesday 01 Oct 2003 16:25, Greg Watson wrote:
>>  If my understanding is correct, you want to have an option value that
>>  has a mainboard specific default value, but that can be overridden in
>>  the target configuration file?
>
>Not quite, Ron (I assume it was Ron)  already added a line like
>default ROM_SIZE 256*1024
>to the src/mainboard/via/epia/Config.lb file (there are similar lines for 
>solo and one other I think) in the CVS snapshot (20031001-1400)
>
>What my patch does is make that line work so that the buildtarget command will
>work out of the box (or cvs snapshot) in the targets diretory for
>./buildtarget via/epia
>
>The solo and other  one (hdama) both have 'option ROM_SIZE ....' lines in
>their  target Config.lb files
>
>I think what was trying to be achived is that the mainboard config file has a
>default rom size for the flash part supplied with that mainboard, and if you
>want to override it (say you have a larger flash part) you can in the target
>config file.
>
>
>>
>>  If this is the case, then my preference would be to do something like
>>  the following in the mainboard file:
>>
>  > if ~ ROM_IMAGE_SIZE
>>	option ROM_IMAGE_SIZE = 65536
>>  end
>>
>>  where the '~' operator means "hasn't been set".
>>
>>  It seems to me this would be clearer than changing a default value,
>>  possibly after the value has already been set.
>>
>>  Greg
>>
>>  At 3:44 PM +0100 1/10/03, Mark Wilkinson wrote:
>>  >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 !!
>>  >Attachment converted: Macintosh HD:config.patch (TEXT/ttxt) (002EE9D4)




More information about the coreboot mailing list