]> Untitled Git - hvlinux.git/commitdiff
Completed transition to new ipkg method (ipkg.def), successfully booting after stage 1
authorgobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Sun, 7 Nov 2010 01:37:02 +0000 (01:37 +0000)
committergobo72 <gobo72@364a67c3-989e-7be9-548d-dae8560ea662>
Sun, 7 Nov 2010 01:37:02 +0000 (01:37 +0000)
47 files changed:
functions
functions-ac
stage0/INSTALL
stage0/install-1
stage0/ipkg.def
stage0/pkg/binutils
stage0/pkg/eglibc
stage0/pkg/gcc
stage0/pkg/ncurses
stage0/stage.def
stage1/INSTALL
stage1/install-2
stage1/ipkg.def
stage1/pkg/binutils
stage1/pkg/coreutils
stage1/pkg/e2fsprogs
stage1/pkg/flex
stage1/pkg/gcc
stage1/pkg/gettext
stage1/pkg/m4
stage1/pkg/module-init-tools
stage1/pkg/sysvinit
stage1/pkg/udev
stage1/pkg/util-linux-ng
stage1/pkg/zlib
stage1/stage.def
stage2/INSTALL
stage2/install-1
stage2/ipkg.def [new file with mode: 0644]
stage2/ipkg.sh [deleted file]
stage2/pkg/binutils
stage2/pkg/coreutils
stage2/pkg/e2fsprogs
stage2/pkg/eglibc
stage2/pkg/findutils
stage2/pkg/gcc
stage2/pkg/groff
stage2/pkg/gzip
stage2/pkg/inetutils
stage2/pkg/kbd
stage2/pkg/module-init-tools
stage2/pkg/ncurses
stage2/pkg/readline
stage2/pkg/shadow
stage2/pkg/util-linux-ng
stage2/pkg/zlib
stage2/stage.def

index 7497f3a7746d238b15cfe1362bb4b6a101644d55..2ccd9658354d4bc8a4cb3cc949003d1c335d7e83 100644 (file)
--- a/functions
+++ b/functions
@@ -1,6 +1,6 @@
 #!/bin/bash
-# This file is 'sourced' by other scripts, therefore the above line is of no
-# use, except when modifying the file in emacs to have syntax highlighting.
+set -o errtrace # Let shell functions inherit ERR trap.
+set -o errexit
 
 # Constants for return codes
 EXIT_SUCCESS=0
@@ -733,6 +733,28 @@ ipkg_trap_handler()
     exit 1
 }
 
+ipkg_display_build_infos()
+{
+    echo "hvlinux: configure options:"
+    for opt in ${CONFIGURE_OPTS}; do
+        echo "  ${opt}"
+    done
+    echo "hvlinux: environment variables:"
+    echo "  HOST:     ${CLFS_HOST}"
+    echo "  TARGET:   ${CLFS_TARGET}"
+    echo "  BUILD64:  ${BUILD64}"
+    echo "  CFLAGS:   ${CFLAGS}"
+    echo "  CPPFLAGS: ${CPPFLAGS}"
+    echo "  CXXFLAGS: ${CFLAGS}"
+    echo "  LDFLAGS:  ${LDFLAGS}"
+    echo "  RANLIB:   ${RANLIB}"
+    echo "  CC:       ${CC}"
+    echo "  CXX:      ${CXX}"
+    echo "  AR:       ${AR}"
+    echo "  AS:       ${AS}"
+    echo "  PATH:     ${PATH}"
+}
+
 # Installation of a package
 # Arg. #1: Package name and version (ex: gcc-4.5.1)
 # Remaining arguments: Additional configure options
@@ -832,6 +854,12 @@ ipkg()
     echo "------------------------" 1>> ${LFS_LOG_FILE}
     echo "${MSGSTRING}" 1>> ${LFS_LOG_FILE}
 
+    exec 7>&1 # Save current "value" of stdout.
+    # All output from commands in this block sent to file $LFS_LOG_FILE.
+    exec >> ${LFS_LOG_FILE} 2>&1
+    ipkg_display_build_infos
+    exec 1>&7 7>&- # Restore stdout and close file descriptor #7.
+
     # All output from commands in this block sent to file $PACKAGE_LOG.
     exec > ${PACKAGE_LOG} 2>&1
 
index d4b3fbf5961f134ac7d963675a7b29a3b66002b5..618c47f9a4fdf861405ed35e33ecc67245d9b0b5 100644 (file)
@@ -11,8 +11,8 @@ function_exists()
     return $?
 }
 
-unset -f hvconfig_cache
 unset -f hvconfig_pre
+unset -f hvconfig_cache
 unset -f hvconfig_post
 unset -f hvbuild_post
 
