|
|
Hey guys, I have made a number of modifications to NLBConfig, listed below. If you consider these changes to be useful to your project, let me know and I may do some more, based on your feedback. The overall reasons I made these changes were:
- To make the Makefile more readable and better documented, e.g. where
do the different parts of the Makefile come from, what do they do,
etc.? This helped me understand the build process a lot better, and I
think it would help other newcomers also. Maybe oldtimers as well,
when you experiment with new configurations, as you have done a lot
lately.
- To make NLBConfig a bit more readable, behave more consistently,
give more informative diagnostics, be a little easier to use.
I have tried to maintain compatibility with existing config files, and
as far as I know I haven't broken anything, but I have only tested it
with a SiS630 build (and I don't have the hardware to test those bits
with).
...also, a few other notes/suggestions...
- In the data sheets for a couple EPROMS and FLASH parts that I looked at,
erasing the part results in memory being set to 0xFF. And I've noticed
with my EPROM programmer that when unused bytes are filled with FF (instead
of 00), the programming is much faster. So, you might consider changing
mkrom and similar tools, to have them set unused bytes to FF. It might
speed up the FLASH programming.
- This code in ~/freebios/src/arch/i386/config/make.base looks a bit odd:
addaction linuxbios.rom dd if=linuxbios.strip of=linuxbios.rom bs=1 seek=`expr
$(ROM_IMAGE_SIZE) - $$size`
For one thing, "dd ... seek" doesn't pad out the beginning of the file
if the file doesn't already exist, at least on my system. Instead, it
just acts like cp - which I think is ok, because mkrom takes care of
padding and so on. If I've misunderstood something and you really want
to pad the beginning of the file (with 0xFF) you can do the following:
addaction linuxbios.rom perl -e 'print "\377" x ('$(ROM_IMAGE_SIZE)-$$size')' > $@
addaction linuxbios.rom cat linuxbios.strip >> $@
- There are several files in the freebios/src tree that have lines of the form
static char rcsid[] =
"$Id: northbridge.c,v 1.8 2001/11/06 04:29:38 ollie Exp $";
These files cause "defined but not used" warnings when compiled. The
warnings are just noise that may be drowning out possibly more serious
warnings. The "not used" warnings can be cured by just changing the
first line to
static char rcsid[] __attribute__ ((unused)) =
Cheers!
- Jan
The changes to NLBConfig are as follows:
- Put more whitespace and comments into the Makefile.
- The "include cpuflags" in the Makefile was broken: namely, the
cpuflags file was generated long after it was needed. So I eliminated
the cpuflags file and used a different mechanism to compute CPUFLAGS.
Yet another way to do this would be to just have NLBConfig write
"CPUFLAGS := ..." in Makefile.settings.
- NLBConfig.py was renamed to NLBConfig and made executable. So you
just say "NLBConfig ... ..." rather than "python NLBConfig.py ... ..."
- The build directory is created if necessary. This eliminates a
dozen lines from the HOWTO document.
- The "Trying to create" messages were replaced with "Creating".
Let's have a confident attitude :-)
- Deleted some apparently obsolete comments, rewrote some code to
hopefully improve clarity. Removed unreachable feature "list_vals".
- During make, the gcc lines are printed as "gcc ... -o nsuperio.o
nsuperio.c" in one line rather than several lines of repetitious and
noisy details.
- Renamed some variables in the NLBConfig script to better match the
command with which they are associated, for example outputdir is
renamed target_dir.
- There seemed to be no reason to have separate userrules and
makebaserules, so userrules was eliminated.
- Changed the rules for remaking Makefile when config dependencies
change so as to avoid running NLBConfig twice.
- Improved error detection and reporting, in particular, report the
config file in which any duplicate makerule target definition occurs,
and in which command any syntax error occurs; detect and report more
syntax errors.
- Cause makerules to be written to Makefile in the order that they are
defined, rather than hash order.
- Change the parser for makerule and addaction to allow "#" comments
to be passed to the Makefile as actions. This allows the comments to
be printed when make runs.
- Makerule remembers the config file where the makerule was given, and
writes it in the Makefile, so it's easier to tell where rules come
from.
NLBConfig
Description: Binary data
