couple jhalfs-X thoughts (long.. sorry.)

Jeremy Byron rjjbyron at shaw.ca
Fri Apr 21 14:57:10 PDT 2006


I've been following the last half-dozen jhalfs-X builds over the 
alpha/udev_update merge and found it most impressive.  I've built LFS 
manually dozens of times, but I don't see that happening again.  Nice 
job!  I do have a couple suggestions/requests though..

1) local MD5SUM support

The book was out of sync w/ jhalfs-X for a while (files missing from the 
MD5SUM file) which resulted in packages not downloading and the script 
stopping until I manually downloaded files and ran make myself.

I ended up patching common/common-functions more or less as so:

    download "" MD5SUMS
+  if [ -f ~/local_md5sums] ; then
+    cat ~/local_md5sums >> $BUILDDIR/sources/MD5SUMS
+  fi

Better would be to add a local md5sum file to the beginning to override 
any possible conflicting sums but I'm sure you get the idea.  It'd be 
nice to have the ability to override (or add to) the downloaded MD5SUMS 
file by command-line switch or the common config file.  I keep all of 
the sources I download, so it's not much of a stretch to maintain my own 
md5sum file for them.  Your script can already be set to look through 
and update my source archive, why not my md5sums so they're guaranteed 
to match?

2) Optimization

It'd be nice to be able to optimize a build and be able to compare ICA 
results between optimized and non-optimized builds.  Can't really just 
export C{,XX}FLAGS and/or drop the vars into the lfs user's .bashrc 
because it'd break some packages.

Any chance of adding support for this in the script?

I was thinking something along the lines of allowing the user to 
configure different levels of optimization and binding the levels to 
certain packages.

Ch5: true/false
Ch6: true/false

Level 0: '-O3 -march=athlon-fx'
Level 1: '-O2 -march=athlon-fx'
Level 2: ''

It'd be hard/impossible to automate the selection of packages for each 
level based on the books unless you update each book to include the 
recommended levels specifically for jhalfs-X, but that's not really an 
acceptable way to go.  Packages are likely going to be consistent enough 
to just include a static list with jhalfs-X though and given periodic 
breakage it'd be easy enough to update the file.


Anyhow, I don't mind tinkering with this myself and submitting a patch 
if you find it worth including - I don't mean to pile it all on you. 
But beyond the simple md5sum patch, I'm not too familiar with the inner 
workings of the script at the moment.  Any suggestions on _where_ the 
setting of C{,XX}FLAGS should be done would be a big help.  It would 
have to be in such a place that the variables are set if the build is 
resumed part way through - on entering chroot, i guess.  Not sure if you 
enter chroot for each package or if you stay in it and build as many 
packages as possible though.  Each time a package is about to be built 
then, it could just look it up in the optimization levels file and 
set/unset the variables accordingly.

Thanks,
Jeremy.



More information about the alfs-discuss mailing list