@@ -44,9 +44,6 @@ ipkg_decompress_package()
 # Default configure function
 hvconfig()
 {
-    echo "Running configure with options:"
-    echo "  <${CONFIGURE_OPTS}>"
-
     if [ "x${IPKG_MODE}" = "xacnb" ]; then
         # Broken autoconf package that must build in source dir
         cd ${LFS_TMP}/${PACKAGE}
@@ -113,19 +110,22 @@ ipkg_script()
 
     hvpatch
 
+    # Execute pre-configure function if applicable
+    if function_exists hvconfig_pre ; then
+        echo "Running configure pre-script"
+        hvconfig_pre
+    fi
+
     # Execute config-cache function if applicable
     if function_exists hvconfig_cache ; then
         echo "Running configure cache script"
         hvconfig_cache
-
-        CONFIGURE_OPTS="${CONFIGURE_OPTS} --cache-file=${LFS_TMP}/${PACKAGE}-build/config.cache"
+        CONFIGURE_OPTS="\
+            ${CONFIGURE_OPTS} \
+            --cache-file=${LFS_TMP}/${PACKAGE}-build/config.cache"
     fi
 
-    # Execute pre-configure function if applicable
-    if function_exists hvconfig_pre ; then
-        echo "Running configure pre-script"
-        hvconfig_pre
-    fi
+    ipkg_display_build_infos
 
     if [ "x${IPKG_MODE}" = "xnoac" ]; then
         echo "Not calling configure because ${PACKAGE} has no configure script"
@@ -146,4 +146,6 @@ ipkg_script()
         echo "Running build post-script"
         hvbuild_post
     fi
+
+    ipkg_finish
 }
index acebe703374a99147f238f1b818d6aae360a8ec6..fa2a3ebd9d2ef531a6a2f4e61f4f6f8f1fb12112 100644 (file)
@@ -4,14 +4,7 @@ Installation instructions
 1. Create your destination partition and make sure that it is
    formatted and mounted.
 
-2. Create the LFS user.
-
-3. Copy the hvlinux-src directory, containing packages and installation
-   scripts, anywhere in your LFS partition (usually in root directory).
-   If installing from a CD-ROM, mount it under your LFS partition.
-   Make sure that your files are owned by the LFS user.
-
-4. Modify the 'sysinfos' configuration file to reflect your
+2. Modify the 'sysinfos' configuration file to reflect your
    system configuration.
 
-5. Launch './stage0-install'
+3. Launch './install-1'
index 22fb3aa9e1235204d673a0c26054b0a42704557e..1d6b6c818a544a8171c88a579cccb5fc3777e923 100755 (executable)
@@ -1,5 +1,4 @@
 #!/bin/bash
-set -o errtrace # Let shell functions inherit ERR trap.  Same as `set -E'.
 
 # Reading system configuration informations, functions and package versions.
 source ../sysinfos
index 2f22bfe9e8f412a2e05984f4d60ce8da40ddf11f..312982d32610837d7340a37694dec912d0aeb911 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+export BUILD64="-m64"
+
 # Setting default configure options for all scripts
 CONFIGURE_OPTS="\
       --prefix=/cross-tools \
index 922e22c18dc3d7dee0933969123be5b568073914..443714d52ec1b4ed7388a24b51b83d128e85e4ab 100644 (file)
@@ -1,33 +1,36 @@
 #!/bin/bash
 
-export AR=ar
-export AS=as
-
-CONFIGURE_OPTS="\
-    --host=${CLFS_HOST} \
-    --target=${CLFS_TARGET} \
-    --with-sysroot=${CLFS} \
-    --with-lib-path=/tools/lib \
-    --disable-nls \
-    --enable-shared \
-    --disable-multilib \
-    ${CONFIGURE_OPTS}"
-
 hvconfig_pre()
 {
+    export AR=ar
+    export AS=as
+
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --host=${CLFS_HOST} \
+        --target=${CLFS_TARGET} \
+        --with-sysroot=${CLFS} \
+        --with-lib-path=/tools/lib \
+        --disable-nls \
+        --enable-shared \
+        --disable-multilib"
+
     case "${HVL_TARGET}" in
         "x86_64")
             # This adds 64 bit support to Binutils.
            CONFIGURE_OPTS="${CONFIGURE_OPTS} --enable-64-bit-bfd"
            ;;
     esac
-
 }
 
-hvbuild()
+hvconfig_post()
 {
+    unset AR
+    unset AS
     ${HVMAKE} configure-host
-    ${HVMAKE}
-    ${HVMAKE} install
+}
+
+hvbuild_post()
+{
     cp -v ../${PACKAGE}/include/libiberty.h /tools/include
 }
index fe9dfe2407680d01a0bb5cf6dd345de8c1b88468..268e0b995ac4e6a4e53886c16008ede53896bb44 100644 (file)
@@ -1,35 +1,24 @@
 #!/bin/bash
 
-BUILD_CC="gcc"
-CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}"
-AR="${CLFS_TARGET}-ar"
-RANLIB="${CLFS_TARGET}-ranlib"
-
-CONFIGURE_OPTS="\
-    --prefix=/tools \
-    --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"
-
-# For Glibc to support NPTL:
-hvconfig_cache()
-{
-cat > ${LFS_TMP}/${PACKAGE}-build/config.cache << EOF
-libc_cv_forced_unwind=yes
-libc_cv_c_cleanup=yes
-libc_cv_gnu89_inline=yes
-libc_cv_ssp=no
-EOF
-}
-
 hvconfig_pre()
 {
+    export BUILD_CC="gcc"
+    export CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}"
+    export AR="${CLFS_TARGET}-ar"
+    export RANLIB="${CLFS_TARGET}-ranlib"
+
+    CONFIGURE_OPTS="\
+        --prefix=/tools \
+        --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"
+
     case "${HVL_TARGET}" in
         "x86")
             CFLAGS="-march=$(cut -d- -f1 <<< ${CLFS_TARGET}) -mtune=native -g -O2"
