From: <ch...@us...> - 2007-04-11 06:28:04
|
Revision: 62 http://ipcop.svn.sourceforge.net/ipcop/?rev=62&view=rev Author: chepati Date: 2007-04-10 23:28:05 -0700 (Tue, 10 Apr 2007) Log Message: ----------- Moved toolchain prerequisites checking into a seperate function, only sxecuted when building the toolchain. Removed blfs-bootscripts Modified Paths: -------------- ipcop/trunk/make.sh Modified: ipcop/trunk/make.sh =================================================================== --- ipcop/trunk/make.sh 2007-04-11 06:25:22 UTC (rev 61) +++ ipcop/trunk/make.sh 2007-04-11 06:28:05 UTC (rev 62) @@ -478,10 +478,88 @@ ############################################################################ # # - # Checking for toolchain prerequisites # + # System configuration # # # ############################################################################ + echo "System configuration" | tee -a $LOGFILE + # Set umask + umask 022 + + # Set LFS Directory + LFS=$BASEDIR/build_${MACHINE}/ipcop + + # Check TOOLS_DIR symlink + if [ -h $TOOLS_DIR ]; then + rm -f $TOOLS_DIR + fi + + if [ ! -a $TOOLS_DIR ]; then + ln -s $BASEDIR/build_${MACHINE}/$TOOLS_DIR / + fi + + if [ ! -h $TOOLS_DIR ]; then + exiterror "Could not create $TOOLS_DIR symbolic link." + fi + + # Setup environment + set +h + LC_ALL=POSIX + export LFS LC_ALL + unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD + + # Make some extra directories + mkdir -p $BASEDIR/build_${MACHINE}/{$TOOLS_DIR,$INSTALLER_DIR,usr/local/{ccache,distcc}} 2>/dev/null + mkdir -p $BASEDIR/{cache,ccache,distcc} 2>/dev/null + mkdir -p $LFS/{$TOOLS_DIR,etc,usr/src} 2>/dev/null + mkdir -p $LFS/dev/pts + mkdir -p $LFS/proc + mkdir -p $LFS/usr/src/{cache,config,doc,html,langs,lfs,log_${MACHINE},src,ccache,distcc} + mkdir -p $LFS/{$INSTALLER_DIR,usr/local/{ccache,distcc}} + + # Do these now so we can rebind /etc + mkdir -p $LFS/$CONFIG_ROOT/etc + mkdir -p $LFS/etc + mount --bind $LFS/$CONFIG_ROOT/etc $LFS/etc + + # Make all sources and proc available under lfs build + mount --bind /dev $LFS/dev + mount --bind /proc $LFS/proc + mount --bind $BASEDIR/cache $LFS/usr/src/cache + mount --bind $BASEDIR/ccache $LFS/usr/src/ccache + mount --bind $BASEDIR/distcc $LFS/usr/src/distcc + mount --bind $BASEDIR/config $LFS/usr/src/config + mount --bind $BASEDIR/doc $LFS/usr/src/doc + mount --bind $BASEDIR/html $LFS/usr/src/html + mount --bind $BASEDIR/langs $LFS/usr/src/langs + mount --bind $BASEDIR/lfs $LFS/usr/src/lfs + mount --bind $BASEDIR/log_${MACHINE} $LFS/usr/src/log_${MACHINE} + mount --bind $BASEDIR/src $LFS/usr/src/src + mount --bind $BASEDIR/build_${MACHINE}/$TOOLS_DIR $LFS/$TOOLS_DIR + mount --bind $BASEDIR/build_${MACHINE}/$INSTALLER_DIR $LFS/$INSTALLER_DIR + mount --bind $BASEDIR/build_${MACHINE}/usr/local/ccache $LFS/usr/local/ccache + mount --bind $BASEDIR/build_${MACHINE}/usr/local/distcc $LFS/usr/local/distcc + + export CCACHE_DIR=$BASEDIR/ccache + export CCACHE_PREFIX="distcc" + export CCACHE_HASHDIR=1 + export DISTCC_DIR=$BASEDIR/distcc + echo $DISTCC_HOSTS > $BASEDIR/distcc/hosts + + # Remove pre-install list of installed files in case user erase some files before to build again + rm -f $LFS/usr/src/lsalr 2>/dev/null +} # End of prepareenv() + + + +############################################################################ +# # +# Checking for toolchain prerequisites # +# # +############################################################################ +check_toolchain_prerequisites() +{ + echo -ne "${BOLD}Checking for toolchain prerequisites${NORMAL}\n" | tee -a $LOGFILE # Check for bash @@ -644,83 +722,9 @@ else exiterror "GNU Automake not found" fi +} # End of check_toolchain_prerequisites() - ############################################################################ - # # - # System configuration # - # # - ############################################################################ - echo "System configuration" | tee -a $LOGFILE - - # Set umask - umask 022 - - # Set LFS Directory - LFS=$BASEDIR/build_${MACHINE}/ipcop - - # Check TOOLS_DIR symlink - if [ -h $TOOLS_DIR ]; then - rm -f $TOOLS_DIR - fi - - if [ ! -a $TOOLS_DIR ]; then - ln -s $BASEDIR/build_${MACHINE}/$TOOLS_DIR / - fi - - if [ ! -h $TOOLS_DIR ]; then - exiterror "Could not create $TOOLS_DIR symbolic link." - fi - - # Setup environment - set +h - LC_ALL=POSIX - export LFS LC_ALL - unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD - - # Make some extra directories - mkdir -p $BASEDIR/build_${MACHINE}/{$TOOLS_DIR,$INSTALLER_DIR,usr/local/{ccache,distcc}} 2>/dev/null - mkdir -p $BASEDIR/{cache,ccache,distcc} 2>/dev/null - mkdir -p $LFS/{$TOOLS_DIR,etc,usr/src} 2>/dev/null - mkdir -p $LFS/dev/pts - mkdir -p $LFS/proc - mkdir -p $LFS/usr/src/{cache,config,doc,html,langs,lfs,log_${MACHINE},src,ccache,distcc} - mkdir -p $LFS/{$INSTALLER_DIR,usr/local/{ccache,distcc}} - - # Do these now so we can rebind /etc - mkdir -p $LFS/$CONFIG_ROOT/etc - mkdir -p $LFS/etc - mount --bind $LFS/$CONFIG_ROOT/etc $LFS/etc - - # Make all sources and proc available under lfs build - mount --bind /dev $LFS/dev - mount --bind /proc $LFS/proc - mount --bind $BASEDIR/cache $LFS/usr/src/cache - mount --bind $BASEDIR/ccache $LFS/usr/src/ccache - mount --bind $BASEDIR/distcc $LFS/usr/src/distcc - mount --bind $BASEDIR/config $LFS/usr/src/config - mount --bind $BASEDIR/doc $LFS/usr/src/doc - mount --bind $BASEDIR/html $LFS/usr/src/html - mount --bind $BASEDIR/langs $LFS/usr/src/langs - mount --bind $BASEDIR/lfs $LFS/usr/src/lfs - mount --bind $BASEDIR/log_${MACHINE} $LFS/usr/src/log_${MACHINE} - mount --bind $BASEDIR/src $LFS/usr/src/src - mount --bind $BASEDIR/build_${MACHINE}/$TOOLS_DIR $LFS/$TOOLS_DIR - mount --bind $BASEDIR/build_${MACHINE}/$INSTALLER_DIR $LFS/$INSTALLER_DIR - mount --bind $BASEDIR/build_${MACHINE}/usr/local/ccache $LFS/usr/local/ccache - mount --bind $BASEDIR/build_${MACHINE}/usr/local/distcc $LFS/usr/local/distcc - - export CCACHE_DIR=$BASEDIR/ccache - export CCACHE_PREFIX="distcc" - export CCACHE_HASHDIR=1 - export DISTCC_DIR=$BASEDIR/distcc - echo $DISTCC_HOSTS > $BASEDIR/distcc/hosts - - # Remove pre-install list of installed files in case user erase some files before to build again - rm -f $LFS/usr/src/lsalr 2>/dev/null -} # End of prepareenv() - - ############################################################################ # This function sets some very important variables needed by the # toolchain, for both the glibc- and uclibc-based builds @@ -1057,6 +1061,9 @@ buildtoolchain() { + # Check if host can build the toolchain + check_toolchain_prerequisites + LOGFILE="$BASEDIR/log_${MACHINE}/_build.toolchain.log" export LOGFILE ORG_PATH=$PATH @@ -1163,7 +1170,6 @@ lfsmake2 udev lfsmake2 util-linux lfsmake2 vim - lfsmake2 blfs-bootscripts #lfsmake2 gdb #lfsmake2 ed @@ -1195,10 +1201,10 @@ ipcopmake linux #ipcopmake eagle-usb # DEBUG -- replaced by ueagle-atm, needs work ipcopmake 3cp4218 - ipcopmake amedyn # DEBUG -- needs linux-atm + ipcopmake amedyn ipcopmake cxacru #ipcopmake CnxADSL # DEBUG - ipcopmake wanpipe # DEBUG -- needs linux-atm + #ipcopmake wanpipe # DEBUG #ipcopmake fcdsl # DEBUG #ipcopmake fcdsl2 # DEBUG #ipcopmake fcdslsl # DEBUG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |