On Feb 21, 2011, at 10:15 PM, Gabe Black wrote:

> On 02/21/11 20:14, nathan binkert wrote:
>>> I don't know if we should expect people to reach into main.py like that
>>> in a per user way. It does the job setting default values, but does
>>> anybody use that even? Nobody seems to have known it existed. I think
>>> setting an environment variable is a lot more straightforward than
>>> writing a python script that fiddles with M5's innards.
>> It's not documented because it was never fleshed out.  The idea was
>> that the python script was more like a config file.  I looked at it
>> again, and all it does is export the options dict.  In general, I
>> think that it would be a good idea for us to have a config file or
>> config directory and support that.  I just used a python script, for
>> what I did and I think that works pretty well in general since it's
>> less code for us to write.  That said, if we were to make it useful,
>> we would have to document it better.  I could be convinced to have a
>> .ini file for configuration stuff though.
>> 
>> 
>>  Nate
> 
> Yeah, I think something like a config.ini for defaults would be a lot
> better. It wouldn't even really need to be as sophisticated as an ini
> file since there wouldn't be different sections. I can see that being
> useful.


We could create a script and put it in the m5 root that emmitted python files 
into .m5 that properly setup the environment based on the user input. I rather 
like that idea and that way it could ask where various things were and we 
aren't setting a bunch of environment variables. I'm not a huge fan of the 
config.ini files because pretty much every thing we're going to want to add you 
need to add and check in three places. It would be better if it was just python 
that setup SysPaths and whatever else correctly. 

Ali


_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to