@@ -46,3 +35,23 @@ hvconfig_pre()
     # Disable linking to libgcc_eh:
     sed -e 's/-lgcc_eh//g' -i Makeconfig
 }
+
+# For Glibc to support NPTL:
+hvconfig_cache()
+{
+cat > ${LFS_TMP}/${PACKAGE}-build/config.cache << EOF
+libc_cv_forced_unwind=yes
+libc_cv_c_cleanup=yes
+libc_cv_gnu89_inline=yes
+libc_cv_ssp=no
+EOF
+}
+
+hvconfig_post()
+{
+    unset BUILD_CC
+    unset CC
+    unset AR
+    unset RANLIB
+    unset CFLAGS
+}
index 423b93252ddda248facc838fd0df6874a87972bb..433e601c51dc83044a58a5ffee21a3a140946fd5 100644 (file)
@@ -1,8 +1,5 @@
 #!/bin/bash
 
-AR=ar
-LDFLAGS="-Wl,-rpath,/cross-tools/lib"
-
 hvpatch()
 {
     # Manually applying patches if specified
@@ -24,8 +21,12 @@ hvpatch()
 
 hvconfig_pre()
 {
+    export AR=ar
+    export LDFLAGS="-Wl,-rpath,/cross-tools/lib"
+
     # Common options for passes 1 & 2
-    CONFIGURE_OPTS="${CONFIGURE_OPTS} \
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
         --build=${CLFS_HOST} \
         --host=${CLFS_HOST} \
         --target=${CLFS_TARGET} \
@@ -33,7 +34,10 @@ hvconfig_pre()
         --with-local-prefix=/tools \
         --disable-nls \
         --with-mpfr=/cross-tools \
-        --with-gmp=/cross-tools"
+        --with-gmp=/cross-tools \
+        --with-ppl=/cross-tools \
+        --with-cloog=/cross-tools \
+        --disable-multilib"
 
     if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then
         CONFIGURE_OPTS="${CONFIGURE_OPTS} \
@@ -56,14 +60,6 @@ hvconfig_pre()
             --enable-threads=posix"
     fi
 
-    case "${HVL_TARGET}" in
-        *)
-            CONFIGURE_OPTS="${CONFIGURE_OPTS} --with-ppl=/cross-tools \
-            --with-cloog=/cross-tools \
-            --disable-multilib"
-            ;;
-    esac
-
     cd ${LFS_TMP}/${PACKAGE}
 
     # Change the StartFile Spec to point to the correct library location:
@@ -83,6 +79,12 @@ hvconfig_pre()
     fi
 }
 
+hvconfig_post()
+{
+    unset AR
+    unset LDFLAGS
+}
+
 hvbuild()
 {
     if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then
index 846af37fbb26d5eb944db34b8eaa100a740195c2..52fce24e661c4d3107806eb7a1377e1d772bd7dd 100644 (file)
@@ -1,9 +1,12 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    --without-debug \
-    --without-shared \
-    ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --without-debug \
+        --without-shared"
+}
 
 hvbuid()
 {
index 32f39f90e46dbdbd3507f9e833c383e6b25e391d..de61a29b99609fdded34c1b7c66f34b4c4610da5 100644 (file)
@@ -1,3 +1,3 @@
 #!/bin/bash
 
-LFS_STAGE=stage0
+export LFS_STAGE=stage0
index 78eff66606e225a8b350d3e3727e7216b4c49acc..4b18f880a7546340ded5329579bf2dc2f218c0a1 100644 (file)
@@ -2,17 +2,7 @@
 Installation instructions
 -------------------------
 
-1. Create your destination partition and make sure that it is
-   formatted and mounted.
-
-2. Copy the hvlinux-src directory, containing packages and installation
-   scripts, anywhere in your LFS partition (usually in root directory).
-   If installing from a CD-ROM, mount it under your LFS partition.
-
-3. Modify the 'sysinfos' configuration file to reflect your
-   system configuration.
-
-4. Launch './stage1-install'
+1. Launch './install-1'
 
 Post-install guide
 ------------------
index 4dfe6e75852cae043318ea5508b087894e67eab7..d2d11c7b91dff3c22e0cd98b083bd6416d0d65aa 100755 (executable)
@@ -11,13 +11,6 @@ source ../packages-list
 init_log_file
 
 # Building temporary system
-export CC="${CLFS_TARGET}-gcc"
-export CXX="${CLFS_TARGET}-g++"
-export AR="${CLFS_TARGET}-ar"
-export AS="${CLFS_TARGET}-as"
-export RANLIB="${CLFS_TARGET}-ranlib"
-export LD="${CLFS_TARGET}-ld"
-export STRIP="${CLFS_TARGET}-strip"
 
 HOST_CC=gcc CPPFLAGS=-fexceptions \
     ipkg ${GMP} "--enable-cxx"
@@ -52,7 +45,7 @@ ipkg ${FINDUTILS}
 ipkg ${FILE_PKG}
 ipkg ${FLEX}
 ipkg ${GAWK}
-ipkg ${GETTEXT} "--disable-shared"
+ipkg ${GETTEXT}
 ipkg ${GREP} "\
     --disable-perl-regexp \
     --without-included-regex"
index 7545a8733491faf877ee0ada0ca38fd8c4a16ae0..46cd0ba279f5debab84a3ad64880f031abe2b57e 100644 (file)
@@ -7,5 +7,10 @@ CONFIGURE_OPTS="\
       --host=${CLFS_TARGET} \
       ${CONFIGURE_OPTS}"
 
-CC="${CC} ${CLFS_BUILDFLAGS}"
-CXX="${CXX} ${CLFS_BUILDFLAGS}"
+export CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}"
+export CXX="${CLFS_TARGET}-g++ ${CLFS_BUILDFLAGS}"
+export AR="${CLFS_TARGET}-ar"
+export AS="${CLFS_TARGET}-as"
+export RANLIB="${CLFS_TARGET}-ranlib"
+export LD="${CLFS_TARGET}-ld"
+export STRIP="${CLFS_TARGET}-strip"
index cc0ae1ba37ccb3cc0bdb8f7ca8660c41779b6451..9ea2aad547fb6dc4cf514ebd99671e6177813a0a 100644 (file)
@@ -1,15 +1,15 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    ${CONFIGURE_OPTS} \
-    --target=${CLFS_TARGET} \
-    --with-lib-path=/tools/lib \
-    --disable-nls \
-    --enable-shared \
-    --disable-multilib"
-
 hvconfig_pre()
 {
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --target=${CLFS_TARGET} \
+        --with-lib-path=/tools/lib \
+        --disable-nls \
+        --enable-shared \
+        --disable-multilib"
+
     case "${HVL_TARGET}" in
         "x86_64")
             # This adds 64 bit support to Binutils.
