-Déplacé nano du stage3 au stage 2 (car causait problème vu qu'on enlève /tools à...
[hvlinux.git] / stage0 / install-1
index d8e60eb..1d6b6c8 100755 (executable)
@@ -1,89 +1,20 @@
 #!/bin/bash
 
-source ~/.bashrc
-
-LFS_STAGE=stage0
-
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
 source ../functions
+hvtrap_setup
 source ../packages-list
 
-export LFS_PKG_DIR="$(dirname $(pwd))/packages/${LFS_STAGE}"
-export LFS_LOG_DIR=${LFS}/var/log/hvlinux-install/${LFS_STAGE}
-export LFS_LOG_FILE=${LFS_LOG_DIR}/install.log
-export LFS_TMP="${LFS}/tmp"
-
 init_log_file
 
-# Scripts directory
-export SCRDIR=$(pwd)
-
-ipkg_ac   ${KERNEL}
-
-case "${HVL_TARGET}" in
-    x86*)
-        ipkg_ac   ${FILE_PKG}
-        ipkg_ac   ${NCURSES} "\
-            --without-debug \
-            --without-shared"
-        ;;
-esac
-
-CPPFLAGS=-fexceptions \
-    ipkg_ac   ${GMP}  "--enable-cxx"
-
-export LDFLAGS="-Wl,-rpath,/cross-tools/lib"
-
-ipkg_ac   ${MPFR} "\
-    --enable-shared \
-    --with-gmp=/cross-tools"
-ipkg_ac   ${MPC} "\
-    --with-gmp=/cross-tools \
-    --with-mpfr=/cross-tools"
-ipkg_ac   ${PPL} "\
-    --enable-shared \
-    --enable-interfaces=c,cxx \
-    --disable-optimization \
-    --with-libgmp-prefix=/cross-tools \
-    --with-libgmpxx-prefix=/cross-tools"
-ipkg_ac   ${CLOOG_PPL} "\
-    --enable-shared \
-    --with-bits=gmp \
-    --with-gmp=/cross-tools \
-    --with-ppl=/cross-tools"
-
-LDFLAGS=""
-
-AR=ar AS=as \
-    ipkg_ac ${BINUTILS} "\
-        --host=${CLFS_HOST} \
-        --target=${CLFS_TARGET} \
-        --with-sysroot=${CLFS} \
-        --with-lib-path=/tools/lib \
-        --disable-nls \
-        --enable-shared \
-        --disable-multilib"
-
-GCC_PASS1="1" AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
-    ipkg ${GCC} cis-ac "${GCC}-pass1"
+rscr mult "Performing pre-install" pre-install
 
-BUILD_CC="gcc" \
-    CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}" \
-    AR="${CLFS_TARGET}-ar" \
-    RANLIB="${CLFS_TARGET}-ranlib" \
-    ipkg_ac   ${EGLIBC} "\
-        --host=${CLFS_TARGET} \
-        --build=${CLFS_HOST} \
-        --disable-profile \
-        --enable-add-ons \
-        --with-tls \
-        --enable-kernel=$(get_pkg_ver ${KERNEL}) \
-        --with-__thread \
-        --with-binutils=/cross-tools/bin \
-        --with-headers=/tools/include"
+# Logging-in as 'lfs' user, and executing the install-2 script. The
+# 'su -' command starts with a clean environment and enters the home
+# directory of the user.
+su - lfs -c "cd ${PWD}; ./install-2"
 
-GCC_PASS2="1" AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \
-    ipkg ${GCC} cis-ac "${GCC}-pass2"
+echo "Total build time: $(get_total_build_time ${LFS_LOG_FILE})h"
 
-exit $?
+exit 0