Patch for V2 new config

Eric W. Biederman ebiederman at lnxi.com
Thu Oct 2 11:55:00 CEST 2003


Greg Watson <gwatson at lanl.gov> writes:

> 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.  This is why the original config tool did this in two passes.

The one pass algorithm of the current config tool, already does
not work 100% of the time, the evidence is some options that do not
work properly if I move them.  So we might as well rework the code so
it operates in two passes, a parsing passes and then an option
evaluation pass.

With 2 passes we can have default values in configuration values
and still ensure that we only ever have 1 default value for an option.
If we dnn't modify the code to be a 2 pass algorithm Greg something
like your changes for loaddefaults are what is needed.

Eric



More information about the coreboot mailing list