@@ -18,9 +18,7 @@ hvconfig_pre()
     esac
 }
 
-hvbuild()
+hvconfig_post()
 {
     ${HVMAKE} configure-host
-    ${HVMAKE}
-    ${HVMAKE} install
 }
index d454d933eb17bcfb99a654d78ba1af3fe472dbee..28955913dbc23b2be6c7b8b2f9efd28e4273010a 100644 (file)
@@ -1,5 +1,11 @@
 #!/bin/bash
 
+hvconfig_pre()
+{
+    # Fix a bug when the uname patch is automatically applied
+    touch ${LFS_TMP}/${PACKAGE}/man/{uname,hostname}.1
+}
+
 # Configure cannot properly determine how to get free space when cross-compiling
 # and as a result the df program will not be built. Add the following entries to
 # config.cache  to correct this, and fix various cross-compiling issues:
@@ -10,9 +16,3 @@ fu_cv_sys_stat_statfs2_bsize=yes
 gl_cv_func_working_mkstemp=yes
 EOF
 }
-
-hvconfig_pre()
-{
-    # Fix a bug when the uname patch is automatically applied
-    touch ${LFS_TMP}/${PACKAGE}/man/{uname,hostname}.1
-}
index 49f5977bb40d1f86cd0b9ce43e2ea296d7065d53..df037254a870b5694b905983ec861411fa29088e 100644 (file)
@@ -1,17 +1,24 @@
 #!/bin/bash
 
-CC="${CC} ${CLFS_BUILDFLAGS}"
-PKG_CONFIG=true
+hvconfig_pre()
+{
+    export PKG_CONFIG=true
+
+    CONFIGURE_OPTS="\
+        --prefix=/tools \
+        --enable-elf-shlibs \
+        --with-linker=${LD} \
+        --host=${CLFS_TARGET} \
+        --disable-libblkid \
+        --disable-libuuid \
+        --disable-fsck \
+        --disable-uuidd"
+}
 
-CONFIGURE_OPTS="\
-    --prefix=/tools \
-    --enable-elf-shlibs \
-    --with-linker=${LD} \
-    --host=${CLFS_TARGET} \
-    --disable-libblkid \
-    --disable-libuuid \
-    --disable-fsck \
-    --disable-uuidd"
+hvconfig_post()
+{
+    unset PKG_CONFIG
+}
 
 hvbuild()
 {
index 0d60fdcede4a25b168c1e62b028992a2223d6254..63c19d822b6132797172a5b491f0514f29df6c21 100644 (file)
@@ -1,5 +1,11 @@
 #!/bin/bash
 
+hvconfig_pre()
+{
+    # Make sure that Flex doesn't try to include headers from /usr/include.
+    sed -e "s/-I@includedir@//g" -i ${LFS_TMP}/${PACKAGE}/Makefile.in
+}
+
 # When Cross Compiling the configure script does not determine the correct
 # values for the following, Set the values manually:
 hvconfig_cache()
@@ -9,9 +15,3 @@ ac_cv_func_malloc_0_nonnull=yes
 ac_cv_func_realloc_0_nonnull=yes
 EOF
 }
