I'm opening up this discussion, which was formerly just between the folks
actively doing freebios2. We're getting closer to having things working
and I am happy to hear any comments.
linuxbios.a now builds for the K8 with the new config tool. Not all of
linuxbios, just linuxbios.a, but that's quite a way to working.
Things are stricter now. We've been able to operate before with code like
this:
#if SOME_VARIABLE_THAT_WAS_UNDEFINED == 0
stuff
#endif
because in the GNU C preprocessor,
#if (a == 0)
and
#ifndef a
are equivalent if a is undefined.
I think that is a very poor way to operate: it can fool people, and in a
BIOS you want more checking.
Now that you can use an 'if' operator in the config language, setting up
some things is a lot easier:
For example, this:
expr ROM_SECTION_SIZE =(USE_FALLBACK_IMAGE*65536)+(USE_NORMAL_IMAGE*(ROM_SIZE
- 65536))
expr ROM_SECTION_OFFSET=(USE_FALLBACK_IMAGE*(ROM_SIZE-65536))+(USE_NORMAL_IMAGE
*0)
now becomes this:
default FALLBACK_SIZE=65536
if USE_FALLBACK_IMAGE
option ROM_SECTION_SIZE = FALLBACK_SIZE
option ROM_SECTION_OFFSET= (ROM_SIZE - FALLBACK_SIZE)
end
if USE_NORMAL_IMAGE
option ROM_SECTION_SIZE = (ROM_SIZE - FALLBACK_SIZE)
option ROM_SECTION_OFFSET= 0
end
Much better. However, if you have not defined USE_FALLBACK_IMAGE or
USE_NORMAL_IMAGE, then you're going to get an error, which in the past was
not the case.
So we'll have to learn to be a bit more careful about defining things
before they are used, and not using things that were never defined. This
is all proving to be easy, but people will need to take more care with the
Config files (which, in deference to Windows and MacOS, are now named
Config.lb).
ron