-
-hvconfig_pre()
-{
-    # Make sure that Flex doesn't try to include headers from /usr/include.
-    sed -e "s/-I@includedir@//g" -i ${LFS_TMP}/${PACKAGE}/Makefile.in
-}
index eccf48009f1581d59a50194c47e19e4b704dc1a3..2a2c2eacd3a4617bea7dd60f008589f54ad5e4f3 100644 (file)
@@ -1,20 +1,5 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    ${CONFIGURE_OPTS} \
-    --target=${CLFS_TARGET} \
-    --disable-multilib \
-    --with-local-prefix=/tools \
-    --libexecdir=/tools/lib \
-    --disable-nls \
-    --disable-libstdcxx-pch \
-    --enable-long-long \
-    --enable-c99 \
-    --enable-shared \
-    --enable-threads=posix \
-    --enable-__cxa_atexit \
-    --enable-languages=c,c++"
-
 hvpatch()
 {
     # Manually applying patches if specified
@@ -36,6 +21,21 @@ hvpatch()
 
 hvconfig_pre()
 {
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --target=${CLFS_TARGET} \
+        --disable-multilib \
+        --with-local-prefix=/tools \
+        --libexecdir=/tools/lib \
+        --disable-nls \
+        --disable-libstdcxx-pch \
+        --enable-long-long \
+        --enable-c99 \
+        --enable-shared \
+        --enable-threads=posix \
+        --enable-__cxa_atexit \
+        --enable-languages=c,c++"
+
     cd ${LFS_TMP}/${PACKAGE}
 
     # Change the StartFile Spec to point to the correct library location:
index 7bcd57a0422168976e5c15b85c1d9342f221823a..afe372d1e397c70a38aae7ae40a632afca0289a6 100644 (file)
@@ -1,10 +1,11 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    --prefix=/tools \
-    --build=${CLFS_HOST} \
-    --host=${CLFS_TARGET} \
-    ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --disable-shared"
+}
 
 # When cross-compiling the Gettext configure script assumes we don't have a
 # working wcwidth when we do. The following will fix possible compilation
@@ -19,12 +20,7 @@ EOF
 hvconfig()
 {
     cd ${LFS_TMP}/${PACKAGE}/gettext-tools
-
-    echo "Running configure with options:"
-    echo "  <${CONFIGURE_OPTS}>"
-
-    CC="${CC} ${CLFS_BUILDFLAGS}" CXX="${CXX} ${CLFS_BUILDFLAGS}" \
-        ./configure ${CONFIGURE_OPTS}
+    ./configure ${CONFIGURE_OPTS}
 }
 
 hvbuild()
index d3ef530a3617cc7aa8a41738d5f361679ffca9aa..9319388d83ef01ed7d49339b970fda5a139e6d9c 100644 (file)
@@ -1,5 +1,11 @@
 #!/bin/bash
 
+hvconfig_pre()
+{
+    # Add a missing include statement into one of the source files:
+    sed -e '/"m4.h"/i\#include <sys/stat.h>' -i ${LFS_TMP}/${PACKAGE}/src/path.c
+}
+
 # Configure can not properly determine the results of the following tests:
 hvconfig_cache()
 {
@@ -14,9 +20,3 @@ gl_cv_func_wcrtomb_retval=yes
 gl_cv_func_wctob_works=yes
 EOF
 }
-
-hvconfig_pre()
-{
-    # Add a missing include statement into one of the source files:
-    sed -e '/"m4.h"/i\#include <sys/stat.h>' -i ${LFS_TMP}/${PACKAGE}/src/path.c
-}
index d05c66f10dcbee23812e75d006a2c6ac9fda90a1..c3fea6ad6576daedc97b04974bee49b9c129aefb 100644 (file)
@@ -1,13 +1,14 @@
 #!/bin/bash
 
-CC="${CC} ${CLFS_BUILDFLAGS}"
-
-CONFIGURE_OPTS="\
-    --prefix=/ \
-    --bindir=/bin \
-    --sbindir=/sbin \
-    --build=${CLFS_HOST} \
-    --host=${CLFS_TARGET}"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        --prefix=/ \
+        --bindir=/bin \
+        --sbindir=/sbin \
+        --build=${CLFS_HOST} \
+        --host=${CLFS_TARGET}"
+}
 
 hvbuild()
 {
index 0716d417c78d5fd41d96c76b9b6f1ec204cb2170..a8a546cb32ce7090b4e2a887f185ec1463a05adb 100644 (file)
@@ -11,7 +11,7 @@ hvbuild()
         -i src/Makefile
 
     make -C src clobber
-    make -C src CC="${CC} ${CLFS_BUILDFLAGS}"
+    make -C src CC="${CC} ${BUILD64}"
     make -C src install INSTALL=install ROOT=${LFS}
     
     install -m644 ${SCRDIR}/misc/inittab ${LFS}/etc
index 3dc37766721ab63fb0316815972624f6206f18db..d120b143b44597ca3960c01dfe3bf0d65371239b 100644 (file)
@@ -1,20 +1,18 @@
 #!/bin/bash
 
-CC="${CC} ${CLFS_BUILDFLAGS}"
-
-CONFIGURE_OPTS="\
-    --prefix=/usr \
-    --build=${CLFS_HOST} \
-    --host=${CLFS_TARGET} \
-    --exec-prefix="" \
-    --sysconfdir=/etc \
-    --libexecdir=/lib/udev \
-    --libdir=/usr/lib \
-    --disable-extras \
-    --disable-introspection"
-
 hvconfig_pre()
 {
+    CONFIGURE_OPTS="\
+        --prefix=/usr \
+        --build=${CLFS_HOST} \
+        --host=${CLFS_TARGET} \
+        --exec-prefix="" \
+        --sysconfdir=/etc \
+        --libexecdir=/lib/udev \
+        --libdir=/usr/lib \
+        --disable-extras \
+        --disable-introspection"
+
     cd ${LFS_TMP}/${PACKAGE}
     install -dv ${LFS}/lib/{firmware,udev/devices/{pts,shm}}
 }
index ad66e53329b683b1104d7adb0914ea0884eb215c..079a34355b4cef9b1056fefa9ef93d22afe1836e 100644 (file)
@@ -1,13 +1,13 @@
 #!/bin/bash
 
-CC="${CC} ${CLFS_BUILDFLAGS}"
-CXX="${CXX} ${CLFS_BUILDFLAGS}"
-
-CONFIGURE_OPTS="\
-    --build=${CLFS_HOST} \
-    --host=${CLFS_TARGET} \
-    --enable-login-utils \
-    --disable-makeinstall-chown"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        --build=${CLFS_HOST} \
+        --host=${CLFS_TARGET} \
+        --enable-login-utils \
+        --disable-makeinstall-chown"
+}
 
 hvbuild()
 {
index a1da1ca38f0396bfa99d314c1a3b25c65df3c50a..82e58f54687f8648b9fc31e065c10f8a3ae83e2c 100644 (file)
@@ -1,6 +1,7 @@
 #!/bin/bash
 
-CC="${CC} ${CLFS_BUILDFLAGS}"
-
-CONFIGURE_OPTS="\
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
         --prefix=/tools"
+}
index 7c4ff90052d1ec449c1d1b607714d16efec915ae..9d0af526d1670e85dad4cfb118dbfd4c7aa876e5 100644 (file)
@@ -1,3 +1,3 @@
 #!/bin/bash
 
-LFS_STAGE=stage1
+export LFS_STAGE=stage1
index b3d9e44dd8ee9d852da0d73bf02b8b92c3255bfb..ec32eea72fa98409ad4a6adf510b4dcb7adb38a9 100644 (file)
@@ -30,7 +30,7 @@ Note: In this example, the destination partition is /dev/hda6, and
    under ${LFS}/boot.
 
 8. Launch the installation of stage 2:
-       >$ /mnt/linux/mnt/hvlinux/scripts/stage2/stage2-install
+       >$ /mnt/linux/mnt/hvlinux/scripts/stage2/install-1
 
 9. After that, compile a fresh kernel.
 
index abc1b9b265775a61c5dd22bbdee2d2eb1eedb7cc..61b542c618ef6d58c2be38c0ea0e48dc0cfbad82 100755 (executable)
@@ -38,7 +38,7 @@ unset CC
 unset CXX
 unset LDFLAGS
 
-ipkg ${ZLIB}
+ipkg -m acnb ${ZLIB}
 ipkg ${BINUTILS}
 ipkg ${GCC}
 rscr mult "Testing toolchain" toolchain-test
diff --git a/stage2/ipkg.def b/stage2/ipkg.def
new file mode 100644 (file)
index 0000000..135c8da
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+# Setting default configure options for all scripts
+CONFIGURE_OPTS="\
+      --prefix=/usr \
+      --sysconfdir=/etc \
+      ${CONFIGURE_OPTS}"
diff --git a/stage2/ipkg.sh b/stage2/ipkg.sh
deleted file mode 100755 (executable)
index 41f028d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-set -o errexit
-
-# First argument of this script is the package name.
-# Remaining arguments are additional configure options.
-
-PACKAGE=${1}
-shift
-CONFIGURE_OPTS=${*}
-
-# Reading system configuration informations, functions and package versions.
-source ${SCRDIR}/../sysinfos
-source ${SCRDIR}/../functions
-source ${SCRDIR}/../packages-list
-
-# Setting default configure options for all scripts
-CONFIGURE_OPTS="\
-      --prefix=/usr \
-      --sysconfdir=/etc \
-      ${CONFIGURE_OPTS}"
-
-source ${SCRDIR}/../functions-ac
-
-ldconfig
-
-exit $?
index dabcf149e2a57aff0a2583500bc4dfd9e6adbab0..c9522c16207d8b57bbab482146c8ccfa1745ae12 100644 (file)
@@ -1,16 +1,16 @@
 #!/bin/bash
 
-CC="gcc -isystem /usr/include"
-LDFLAGS="-Wl,-rpath-link,/lib"
-
-CONFIGURE_OPTS="\
-    --libdir=/usr/lib \
-    --enable-shared \
-    --disable-multilib \
-    ${CONFIGURE_OPTS}"
-
 hvconfig_pre()
 {
+    export CC="gcc -isystem /usr/include"
+    export LDFLAGS="-Wl,-rpath-link,/lib"
+
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --libdir=/usr/lib \
+        --enable-shared \
+        --disable-multilib"
+    
     case "${HVL_TARGET}" in
         "x86_64")
             # Libiberty uses gcc -print-multi-os-directory to determine where to
@@ -26,6 +26,12 @@ hvconfig_pre()
     esac
 }
 
+hvconfig_post()
+{
+    unset CC
+    unset LDFLAGS
+}
+
 hvbuild()
 {
     make configure-host
index b60e9e859bda8aeb999e862bb831bf271ea9f95b..80fc9ca651b8881b6582d23d1e7d7ea9f39908de 100644 (file)
@@ -1,8 +1,11 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    --enable-no-install-program=kill,uptime \
-    ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --enable-no-install-program=kill,uptime"
+}
 
 hvbuild_post()
 {
index 99f7e687297eeac8990a66704004e4e0b72e475b..4e6bc370557838cfa62b433d16c8d216943da495 100644 (file)
@@ -1,15 +1,23 @@
 #!/bin/bash
 
-PKG_CONFIG=true
+hvconfig_pre()
+{
+    export PKG_CONFIG=true
+
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --with-root-prefix="" \
+        --enable-elf-shlibs \
+        --disable-libblkid \
+        --disable-libuuid \
+        --disable-fsck \
+        --disable-uuidd"
+}
 
-CONFIGURE_OPTS="\
-    --with-root-prefix="" \
-    --enable-elf-shlibs \
-    --disable-libblkid \
-    --disable-libuuid \
-    --disable-fsck \
-    --disable-uuidd \
-    ${CONFIGURE_OPTS}"
+hvconfig_post()
+{
+    unset PKG_CONFIG
+}
 
 hvbuild_post()
 {
index a4ebe94860d3ee7b2310b1e46eeee599f36f5e09..d53de2013c54c51097c32ae072d0ea6443797e5f 100644 (file)
@@ -2,14 +2,14 @@
 
 hvconfig_pre()
 {
-    CFLAGS="-mtune=generic -g -O2"
+    export CFLAGS="-mtune=generic -g -O2"
 
     CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
         --disable-profile \
         --enable-add-ons \
         --enable-kernel=$(get_pkg_ver ${KERNEL}) \
-        --libexecdir=/usr/lib/eglibc \
-        ${CONFIGURE_OPTS}"
+        --libexecdir=/usr/lib/eglibc"
 
     case "${HVL_TARGET}" in
         "x86")
@@ -39,6 +39,11 @@ hvconfig_pre()
     esac
 }
 
+hvconfig_post()
+{
+    unset CFLAGS
+}
+
 hvbuild()
 {
     make
index 4bdfba71c8709bd91fc794428fcb6d532cbb375f..fcb4b36b283149f3341db1b7bf51ff180b64ad49 100755 (executable)
@@ -1,9 +1,12 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    --libexecdir=/usr/lib/findutils \
-    --localstatedir=/var/lib/locate \
-    ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --libexecdir=/usr/lib/findutils \
+        --localstatedir=/var/lib/locate"
+}
 
 hvbuild_post()
 {
index c73c30dccf1fc5c273dfabbe007a2ff9004c5d10..865f6cdb66e0494247fc196e4c75f877d59d0955 100644 (file)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
-CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include"
-CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include"
+hvconfig_pre()
+{
+    export CC="gcc -Wl,-rpath-link,/lib -isystem /usr/include"
+    export CXX="g++ -Wl,-rpath-link,/lib -isystem /usr/include"
 
-CONFIGURE_OPTS="\
-    --libexecdir=/usr/lib \
-    --enable-shared \
-    --enable-threads=posix \
-    --enable-__cxa_atexit \
-    --enable-c99 \
-    --enable-long-long \
-    --enable-clocale=gnu \
-    --enable-languages=c,c++ \
-    --disable-multilib \
-    --disable-libstdcxx-pch \
-    ${CONFIGURE_OPTS}"
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --libexecdir=/usr/lib \
+        --enable-shared \
+        --enable-threads=posix \
+        --enable-__cxa_atexit \
+        --enable-c99 \
+        --enable-long-long \
+        --enable-clocale=gnu \
+        --enable-languages=c,c++ \
+        --disable-multilib \
+        --disable-libstdcxx-pch"
+
+    # Applying a sed substitution that will suppress the installation of
+    # libiberty.a. We want to use the Binutils version of libiberty.a
+    sed -i 's/install_to_$(INSTALL_DEST) //' ${LFS_TMP}/${PACKAGE}/libiberty/Makefile.in
+}
 
 hvpatch()
 {
@@ -33,11 +40,10 @@ hvpatch()
     esac
 }
 
-hvconfig_pre()
+hvconfig_post()
 {
-    # Applying a sed substitution that will suppress the installation of
-    # libiberty.a. We want to use the Binutils version of libiberty.a
-    sed -i 's/install_to_$(INSTALL_DEST) //' ${LFS_TMP}/${PACKAGE}/libiberty/Makefile.in
+    unset CC
+    unset CXX
 }
 
 hvbuild_post()
index 9c4a6a21fda6c0f1f408f84072369be6a56bc6e7..2f052fbcd67da45db70526b5fdd299a2db5c677c 100755 (executable)
@@ -1,12 +1,20 @@
 #!/bin/bash
 
-PAGE=letter
+# Groff does not like to be made in parallel???
 
-CONFIGURE_OPTS="\
-    --enable-multibyte
-    ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+    export PAGE=letter
+
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --enable-multibyte"
+}
 
-# Groff does not like to be made in parallel.
+hvconfig_post()
+{
+    unset PAGE
+}
 
 hvbuild_post()
 {
index fa9a1cf216454184a7d2115441d324ce575b30d9..341a13f66a847b22b736f3461f3f00228088d0c2 100755 (executable)
@@ -1,8 +1,11 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    --bindir=/bin
-    ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --bindir=/bin"
+}
 
 hvbuild_post()
 {
index b1ad3c171fc2466f41dcda72d919111cefcd9e24..5d9b3f2d32e16a013bd3bbcb73ea1de7aba1d79d 100755 (executable)
@@ -1,13 +1,16 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    --libexecdir=/usr/sbin \
-    --localstatedir=/var \
-    --disable-ifconfig \
-    --disable-logger \
-    --disable-syslogd \
-    --disable-whois \
-    --disable-servers"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        --libexecdir=/usr/sbin \
+        --localstatedir=/var \
+        --disable-ifconfig \
+        --disable-logger \
+        --disable-syslogd \
+        --disable-whois \
+        --disable-servers"
+}
 
 hvbuild_post()
 {
index 060a57cdb7db8ae7311f5eabef4071152da1f325..9e4dc2297e5e7547e5d4c78d97b73afdc29c0b1a 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
 
-# --datadir=/lib/kbd 
-#     This option puts keyboard layout data in a directory that will
-#     always be on the root partition instead of the default /usr/share/kbd
-CONFIGURE_OPTS="\
-    --datadir=/lib/kbd
-    ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --datadir=/lib/kbd"
+}
 
 hvbuild_post()
 {
index 44a2aa64c7de8a23392305d94b13f6229161d06d..08d6a2559553745ed3262637245c66d34dd52efd 100755 (executable)
@@ -1,10 +1,13 @@
 #!/bin/bash
 
-# --enable-zlib-dynamic: To handle compressed kernel modules.
-CONFIGURE_OPTS="\
-    --enable-zlib-dynamic \
-    --mandir=/usr/share/man \
-    ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+    # --enable-zlib-dynamic: To handle compressed kernel modules.
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --enable-zlib-dynamic \
+        --mandir=/usr/share/man"
+}
 
 hvbuild()
 {
@@ -19,7 +22,5 @@ hvbuild()
 
 hvbuild_post()
 {
-    cat > /etc/modprobe.conf << "EOF"
-# modprobe.conf
-EOF
+    install -dv ${LFS}/etc/modprobe.d
 }
index 69433cf74dda81a732ba13deae116f512ac791c2..739a4a21d2f24146063821c42f8900e4fc433156 100644 (file)
@@ -1,12 +1,15 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    --libdir=/lib \
-    --with-shared \
-    --without-debug \
-    --enable-widec \
-    --with-manpage-format=normal \
-    ${CONFIGURE_OPTS}"
+hvconfig_pre()
+{
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --libdir=/lib \
+        --with-shared \
+        --without-debug \
+        --enable-widec \
+        --with-manpage-format=normal"
+}
 
 hvbuild_post()
 {
index 9097481fffc46e076a504d090c74c0ffa70690ac..03a69d0645b9ecc37e3d22c07527272aa6193a40 100644 (file)
@@ -1,11 +1,11 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    --libdir=/lib
-    ${CONFIGURE_OPTS}"
-
 hvconfig_pre()
 {
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \    
+        --libdir=/lib"
+    
     cd ${LFS_TMP}/${PACKAGE}
 
     # Reinstalling Readline will cause the old libraries to be moved to
index 5dbd099ba1c26e27f5b8229c286842607450da55..723f5e7cf518e51e75a5f83883f5a333bd3e196b 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/bash
 
-CONFIGURE_OPTS="\
-    --without-selinux
-    ${CONFIGURE_OPTS}"
-
 hvconfig_pre()
 {
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \    
+        --without-selinux"
+    
     cd ${LFS_TMP}/${PACKAGE}
 
     # Disable the installation of the groups program and its man page, as
index e46e5c300f44733673e84bd8b1a6092dbe85c809..081181e5bf4bdc95199c07c5f052dd4266f80bb3 100644 (file)
@@ -2,6 +2,12 @@
 
 hvconfig_pre()
 {
+    CONFIGURE_OPTS="\
+        --enable-arch \
+        --enable-partx \
+        --enable-write \
+        --disable-wall"
+
     # The FHS recommends that we use /var/lib/hwclock, instead of the usual
     # /etc, as the location for the adjtime file. To make the hwclock program
     # FHS-compliant, run the following:
@@ -9,17 +15,6 @@ hvconfig_pre()
     mkdir -pv /var/lib/hwclock
 }
 
-hvconfig()
-{
-    cd ${LFS_TMP}/${PACKAGE}
-
-    ./configure \
-        --enable-arch \
-        --enable-partx \
-        --enable-write \
-        --disable-wall
-}
-
 hvbuild_post()
 {
     # Move the logger  binary to /bin as it is needed by the CLFS-Bootscripts package:
index 0106d36c23bb88f1f55c87b6677c1f96345e22f6..1b4a57b25ff9e3886a5b34485b028fe3787bfde1 100644 (file)
@@ -1,17 +1,21 @@
 #!/bin/bash
 
-CC="gcc -isystem /usr/include"
-CXX="g++ -isystem /usr/include"
-LDFLAGS="-Wl,-rpath-link,/lib"
+hvconfig_pre()
+{
+    export CC="gcc -isystem /usr/include"
+    export CXX="g++ -isystem /usr/include"
+    export LDFLAGS="-Wl,-rpath-link,/lib"
 
-CONFIGURE_OPTS="\
-    --shared \
-    ${CONFIGURE_OPTS}"
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --shared"
+}
 
-hvconfig()
+hvconfig_post()
 {
-    cd ${LFS_TMP}/${PACKAGE}
-    ./configure ${CONFIGURE_OPTS}
+    unset CC
+    unset CXX
+    unset LDFLAGS
 }
 
 hvbuild_post()
index 6f7260f97b76768b9bfbed5cf653f938b8dab4f1..1664849b23c7aa711a683c9654ae0a859248bed5 100644 (file)
@@ -1,3 +1,3 @@
 #!/bin/bash
 
-LFS_STAGE=stage2
+export LFS_STAGE=stage2