Changeset 3b63c8c


Ignore:
Timestamp:
07/26/2006 06:42:01 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
613d46b
Parents:
1504208
Message:

Updated experimental branch to current trunk code.

Files:
4 added
16 edited

Legend:

Unmodified
Added
Removed
  • BLFS/TODO

    r1504208 r3b63c8c  
    2020
    21212. - To develop the XSL code needed to create the build scripts.
    22      Work in progress.
     22     Almost done. A lot of book-versus-scripts and testing is needed.
     23     We need yet to figure out how to handle Perl modules installation and
     24     other pages that have commands to install more that one package
     25     (e.g., Gnat in GCC Java-bin in Java, sane-backends and sane-frontends
     26     in Sane, etc)
    2327
    24283. - To develop the code to create the Makefile.
     
    2731     Must make the build scripts executables and set the SRC_ARCHIVE and
    2832     FTP_SERVER envars.
     33     Work in progress.
    2934
    30354. - To find a way to track already installed packages by previous runs, to can
  • CLFS/clfs.xsl

    r1504208 r3b63c8c  
    231231        <xsl:value-of select="$page"/>
    232232      </xsl:when>
     233      <xsl:when test="ancestor::sect1[@id='ch-boot-kernel'] or
     234                      ancestor::sect1[@id='ch-bootable-kernel']">
     235        <xsl:value-of select="$keymap"/>
     236      </xsl:when>
    233237      <xsl:otherwise>
    234238        <xsl:text>**EDITME</xsl:text>
  • CLFS/config

    r1504208 r3b63c8c  
    2323# >>>> 64-64 BUILD <<<<
    2424# ARCH=x86_64-64  ; TARGET="x86_64-unknown-linux-gnu"
    25 # ARCH=mips64-64  ; TARGET="mipsel-unknown-linux-gnu"
    26 # ARCH=mips64-64  ; TARGET="mips-unknown-linux-gnu"
     25# ARCH=mips64-64  ; TARGET="mips64el-unknown-linux-gnu"
     26# ARCH=mips64-64  ; TARGET="mips64-unknown-linux-gnu"
    2727# ARCH=sparc64-64 ; TARGET="sparc64-unknown-linux-gnu"
    2828# ARCH=alpha      ; TARGET="alpha-unknown-linux-gnu"
     
    3030# >>>> MULTILIB 32/64 <<<<
    3131# ARCH=x86_64  ; TARGET="x86_64-unknown-linux-gnu"    ; TARGET32="i686-pc-linux-gnu"
    32 # ARCH=mips64  ; TARGET="mipsel-unknown-linux-gnu"    ; TARGET32="mipsel-unknown-linux-gnu"
    33 # ARCH=mips64  ; TARGET="mips-unknown-linux-gnu"      ; TARGET32="mips-unknown-linux-gnu"
    34 # ARCH=sparc64 ; TARGET="sparc64-unknown-linux-gnu"   ; TARGET32="sparcv9-unknown-linux-gnu"
     32# ARCH=mips64  ; TARGET="mips64el-unknown-linux-gnu"  ; TARGET32="mipsel-unknown-linux-gnu"
     33# ARCH=mips64  ; TARGET="mips64-unknown-linux-gnu"    ; TARGET32="mips-unknown-linux-gnu"
     34# ARCH=sparc64 ; TARGET="sparc64-unknown-linux-gnu"   ; TARGET32="sparc-unknown-linux-gnu"
    3535# ARCH=ppc64   ; TARGET="powerpc64-unknown-linux-gnu" ; TARGET32="powerpc-unknown-linux-gnu"
    3636
     
    6969#--- Book version
    7070LFSVRS=development
     71TREE=trunk/BOOK
    7172
    7273#--- Name of the makefile
  • CLFS/master.sh

    r1504208 r3b63c8c  
    1111host_prep_Makefiles() {      # Initialization of the system
    1212#----------------------------#
    13   local   LFS_HOST
     13  local   CLFS_HOST
    1414
    1515  echo "${tab_}${GREEN}Processing... ${L_arrow}host prep files${R_arrow}"
    1616
    1717  # defined here, only for ease of reading
    18   LFS_HOST="`echo ${MACHTYPE} | sed -e 's/unknown/cross/g' -e 's/-pc-/-cross-/g'`"
     18  CLFS_HOST="$(echo $MACHTYPE | sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")"
    1919(
    2020cat << EOF
     
    4242025-addinguser:  024-creatingcrossdir
    4343        @\$(call echo_message, Building)
    44         @if [ ! -d /home/lfs ]; then \\
    45                 groupadd lfs; \\
    46                 useradd -s /bin/bash -g lfs -m -k /dev/null lfs; \\
     44        @if [ ! -d /home/clfs ]; then \\
     45                groupadd clfs; \\
     46                useradd -s /bin/bash -g clfs -m -k /dev/null clfs; \\
    4747        else \\
    48                 touch user-lfs-exist; \\
     48                touch user-clfs-exist; \\
    4949        fi;
    50         @chown lfs \$(MOUNT_PT) && \\
    51         chown lfs \$(MOUNT_PT)/tools && \\
    52         chown lfs \$(MOUNT_PT)/cross-tools && \\
    53         chown lfs \$(MOUNT_PT)/sources && \\
     50        @chown clfs \$(MOUNT_PT) && \\
     51        chown clfs \$(MOUNT_PT)/tools && \\
     52        chown clfs \$(MOUNT_PT)/cross-tools && \\
     53        chown clfs \$(MOUNT_PT)/sources && \\
    5454        touch \$@ && \\
    5555        echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
     
    5858026-settingenvironment:  025-addinguser
    5959        @\$(call echo_message, Building)
    60         @if [ -f /home/lfs/.bashrc -a ! -f /home/lfs/.bashrc.XXX ]; then \\
    61                 mv /home/lfs/.bashrc /home/lfs/.bashrc.XXX; \\
     60        @if [ -f /home/clfs/.bashrc -a ! -f /home/clfs/.bashrc.XXX ]; then \\
     61                mv /home/clfs/.bashrc /home/clfs/.bashrc.XXX; \\
    6262        fi;
    63         @if [ -f /home/lfs/.bash_profile  -a ! -f /home/lfs/.bash_profile.XXX ]; then \\
    64                 mv /home/lfs/.bash_profile /home/lfs/.bash_profile.XXX; \\
     63        @if [ -f /home/clfs/.bash_profile  -a ! -f /home/clfs/.bash_profile.XXX ]; then \\
     64                mv /home/clfs/.bash_profile /home/clfs/.bash_profile.XXX; \\
    6565        fi;
    66         @echo "set +h" > /home/lfs/.bashrc && \\
    67         echo "umask 022" >> /home/lfs/.bashrc && \\
    68         echo "LFS=\$(MOUNT_PT)" >> /home/lfs/.bashrc && \\
    69         echo "LC_ALL=POSIX" >> /home/lfs/.bashrc && \\
    70         echo "PATH=/cross-tools/bin:/bin:/usr/bin" >> /home/lfs/.bashrc && \\
    71         echo "export LFS LC_ALL PATH" >> /home/lfs/.bashrc && \\
    72         echo "" >> /home/lfs/.bashrc && \\
    73         echo "unset CFLAGS" >> /home/lfs/.bashrc && \\
    74         echo "unset CXXFLAGS" >> /home/lfs/.bashrc && \\
    75         echo "" >> /home/lfs/.bashrc && \\
    76         echo "export LFS_HOST=\"${LFS_HOST}\"" >> /home/lfs/.bashrc && \\
    77         echo "export LFS_TARGET=\"${TARGET}\"" >> /home/lfs/.bashrc && \\
    78         echo "export LFS_TARGET32=\"${TARGET32}\"" >> /home/lfs/.bashrc && \\
    79         echo "source $JHALFSDIR/envars" >> /home/lfs/.bashrc
    80         @chown lfs:lfs /home/lfs/.bashrc && \\
     66        @echo "set +h" > /home/clfs/.bashrc && \\
     67        echo "umask 022" >> /home/clfs/.bashrc && \\
     68        echo "CLFS=\$(MOUNT_PT)" >> /home/clfs/.bashrc && \\
     69        echo "LC_ALL=POSIX" >> /home/clfs/.bashrc && \\
     70        echo "PATH=/cross-tools/bin:/bin:/usr/bin" >> /home/clfs/.bashrc && \\
     71        echo "export CLFS LC_ALL PATH" >> /home/clfs/.bashrc && \\
     72        echo "" >> /home/clfs/.bashrc && \\
     73        echo "unset CFLAGS" >> /home/clfs/.bashrc && \\
     74        echo "unset CXXFLAGS" >> /home/clfs/.bashrc && \\
     75        echo "" >> /home/clfs/.bashrc && \\
     76        echo "export CLFS_HOST=\"${CLFS_HOST}\"" >> /home/clfs/.bashrc && \\
     77        echo "export CLFS_TARGET=\"${TARGET}\"" >> /home/clfs/.bashrc && \\
     78        echo "export CLFS_TARGET32=\"${TARGET32}\"" >> /home/clfs/.bashrc && \\
     79        echo "source $JHALFSDIR/envars" >> /home/clfs/.bashrc
     80        @chown clfs:clfs /home/clfs/.bashrc && \\
    8181        touch envars && \\
    8282        touch \$@ && \\
     
    118118                                  -e 's@-static@@' \
    119119                                  -e 's@-final@@' \
    120                                   -e 's@-headers@@' \
    121                                   -e 's@-64@@' \
     120                                  -e 's@-64@@' \
    122121                                  -e 's@-n32@@'`
    123     # Adjust 'name' and patch a few scripts on the fly..
    124     case $name in
    125       linux-libc) name=linux-libc-headers ;;
    126     esac
    127     #
    128     # Find the version of the command files, if it corresponds with the building of a specific package
    129     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    130 
     122    pkg_tarball=$(get_package_tarball_name $name)
    131123
    132124    #--------------------------------------------------------------------#
     
    138130    wrt_target "${this_script}" "$PREV"
    139131    #
    140     # If $vrs isn't empty, we've got a package...
    141     #
    142     [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"
    143     #
    144     wrt_run_as_su "${this_script}" "${file}"
    145     #
    146     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     132    # If $pkg_tarball isn't empty, we've got a package...
     133    #
     134    [[ "$pkg_tarball" != "" ]] && wrt_unpack_clfs "$pkg_tarball"
     135    #
     136    wrt_run_as_clfs_su "${this_script}" "${file}"
     137    #
     138    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"
    147139    #
    148140    # Include a touch of the target name so make can check if it's already been made.
     
    169161    this_script=`basename $file`
    170162    #
     163    #  Deal with any odd scripts..
     164    case $this_script in
     165      *choose) # The choose script will fail if you cannot enter the new environment
     166               # If the 'boot' build method was chosen don't run the script
     167         [[ $METHOD = "boot" ]] && continue; ;;
     168      *) ;;
     169    esac
     170
     171    #
    171172    # First append each name of the script files to a list (this will become
    172173    # the names of the targets in the Makefile
     
    177178    name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
    178179    #
    179     # Find the version of the command files, if it corresponds with the building of a specific package
    180     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    181 
     180    pkg_tarball=$(get_package_tarball_name $name)
    182181
    183182    #--------------------------------------------------------------------#
     
    189188    wrt_target "${this_script}" "$PREV"
    190189    #
    191     # If $vrs isn't empty, we've got a package...
     190    # If $pkg_tarball isn't empty, we've got a package...
    192191    # Insert instructions for unpacking the package and to set the PKGDIR variable.
    193192    #
    194     [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"
    195     [[ "$vrs" != "" ]] && [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
    196     #
    197     wrt_run_as_su "${this_script}" "${file}"
    198     #
    199     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     193    [[ "$pkg_tarball" != "" ]] && wrt_unpack_clfs "$pkg_tarball"
     194    [[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     195    #
     196    wrt_run_as_clfs_su "${this_script}" "${file}"
     197    #
     198    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"
    200199    #
    201200    # Include a touch of the target name so make can check if it's already been made.
     
    250249      *)              name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;;
    251250    esac
    252 
    253     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     251      # Identify the unique version naming scheme for the clfs bootscripts..(bad boys)
     252    pkg_tarball=$(get_package_tarball_name $name)
    254253
    255254    #--------------------------------------------------------------------#
     
    261260    wrt_target "${this_script}" "$PREV"
    262261    #
    263     # If $vrs isn't empty, we've got a package...
     262    # If $pkg_tarball isn't empty, we've got a package...
    264263    # Insert instructions for unpacking the package and changing directories
    265264    #
    266     [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*"
    267     [[ "$vrs" != "" ]] && [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     265    [[ "$pkg_tarball" != "" ]] && wrt_unpack_clfs "$pkg_tarball"
     266    [[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
    268267    #
    269268    # Select a script execution method
    270269    case $this_script in
    271       *changingowner*)  wrt_run_as_root "${this_script}" "${file}"    ;;
    272       *devices*)        wrt_run_as_root "${this_script}" "${file}"    ;;
     270      *changingowner*)  wrt_run_as_clfs_root "${this_script}" "${file}"    ;;
     271      *devices*)        wrt_run_as_clfs_root "${this_script}" "${file}"    ;;
    273272      *fstab*)   if [[ -n "$FSTAB" ]]; then
    274273                   wrt_copy_fstab "${this_script}"
    275274                 else
    276                    wrt_run_as_su  "${this_script}" "${file}"
     275                   wrt_run_as_clfs_su  "${this_script}" "${file}"
    277276                 fi
    278277         ;;
    279       *)         wrt_run_as_su  "${this_script}" "${file}"       ;;
     278      *)         wrt_run_as_clfs_su  "${this_script}" "${file}"       ;;
    280279    esac
    281280    #
    282281    # Housekeeping...remove any build directory(ies) except if the package build fails.
    283     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     282    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"
    284283    #
    285284    # Include a touch of the target name so make can check if it's already been made.
     
    318317    # Grab the name of the target, strip id number, XXX-script
    319318    name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
    320     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     319
     320    pkg_tarball=$(get_package_tarball_name $name)
    321321
    322322    #--------------------------------------------------------------------#
     
    328328    wrt_target "${this_script}" "$PREV"
    329329    #
    330     # If $vrs isn't empty, we've got a package...
     330    # If $pkg_tarball isn't empty, we've got a package...
    331331    # Insert instructions for unpacking the package and changing directories
    332332    #
    333     if [ "$vrs" != "" ] ; then
     333    if [ "$pkg_tarball" != "" ] ; then
    334334      case $this_script in
    335         *util-linux)    wrt_unpack  "$name-$vrs.tar.*"  ;;
    336         *)              wrt_unpack2 "$name-$vrs.tar.*"  ;;
     335        *util-linux)    wrt_unpack_clfs  "$pkg_tarball"  ;;
     336        *)              wrt_unpack2 "$pkg_tarball"  ;;
    337337      esac
    338338      [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     
    341341    # Select a script execution method
    342342    case $this_script in
    343       *kernfs)        wrt_run_as_root    "${this_script}" "${file}"  ;;
    344       *util-linux)    wrt_run_as_su     "${this_script}" "${file}"  ;;
    345       *)              wrt_run_as_chroot1 "${this_script}" "${file}"  ;;
     343      *kernfs)        wrt_run_as_clfs_root "${this_script}" "${file}"  ;;
     344      *util-linux)    wrt_run_as_clfs_su   "${this_script}" "${file}"  ;;
     345      *)              wrt_run_as_chroot1   "${this_script}" "${file}"  ;;
    346346    esac
    347347    #
    348348    # Housekeeping...remove the build directory(ies), except if the package build fails.
    349     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     349    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"
    350350    #
    351351    # Include a touch of the target name so make can check if it's already been made.
     
    383383                                  -e 's@n32@@'`
    384384
    385     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     385    pkg_tarball=$(get_package_tarball_name $name)
    386386
    387387    #--------------------------------------------------------------------#
     
    393393    wrt_target "${this_script}" "$PREV"
    394394    #
    395     case $name in
    396       tcl)    wrt_unpack2 "$name$vrs-src.tar.*" ;;
    397       *)      wrt_unpack2 "$name-$vrs.tar.*"    ;;
    398     esac
     395    wrt_unpack2 "$pkg_tarball"
    399396    [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
    400397    #
     
    438435                                  -e 's@n32@@'`
    439436
    440     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     437    pkg_tarball=$(get_package_tarball_name $name)
    441438
    442439    #--------------------------------------------------------------------#
     
    446443    # Drop in the name of the target on a new line, and the previous target
    447444    # as a dependency. Also call the echo_message function.
    448     wrt_target "${this_script}" "$PREV"
    449     #
    450     case $name in
    451       tcl)    wrt_unpack3 "$name$vrs-src.tar.*" ;;
    452       *)      wrt_unpack3 "$name-$vrs.tar.*"    ;;
    453     esac
     445    wrt_target_boot "${this_script}" "$PREV"
     446    #
     447    wrt_unpack3 "$pkg_tarball"
    454448    [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
    455449    #
     
    520514    # a specific package. We need this here to can skip scripts not needed for
    521515    # iterations rebuilds
    522     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    523 
    524     if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
     516    pkg_tarball=$(get_package_tarball_name $name)
     517
     518    if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then
    525519      case "${this_script}" in
    526520        *stripping*) ;;
     
    545539    wrt_target "${this_script}${N}" "$PREV"
    546540
    547     # If $vrs isn't empty, we've got a package...
    548     if [ "$vrs" != "" ] ; then
    549       FILE="$name-$vrs.tar.*"
    550       wrt_unpack2 "$FILE"
     541    # If $pkg_tarball isn't empty, we've got a package...
     542    if [ "$pkg_tarball" != "" ] ; then
     543      wrt_unpack2 "$pkg_tarball"
    551544      # If the testsuites must be run, initialize the log file
    552545      case $name in
     
    564557    wrt_run_as_chroot1 "${this_script}" "${file}"
    565558    #
    566     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     559    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"
    567560    #
    568561    # Include a touch of the target name so make can check if it's already been made.
     
    631624    # a specific package. We need this here to can skip scripts not needed for
    632625    # iterations rebuilds
    633     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    634 
    635     if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
     626
     627    pkg_tarball=$(get_package_tarball_name $name)
     628
     629    if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then
    636630      case "${this_script}" in
    637631        *stripping*) ;;
     
    654648    # Drop in the name of the target on a new line, and the previous target
    655649    # as a dependency. Also call the echo_message function.
    656     wrt_target "${this_script}${N}" "$PREV"
    657 
    658     # If $vrs isn't empty, we've got a package...
    659     if [ "$vrs" != "" ] ; then
    660       FILE="$name-$vrs.tar.*"
     650    wrt_target_boot "${this_script}${N}" "$PREV"
     651
     652    # If $pkg_tarball isn't empty, we've got a package...
     653    if [ "$pkg_tarball" != "" ] ; then
     654      FILE="$pkg_tarball"
    661655      wrt_unpack3 "$FILE"
    662656      # If the testsuites must be run, initialize the log file
     
    675669    wrt_run_as_root2 "${this_script}" "${file}"
    676670    #
    677     [[ "$vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"
     671    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}"
    678672    #
    679673    # Include a touch of the target name so make can check if it's already been made.
     
    721715      *udev-rules)   name=udev-cross-lfs ;;
    722716    esac
    723     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     717
     718    pkg_tarball=$(get_package_tarball_name $name)
    724719
    725720    #--------------------------------------------------------------------#
     
    731726    wrt_target "${this_script}" "$PREV"
    732727    #
    733     # If $vrs isn't empty, we've got a package...
    734     #
    735     [[ "$vrs" != "" ]] && wrt_unpack2 "$name-$vrs.tar.*"
     728    # If $pkg_tarball isn't empty, we've got a package...
     729    #
     730    [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball"
    736731    #
    737732    wrt_run_as_chroot1 "${this_script}" "${file}"
    738733    #
    739     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     734    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"
    740735    #
    741736    # Include a touch of the target name so make can check if it's already been made.
     
    782777       ;;
    783778    esac
    784     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     779
     780    pkg_tarball=$(get_package_tarball_name $name)
    785781
    786782    #--------------------------------------------------------------------#
     
    790786    # Drop in the name of the target on a new line, and the previous target
    791787    # as a dependency. Also call the echo_message function.
    792     wrt_target "${this_script}" "$PREV"
    793     #
    794     # If $vrs isn't empty, we've got a package...
    795     #
    796     [[ "$vrs" != "" ]] && wrt_unpack3 "$name-$vrs.tar.*"
     788    wrt_target_boot "${this_script}" "$PREV"
     789    #
     790    # If $pkg_tarball isn't empty, we've got a package...
     791    #
     792    [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball"
    797793    #
    798794    wrt_run_as_root2 "${this_script}" "${file}"
    799795    #
    800     [[ "$vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"
     796    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}"
    801797    #
    802798    # Include a touch of the target name so make can check if it's already been made.
     
    845841       ;;
    846842    esac
    847     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     843
     844    pkg_tarball=$(get_package_tarball_name $name)
    848845
    849846    #--------------------------------------------------------------------#
     
    855852    wrt_target "${this_script}" "$PREV"
    856853    #
    857     # If $vrs isn't empty, we've got a package...
     854    # If $pkg_tarball isn't empty, we've got a package...
    858855    # Insert instructions for unpacking the package and changing directories
    859856    #
    860     [[ "$vrs" != "" ]] && wrt_unpack2 "$name-$vrs.tar.*"
     857    [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball"
    861858    #
    862859    # Select a script execution method
     
    872869    #
    873870    # Housekeeping...remove any build directory(ies) except if the package build fails.
    874     [[ "$vrs" != "" ]] && wrt_remove_build_dirs "${name}"
     871    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}"
    875872    #
    876873    # Include a touch of the target name so make can check if it's already been made.
     
    918915    # Grab the name of the target, strip id number and misc words.
    919916    case $this_script in
    920       *kernel) name=linux
    921          ;;
     917      *kernel) name=linux  ;;
    922918      *)       name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;;
    923919    esac
    924920
    925     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
     921    pkg_tarball=$(get_package_tarball_name $name)
    926922
    927923    #--------------------------------------------------------------------#
     
    931927    # Drop in the name of the target on a new line, and the previous target
    932928    # as a dependency. Also call the echo_message function.
    933     wrt_target "${this_script}" "$PREV"
    934     #
    935     # If $vrs isn't empty, we've got a package...
     929    wrt_target_boot "${this_script}" "$PREV"
     930    #
     931    # If $pkg_tarball isn't empty, we've got a package...
    936932    # Insert instructions for unpacking the package and changing directories
    937933    #
    938     [[ "$vrs" != "" ]] && wrt_unpack3 "$name-$vrs.tar.*"
     934    [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball"
    939935    #
    940936    # Select a script execution method
     
    952948    #
    953949    # Housekeeping...remove any build directory(ies) except if the package build fails.
    954     [[ "$vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"
     950    [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}"
    955951    #
    956952    # Include a touch of the target name so make can check if it's already been made.
     
    10321028                                                                -e 's|exit||g' \
    10331029                                                                -e 's|$| -c|' \
    1034                                                                 -e 's|"$$LFS"|$(MOUNT_PT)|'\
     1030                                                                -e 's|"$$CLFS"|$(MOUNT_PT)|'\
    10351031                                                                -e 's|set -e||'`
    10361032    echo -e "CHROOT1= $chroot\n" >> $MKFILE
     
    10641060clean:  clean-chapter4 clean-chapter3 clean-chapter2
    10651061
     1062restart:
     1063        @echo "This feature does not exist for the CLFS makefile. (yet)"
     1064
    10661065clean-chapter2:
    1067         -if [ ! -f user-lfs-exist ]; then \\
    1068                 userdel lfs; \\
    1069                 rm -rf /home/lfs; \\
     1066        -if [ ! -f user-clfs-exist ]; then \\
     1067                userdel clfs; \\
     1068                rm -rf /home/clfs; \\
    10701069        fi;
    10711070        rm -rf \$(MOUNT_PT)/tools
     
    10731072        rm -rf \$(MOUNT_PT)/cross-tools
    10741073        rm -f /cross-tools
    1075         rm -f envars user-lfs-exist
     1074        rm -f envars user-clfs-exist
    10761075        rm -f 02* logs/02*.log
    10771076
    10781077clean-chapter3:
    10791078        rm -rf \$(MOUNT_PT)/tools/*
    1080         rm -f $cross_tools restore-lfs-env sources-dir
     1079        rm -f $cross_tools restore-clfs-env sources-dir
    10811080        cd logs && rm -f $cross_tools && cd ..
    10821081
     
    10921091
    10931092
    1094 restore-lfs-env:
     1093restore-clfs-env:
    10951094        @\$(call echo_message, Building)
    1096         @if [ -f /home/lfs/.bashrc.XXX ]; then \\
    1097                 mv -f /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
     1095        @if [ -f /home/clfs/.bashrc.XXX ]; then \\
     1096                mv -f /home/clfs/.bashrc.XXX /home/clfs/.bashrc; \\
    10981097        fi;
    1099         @if [ -f /home/lfs/.bash_profile.XXX ]; then \\
    1100                 mv /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
     1098        @if [ -f /home/clfs/.bash_profile.XXX ]; then \\
     1099                mv /home/clfs/.bash_profile.XXX /home/clfs/.bash_profile; \\
    11011100        fi;
    1102         @chown lfs:lfs /home/lfs/.bash* && \\
     1101        @chown clfs:clfs /home/clfs/.bash* && \\
    11031102        touch \$@ && \\
    11041103        echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
     
    11111110        @-umount \$(MOUNT_PT)/sys
    11121111        @-umount \$(MOUNT_PT)/proc
    1113         @-if [ ! -f user-lfs-exist ]; then \\
    1114                 userdel lfs; \\
    1115                 rm -rf /home/lfs; \\
     1112        @-if [ ! -f user-clfs-exist ]; then \\
     1113                userdel clfs; \\
     1114                rm -rf /home/clfs; \\
    11161115        fi;
    11171116
     
    11431142clean:  clean-makesys clean-makeboot clean-jhalfs
    11441143
     1144restart:
     1145        @echo "This feature does not exist for the CLFS makefile. (yet)"
     1146
    11451147clean-jhalfs:
    1146         -if [ ! -f user-lfs-exist ]; then \\
    1147                 userdel lfs; \\
    1148                 rm -rf /home/lfs; \\
     1148        -if [ ! -f user-clfs-exist ]; then \\
     1149                userdel clfs; \\
     1150                rm -rf /home/clfs; \\
    11491151        fi;
    11501152        rm -rf \$(MOUNT_PT)/tools
     
    11521154        rm -rf \$(MOUNT_PT)/cross-tools
    11531155        rm -f /cross-tools
    1154         rm -f envars user-lfs-exist
     1156        rm -f envars user-clfs-exist
    11551157        rm -f 02* logs/02*.log
    11561158
     
    11581160        rm -rf /tools/*
    11591161        rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools
    1160         rm -f restore-lfs-env sources-dir
     1162        rm -f restore-clfs-env sources-dir
    11611163        cd logs && rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools && cd ..
    11621164
     
    11741176
    11751177
    1176 restore-lfs-env:
     1178restore-clfs-env:
    11771179        @\$(call echo_message, Building)
    1178         @if [ -f /home/lfs/.bashrc.XXX ]; then \\
    1179                 mv -fv /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\
     1180        @if [ -f /home/clfs/.bashrc.XXX ]; then \\
     1181                mv -fv /home/clfs/.bashrc.XXX /home/clfs/.bashrc; \\
    11801182        fi;
    1181         @if [ -f /home/lfs/.bash_profile.XXX ]; then \\
    1182                 mv -v /home/lfs/.bash_profile.XXX /home/lfs/.bash_profile; \\
     1183        @if [ -f /home/clfs/.bash_profile.XXX ]; then \\
     1184                mv -v /home/clfs/.bash_profile.XXX /home/clfs/.bash_profile; \\
    11831185        fi;
    1184         @chown lfs:lfs /home/lfs/.bash* && \\
     1186        @chown clfs:clfs /home/clfs/.bash* && \\
    11851187        touch \$@ && \\
    11861188        echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
  • HLFS/config

    r1504208 r3b63c8c  
    3939#--- Book version
    4040LFSVRS=development
     41TREE=trunk/BOOK
    4142
    4243#--- Name of the makefile
  • HLFS/master.sh

    r1504208 r3b63c8c  
    120120    # Adjust 'name'
    121121    case $name in
    122       linux-libc) name=linux-libc-headers ;;
     122      linux-libc) name="linux-libc-headers" ;;
     123      gcc)        name="gcc-core"  ;;
     124      uclibc)     name="uClibc"  ;;
    123125    esac
    124126
    125127    # Set the dependency for the first target.
    126128    if [ -z $PREV ] ; then PREV=022-settingenvironment ; fi
    127 
    128129
    129130    #--------------------------------------------------------------------#
     
    137138    # Find the version of the command files, if it corresponds with the building of
    138139    # a specific package
    139     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    140     # If $vrs isn't empty, we've got a package...
    141     if [ "$vrs" != "" ] ; then
    142       # Deal with non-standard names
    143       case $name in
    144         tcl)    FILE="$name$vrs-src.tar.*"  ;;
    145         uclibc) FILE="uClibc-$vrs.tar.*"    ;;
    146         gcc)    FILE="gcc-core-$vrs.tar.*"  ;;
    147         *)      FILE="$name-$vrs.tar.*"     ;;
    148       esac
     140    pkg_tarball=$(get_package_tarball_name $name)
     141    # If $pkg_tarball isn't empty, we've got a package...
     142    if [ "$pkg_tarball" != "" ] ; then
    149143      # Insert instructions for unpacking the package and to set the PKGDIR variable.
    150144      case $this_script in
    151         *binutils* )
    152           wrt_unpack "$FILE" 1 ;; # Do not delete an existing package directories
    153         *)
    154           wrt_unpack "$FILE" ;;
     145        *binutils* )  wrt_unpack "$pkg_tarball" 1 ;; # Do not delete an existing package directories
     146        *)            wrt_unpack "$pkg_tarball" ;;
    155147      esac
    156148      # If the testsuites must be run, initialize the log file
     
    181173    # (so we can review config.cache, config.log, etc.)
    182174    # For Binutils the sources must be retained for some time.
    183     if [ "$vrs" != "" ] ; then
     175    if [ "$pkg_tarball" != "" ] ; then
    184176      case "${this_script}" in
    185         *binutils*) : # do NOTHING
    186           ;;
    187         *) wrt_remove_build_dirs "$name"
    188           ;;
     177        *binutils*) : ;;   # do NOTHING
     178        *gcc*) wrt_remove_build_dirs "gcc"    ;;
     179        *)     wrt_remove_build_dirs "$name"    ;;
    189180      esac
    190181    fi
     
    272263    name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
    273264
     265    #
     266    # Sed replacement to fix some rm command that could fail.
     267    # That should be fixed in the book sources.
     268    #
     269    case $name in
     270      glibc)  sed 's/rm /rm -f /' -i chapter06$N/$this_script        ;;
     271      gcc)    sed 's/rm /rm -f /' -i chapter06$N/$this_script        ;;
     272    esac
     273
     274    case $name in
     275      gcc)     name="gcc-core" ;;
     276      uclibc)  name="uClibc"   ;;
     277    esac
     278
    274279    # Find the version of the command files, if it corresponds with the building of
    275280    # a specific package
    276     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    277 
    278     if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
     281    pkg_tarball=$(get_package_tarball_name $name)
     282
     283    if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then
    279284      case "${this_script}" in
    280285        *stripping*) ;;
     
    291296    LOGS="$LOGS ${this_script}"
    292297
    293     #
    294     # Sed replacement to fix some rm command that could fail.
    295     # That should be fixed in the book sources.
    296     #
    297     case $name in
    298       glibc)
    299           sed 's/rm /rm -f /' -i chapter06$N/$this_script
    300         ;;
    301       gcc)
    302           sed 's/rm /rm -f /' -i chapter06$N/$this_script
    303         ;;
    304     esac
    305298
    306299    #--------------------------------------------------------------------#
     
    309302    #
    310303    # Drop in the name of the target on a new line, and the previous target
    311     # as a dependency. Also call the echo_message function.
     304    # as a dependency. Also call the echo_message function.             
    312305    wrt_target "${this_script}${N}" "$PREV"
    313306
    314     # If $vrs isn't empty, we've got a package...
     307    # If $pkg_tarball isn't empty, we've got a package...
    315308    # Insert instructions for unpacking the package and changing directories
    316     if [ "$vrs" != "" ] ; then
    317       # Deal with non-standard names
    318       case $name in
    319         tcl)    FILE="$name$vrs-src.tar.*" ;;
    320         uclibc) FILE="uClibc-$vrs.tar.*" ;;
    321         gcc)    FILE="gcc-core-$vrs.tar.*" ;;
    322         *)      FILE="$name-$vrs.tar.*" ;;
    323       esac
    324       wrt_unpack2 "$FILE"
     309    if [ "$pkg_tarball" != "" ] ; then
     310      wrt_unpack2 "$pkg_tarball"
    325311      wrt_target_vars
    326312      # If the testsuites must be run, initialize the log file
    327313      case $name in
    328         binutils | gcc | glibc )
     314        binutils | gcc-core | glibc )
    329315          [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
    330316          ;;
     
    354340    #
    355341    # Remove the build directory(ies) except if the package build fails.
    356     if [ "$vrs" != "" ] ; then
     342    if [ "$pkg_tarball" != "" ] ; then
    357343      wrt_remove_build_dirs "$name"
    358344    fi
     
    428414    case "${this_script}" in
    429415      *bootscripts*)
    430         vrs=`grep "^lfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    431         FILE="lfs-bootscripts-$vrs.tar.*"
    432         wrt_unpack2 "$FILE"
    433         vrs=`grep "^blfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    434         echo -e "\t@echo \"\$(MOUNT_PT)\$(SRC)/blfs-bootscripts-$vrs\" >> sources-dir" >> $MKFILE.tmp
     416        wrt_unpack2 $(get_package_tarball_name "lfs-bootscripts")
     417        blfs_bootscripts=$(get_package_tarball_name "blfs-bootscripts" | sed -e 's/.tar.*//' )
     418        echo -e "\t@echo \"\$(MOUNT_PT)\$(SRC)/$blfs_bootscripts\" >> sources-dir" >> $MKFILE.tmp
    435419        ;;
    436420    esac
     
    547531clean:  clean-chapter7 clean-chapter6 clean-chapter5 clean-chapter3
    548532
     533restart: restart_code all
     534
    549535clean-chapter3:
    550536        -if [ ! -f user-lfs-exist ]; then \\
     
    600586        fi;
    601587
     588restart_code:
     589        @echo ">>> This feature is experimental, BUGS may exist"       
     590       
     591        @if [ ! -L /tools ]; then \\
     592          echo -e "\\nERROR::\\n /tools is NOT a symlink.. /tools must point to \$(MOUNT_PT)/tools\\n" && false;\\
     593        fi;
     594       
     595        @if [ ! -e /tools ]; then \\
     596          echo -e "\\nERROR::\\nThe target /tools points to does not exist.\\nVerify the target.. \$(MOUNT_PT)/tools\\n" && false;\\
     597        fi;
     598       
     599        @if ! stat -c %N /tools | grep "\$(MOUNT_PT)/tools" >/dev/null ; then \\
     600          echo -e "\\nERROR::\\nThe symlink \\"/tools\\" does not point to \\"\$(MOUNT_PT)/tools\\".\\nCorrect the problem and rerun\\n" && false;\\
     601        fi;     
     602
     603        @if [ -f ???-kernfs ]; then \\
     604          mkdir -pv \$(MOUNT_PT)/{proc,sys};\\
     605          if !  mount -l | "\$(MOUNT_PT)/dev" >/dev/null ; then \\
     606            mount -vt ramfs ramfs \$(MOUNT_PT)/dev;\\
     607          fi;\\
     608          if [ ! -e \$(MOUNT_PT)/dev/console ]; then \\
     609            mknod -m 600 \$(MOUNT_PT)/dev/console c 5 1;\\
     610          fi;\\
     611          if [ ! -e \$(MOUNT_PT)/dev/null ]; then \\
     612            mknod -m 666 \$(MOUNT_PT)/dev/null c 1 3;\\
     613          fi;\\
     614          if ! mount -l | grep "\$(MOUNT_PT)/dev/pts" >/dev/null ; then \\
     615            mount -vt devpts -o gid=4,mode=620 devpts \$(MOUNT_PT)/dev/pts;\\
     616          fi;\\
     617          if ! mount -l | grep "\$(MOUNT_PT)/dev/shm" >/dev/null ; then \\
     618            mount -vt tmpfs shm \$(MOUNT_PT)/dev/shm;\\
     619          fi;\\
     620          if ! mount -l | grep "\$(MOUNT_PT)/proc" >/dev/null ; then \\
     621            mount -vt proc proc \$(MOUNT_PT)/proc;\\
     622          fi;\\
     623          if ! mount -l | grep "\$(MOUNT_PT)/sys" >/dev/null ; then \\
     624            mount -vt sysfs sysfs \$(MOUNT_PT)/sys;\\
     625          fi;\\
     626        fi;
     627
     628
    602629EOF
    603630) >> $MKFILE
  • LFS/config

    r1504208 r3b63c8c  
    1111
    1212#--- Fully qualified path to a kernel config file
    13 # If no config file is  specified the kernel is NOT compiled
     13# If no config file is specified the kernel is NOT compiled
    1414CONFIG=
    1515
    16 # Get the kernel package and patches even if no configutation file
     16# Get the kernel package and patches even if no configuration file
    1717# has been supplied? 0(no)/1(yes)
    1818GETKERNEL=0
     
    3333#--- Book version
    3434LFSVRS=development
     35TREE=trunk/BOOK
    3536
    3637#--- Name of the makefile
  • LFS/master.sh

    r1504208 r3b63c8c  
    107107    # Find the version of the command files, if it corresponds with the building of
    108108    # a specific package
    109     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    110 
    111     # If $vrs isn't empty, we've got a package...
    112     if [ "$vrs" != "" ] ; then
    113       if [ "$name" = "tcl" ] ; then
    114         FILE="$name$vrs-src.tar.*"
    115       else
    116         FILE="$name-$vrs.tar.*"
    117       fi
    118 
     109    pkg_tarball=$(get_package_tarball_name $name)
     110
     111    # If $pkg_tarball isn't empty, we've got a package...
     112    if [ "$pkg_tarball" != "" ] ; then
    119113      # Insert instructions for unpacking the package and to set the PKGDIR variable.
    120       wrt_unpack "$FILE"
     114      wrt_unpack "$pkg_tarball"
    121115      # If the testsuites must be run, initialize the log file
    122116      [[ "$TEST" = "3" ]] && wrt_test_log "${this_script}"
     
    135129    # Remove the build directory(ies) except if the package build fails
    136130    # (so we can review config.cache, config.log, etc.)
    137     if [ "$vrs" != "" ] ; then
     131    if [ "$pkg_tarball" != "" ] ; then
    138132      wrt_remove_build_dirs "$name"
    139133    fi
     
    196190    # a specific package. We need this here to can skip scripts not needed for
    197191    # iterations rebuilds
    198     vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    199 
    200     if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
     192    pkg_tarball=$(get_package_tarball_name $name)
     193
     194    if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then
    201195      case "${this_script}" in
    202196        *stripping*) ;;
     
    221215    wrt_target "${this_script}${N}" "$PREV"
    222216
    223     # If $vrs isn't empty, we've got a package...
     217    # If $pkg_tarball isn't empty, we've got a package...
    224218    # Insert instructions for unpacking the package and changing directories
    225     if [ "$vrs" != "" ] ; then
    226       FILE="$name-$vrs.tar.*"
    227       wrt_unpack2 "$FILE"
     219    if [ "$pkg_tarball" != "" ] ; then
     220      wrt_unpack2 "$pkg_tarball"
    228221      # If the testsuites must be run, initialize the log file
    229222      case $name in
     
    247240
    248241    # Remove the build directory(ies) except if the package build fails.
    249     if [ "$vrs" != "" ] ; then
     242    if [ "$pkg_tarball" != "" ] ; then
    250243      wrt_remove_build_dirs "$name"
    251244    fi
     
    305298    case "${this_script}" in
    306299      *bootscripts)
    307           vrs=`grep "^lfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    308           FILE="lfs-bootscripts-$vrs.tar.*"
    309           wrt_unpack2 "$FILE"
     300            name="lfs-bootscripts"
     301            pkg_tarball=$(get_package_tarball_name $name)
     302            wrt_unpack2 "$pkg_tarball"
    310303        ;;
    311304      *kernel)
    312           vrs=`grep "^linux-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
    313           FILE="linux-$vrs.tar.*"
    314           wrt_unpack2 "$FILE"
     305            name="linux"
     306            pkg_tarball=$(get_package_tarball_name $name)
     307            wrt_unpack2 "$pkg_tarball"
    315308       ;;
    316309    esac
     
    503496            mount -vt proc proc \$(MOUNT_PT)/proc;\\
    504497          fi;\\
    505           if ! mount -l | grep "$\(MOUNT_PT)/sys" >/dev/null ; then \\
     498          if ! mount -l | grep "\$(MOUNT_PT)/sys" >/dev/null ; then \\
    506499            mount -vt sysfs sysfs \$(MOUNT_PT)/sys;\\
    507500          fi;\\
  • README

    r1504208 r3b63c8c  
    55     This collection of scripts, known as jhalfs-X, strives to create
    66  accurate makefiles from the Linux From Scratch book series XML files.
    7   This software is an evolution of the original "jhalfs" code.
     7  This software is an evolution of the original "jhalfs-0.2" code.
    88
    99     The usage of this script assumes you have read and are familiar with
     
    3434  supplied symlinks. After editing the config file for the project you wish
    3535  to build, run the script.
    36  
     36
     37     IMPORTANT:
     38       If you use the switch -M (automatically run the generated makefile) you
     39       must be 'root' or you can run the scripts using 'sudo'
     40        i.e.  sudo ./lfs -G -M
     41
     42       If you want to run make manually you can only do so if you are 'root' or
     43       via 'sudo'
     44        i.e  (from within the jhalfs directory) sudo make
     45
    3746     The term <symlink> refers to the 1 of 3 package symlinks, lfs,hlfs,clfs.
    3847     Replace <symlink> with your choice of packages; i.e.: ./lfs
     
    5160     will give you a context sensitive list of command line switches.
    5261
     62   >>>> an expanded example
     63
     64   export SRC_ARCHIVE=/mnt/SourceFiles
     65
     66   ./lfs -D /mnt/partition4 \
     67         -K ~/jhalfs_configs/linux-2.6.16.19-LFS.config \
     68         -F ~/jhalfs-configs/fstab-sda3 \
     69         -G -T 0 -M
     70
     71   explanation:::
     72
     73   export SRC_ARCHIVE=/mnt/SourceFiles
     74      # This points to a local archive of existing packages. If the version in
     75        the archive is incorrect jhalfs will access the net and download the
     76        necessary version and store it here for later use. DO NOT set this to
     77        $BUILDDIR/sources. If you do not set this variable to a valid directory
     78        ALL package tarballs will be downloaded from the 'net.
     79
     80   -D /mnt/partition4
     81      # where everything takes place.  ..NOTE it must already exist and be mounted
     82
     83   -K ~/jhalfs_configs/linux-2.6.16.19-LFS.config
     84      # If you want to automatically build a the kernel you MUST supply a valid
     85        kernel configuration file. The file you supply will be copied and renamed.
     86
     87   -F ~/jhalfs-configs/fstab-sda3
     88      # If you have a fstab file you wish to use it will be copied and renamed
     89
     90   -G   # Retrieve the package files. You MUST enable this flag at least once if you
     91          wish to do a build or whenever you update the book.
     92
     93   -T 0 # don't run any testsuites
     94
     95   -M   # automatically run make against Makefile once jhalfs finishes its work.
     96
     97
    53985. LAYOUT::
    5499
     
    56101             /master.sh
    57102             /xxxx.xsl
     103
     104        /CLFS2/config
     105              /master.sh
     106              /xxxx.xsl
    58107
    59108        /HLFS/config
     
    84133
    85134         ./clfs  ---|
     135         ./clfs2 ---|
    86136         ./hlfs  ---|+---> master.sh
    87137         ./lfs   ---|
     
    89139
    901406. FAQ::
     141    Q. "This 'help' file is very sparse"
     142    A. Yes, it is. This tool, jhalfs, is for those who understand the LFS books
     143       and wish to automate the build. 99% of any problems that arise can be
     144       solved by reading the book(s).
     145
    91146    Q. "It doesn't work!"
    92147    A. Yes it does, try ./lfs --help
    93148
     149    Q. "It still doesn't work"
     150    A. jhalfs was designed to work against the developement versions of the LFS
     151       series of books. Consequently changes in a book(s) sometimes breaks older
     152       versions of jhalfs. Before you start pulling out your hair download the
     153       latest version of jhalfs to see if that solves your problem.
     154
    94155    Q. "How do I specify the build location?"
    95     A. The original LFS document worked against the well know location /mnt/lfs.
     156    A. The original LFS document worked against the well known location /mnt/lfs.
    96157       This script automates the build of all of the LFS series of books and uses
    97        a generic location $BUILDDIR with a default value a /mnt/build_dir.
     158       a generic location $BUILDDIR with a default value of /mnt/build_dir.
    98159       You may change this value to suit your needs.
    99160
     
    110171    Q. "What is the function of the SRC_ARCHIVE variable?"
    111172    A. When then symlinked master.sh runs it creates a local copy of the
    112        necessary packages in BUILDDIR/sources by downloading the files. If 
    113        the variable SRC_ARCHIVE is defined the software will first look in 
     173       necessary packages in BUILDDIR/sources by downloading the files. If
     174       the variable SRC_ARCHIVE is defined the software will first look in
    114175       this location for the file and, if found, will copy it to BUILDDIR/sources.
    115        If the files are not found in SRC_ARCHIVE _and_ you have write priv to 
     176       If the files are not found in SRC_ARCHIVE _and_ you have write priv to
    116177       the directory any downloaded files will be mirrored there.
    117178
     
    120181       export SRC_ARCHIVE=/wherever/you/store/downloaded/packages
    121182                       OR
    122        you can change the setting in .common/config.
     183       you can change the setting in common/config.
    123184
    124185    Q. "Why have 2 copies of the files?"
    125     A. The package files must be visible during the chroot phase and this is a 
     186    A. The package files must be visible during the chroot phase and this is a
    126187       simple and reliable method of doing so. This method also handles the CLFS
    127188       build method where the final build may be done on a separate machine.
     189
     190    Q. "When I try to build 'xxx' with clfs the makefile fails at the mid-point"
     191    A. There could be numerous reasons for the failure but the most likely reason
     192       is you are doing a cross-build using the 'chroot' method and the target is
     193       not compatible with the host.  If you choose to build using the chroot
     194       method a test is performed at the end of the temptools phase. If the test
     195       succeeds the build continues inside a chroot jail. However if the test fails
     196       it means the host and target are not compatible an you should use the
     197       'boot' method to create your target code.
     198       As an extreme example: You can build a sparc target on a x86 platform but
     199       only the temptools phase. You must run ./clfs using the 'boot' method and
     200       not the 'chroot.' You must transfer the toolchain to a sparc platform, reboot
     201       the sparc box and continue the build.
     202       Of all the LFS series of books Cross-LFS requires the greatest
     203       understanding of host/target hardware combination. Please read the book
     204       carefully and don't skip the easy parts (there are none..)
    128205
    129206Authors:
  • common/common-functions

    r1504208 r3b63c8c  
    5353${BOLD}  -B, --book VER${OFF}
    5454        use VER version of the book as the system to build.
    55         Supported versions are: dev*, trunk, SVN
    56         These are aliases for the Development version of {C,H}LFS
     55        Supported VER values are:
     56          dev*, trunk, SVN = aliases for the Development version of {C,H}LFS
     57          branch-NAME = a branch of name NAME
     58          VERSION = the version of a stable released book
     59        To know what branches and stable books work with this version of jhalfs
     60        please see http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
    5761
    5862${BOLD}  -D  --directory DIR${OFF}
     
    8488        use the local working copy placed in DIR as the $(echo $PROGNAME | tr [a-z] [A-Z]) book
    8589
    86 ${BOLD}  -C, --comparasion TYPE${OFF}
     90${BOLD}  -C, --comparison TYPE${OFF}
    8791         do iterative comparison analysis. This extends the total build time
    8892         considerably because the entire final system will rebuild itself
     
    9195           ICA   = do ICA as designed by Greg Schafer
    9296           farce = do the farce analysis designed by Ken Moffat
    93            both  = perfom both ICA and farce analysis
     97           both  = perform both ICA and farce analysis
    9498
    9599${BOLD}  -F, --fstab FILE${OFF}
     
    105109
    106110${BOLD}  -R --rebuild${OFF}
    107         clean the build directory before perfoming any other task. The directory
     111        clean the build directory before performing any other task. The directory
    108112        is cleaned only if it was populated by a previous jhalfs-X run.
    109113-EOF-
     
    128132-EOF-
    129133
     134[[ ${PROGNAME} = "clfs2" ]] &&
     135cat <<- -EOF-
     136
     137${BOLD}  -A, --arch ARCH ${OFF}
     138        Select the TARGET architecture, valid selections are:
     139           32bit builds
     140        arm
     141           64bit builds
     142
     143        64bit multi-lib
     144-EOF-
     145
    130146[[ ${PROGNAME} = "hlfs" ]] &&
    131147cat <<- -EOF-
     
    208224}
    209225
     226
     227#----------------------------------#
     228wrt_target_boot() {                # Create target and initialize log file
     229#----------------------------------#
     230  local i=$1
     231  local PREV=$2
     232  case $i in
     233    iteration* ) local LOGFILE=$this_script.log ;;
     234             * ) local LOGFILE=$this_script ;;
     235  esac
     236(
     237cat << EOF
     238
     239$i:  $PREV
     240        @\$(call echo_message, Building)
     241        @./progress_bar.sh \$@ &
     242        @echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=${SCRIPT_ROOT}\`\n" >logs/$LOGFILE
     243EOF
     244) >> $MKFILE.tmp
     245}
     246
     247#----------------------------#
     248get_package_tarball_name() { #
     249#----------------------------#
     250  local script_name=$1
     251
     252   # The use of 'head' is necessary to limit the return value to the FIRST match..
     253   # hopefully this will not cause problems.
     254   #
     255   case $script_name in
     256     tcl)   echo $(grep "^tcl" $JHALFSDIR/pkg_tarball_list | head -n1 ) ;;
     257     *)     echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 ) ;;
     258   esac
     259
     260}
    210261
    211262#----------------------------------#
     
    266317
    267318#----------------------------------#
     319wrt_unpack_clfs() {                # Unpack and set 'ROOT' var
     320#----------------------------------#
     321  local FILE=$1
     322  local optSAVE_PREVIOUS=$2
     323
     324  if [ "${optSAVE_PREVIOUS}" != "1" ]; then
     325    wrt_remove_existing_dirs "$FILE"
     326  fi
     327(
     328cat << EOF
     329        @\$(call unpack,$FILE)
     330        @ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
     331        echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)/\$\$ROOT" > envars && \\
     332        chown -R clfs \$(MOUNT_PT)\$(SRC)/\$\$ROOT
     333EOF
     334) >> $MKFILE.tmp
     335}
     336
     337
     338#----------------------------------#
    268339wrt_unpack2() {                    #
    269340#----------------------------------#
     
    361432cat << EOF
    362433        @( time { export LFS=\$(MOUNT_PT) && ${PROGNAME}-commands/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\
     434        echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/$this_script
     435EOF
     436) >> $MKFILE.tmp
     437}
     438
     439
     440#----------------------------------#
     441wrt_run_as_clfs_su() {             # Execute script inside time { }, footer to log file
     442#----------------------------------#
     443  local this_script=$1
     444  local file=$2
     445(
     446cat << EOF
     447        @( time { su - clfs -c "source /home/clfs/.bashrc && $JHALFSDIR/${PROGNAME}-commands/$file" >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\
     448        echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/$this_script
     449EOF
     450) >> $MKFILE.tmp
     451}
     452
     453
     454#----------------------------------#
     455wrt_run_as_clfs_root() {           # Some scripts must be run as root..
     456#----------------------------------#
     457  local this_script=$1
     458  local file=$2
     459(
     460cat << EOF
     461        @( time { export CLFS=\$(MOUNT_PT) && ${PROGNAME}-commands/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\
    363462        echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/$this_script
    364463EOF
     
    536635      rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,cross-tools,usr,var}
    537636      echo -ne "Cleaning $JHALFSDIR...\n"
    538       rm -rf $JHALFSDIR/{0*,1*,envars,sources-dir,*commands,logs,Makefile,*.xsl,makefile-functions,packages,patches}
     637      rm -rf $JHALFSDIR/{0*,1*,envars,sources-dir,*commands,*logs,Makefile,*.xsl,makefile-functions,pkg_tarball_list,*.config,*.sh}
    539638      echo -ne "Cleaning remainig extracted sources in $BUILDDIR/sources...\n"
    540639      rm -rf `find $BUILDDIR/sources/* -maxdepth 0 -type d`
     
    559658      hlfs) svn_root="HLFS" ;;
    560659      clfs) svn_root="cross-lfs" ;;
     660      clfs2) svn_root="cross-lfs" ;;
    561661      *) echo "BOOK not defined in function <get_book>"
    562662          exit 1 ;;
     
    567667    if [ -d ${PROGNAME}-$LFSVRS ] ; then
    568668      cd ${PROGNAME}-$LFSVRS
    569       if LC_ALL=C svn up | grep -q At && test -d $JHALFSDIR/${PROGNAME}-commands && \
    570       test -f $JHALFSDIR/packages ; then
     669      if LC_ALL=C svn up | grep -q At && \
     670         test -d $JHALFSDIR/${PROGNAME}-commands && \
     671         test -f $JHALFSDIR/pkg_tarball_list ; then
     672        # Set the canonical book version
    571673        echo -ne "done\n"
    572         # Set the canonical book version
    573674        cd $JHALFSDIR
    574         VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
     675        case $PROGNAME in
     676          clfs | clfs2)
     677            VERSION=$(xmllint --noent $BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//') ;;
     678          *)
     679            VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//')  ;;
     680        esac
    575681        get_sources
    576682      else
    577683        echo -ne "done\n"
    578         # Set the canonical book version
    579         cd $JHALFSDIR
    580         VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
    581684        extract_commands
    582685      fi
    583686    else
    584       case $LFSVRS in
    585         development)
    586            svn co $SVN/${svn_root}/trunk/BOOK ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
    587       esac
     687      svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
    588688      echo -ne "done\n"
    589       # Set the canonical book version
    590       cd $JHALFSDIR
    591       VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
    592689      extract_commands
    593690    fi
     691
    594692  else
    595693    echo -ne "Using $BOOK as book's sources ...\n"
    596     # Set the canonical book version
    597     cd $JHALFSDIR
    598     VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
    599694    extract_commands
    600695  fi
     696  echo -ne " Document version ${L_arrow}${BOLD}${VERSION}${R_arrow}\n"
    601697}
    602698
     
    610706
    611707  cd $JHALFSDIR
    612   VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
     708  case $PROGNAME in
     709    clfs | clfs2 )
     710      VERSION=$(xmllint --noent $BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//') ;;
     711    *)
     712      VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//')  ;;
     713  esac
    613714
    614715  # Start clean
     
    634735                 -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
    635736      ;;
     737
     738    clfs2)
     739        echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture"
     740        xsltproc --nonet \
     741                 --xinclude \
     742                 --stringparam testsuite $TEST \
     743                 --stringparam vim-lang $VIMLANG \
     744                 --stringparam timezone $TIMEZONE \
     745                 --stringparam page $PAGE \
     746                 --stringparam lang $LANG \
     747                 --stringparam keymap $KEYMAP \
     748                 -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
     749      ;;
    636750    hlfs)
    637751        echo -n " ${L_arrow}${BOLD}$MODEL${R_arrow} HLFS libc implementation"
     
    668782
    669783  # Create the packages file. We need it for proper Makefile creation
    670   rm -f packages
    671   echo -n "Creating <${PROGNAME}> specific packages file"
    672   grep "\-version " $BOOK/packages.ent | sed -e 's@<!ENTITY @@' \
    673                                              -e 's@">@"@' > packages
    674   echo " ...OK"
     784  create_package_list
    675785
    676786  # Done. Moving on...
    677787  get_sources
    678788}
     789
     790#----------------------------#
     791create_package_list() {      #
     792#----------------------------#
     793
     794  # Create the packages file. We need it for proper Makefile creation
     795  rm -f pkg_tarball_list
     796  echo -n "Creating <${PROGNAME}> list of tarball names for $BOOK $ARCH"
     797  case ${PROGNAME} in
     798    clfs | clfs2)
     799        xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
     800                 $BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
     801      ;;
     802    hlfs)
     803        xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
     804                 $BOOK/chapter04/chapter04.xml >>$LOGDIR/$LOG 2>&1
     805      ;;
     806    lfs)
     807        xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
     808                 $BOOK/chapter03/chapter03.xml >>$LOGDIR/$LOG 2>&1
     809      ;;
     810  esac
     811  echo " ...OK"
     812
     813}
     814
    679815
    680816#----------------------------#
     
    794930
    795931  if [[ -s MISSING_FILES.DMP ]]; then
    796     echo  -e "\n\n${tab_}${RED} One or more files were not retrieved or have a bad MD5SUMS chechsum.\n${tab_} Check ${L_arrow}$BUILDDIR/sources/MISSING_FILES.DMP${R_arrow} for names ${OFF}\n"
    797       # Do not allow the automatic exection of the Makefile.
     932    echo  -e "\n\n${tab_}${RED} One or more files were not retrieved or have bad MD5SUMS.\n${tab_} Check ${L_arrow}$BUILDDIR/sources/MISSING_FILES.DMP${R_arrow} for names ${OFF}\n"
     933      # Do not allow the automatic execution of the Makefile.
    798934    echo "${tab_}${BOLD}${RED}*** ${YELLOW}Automatic execution of the generated makefile has been inhibited. ${RED}***${OFF}${nl_}"
    799935    RUNMAKE=0
    800936  fi
    801937}
    802 
    803938
    804939#----------------------------#
     
    816951        echo " ...OK"
    817952      ;;
     953    clfs2)
     954        echo -n "Creating CLFS2 <${ARCH}> specific URLs file"
     955        xsltproc --nonet --xinclude \
     956                 --stringparam server $SERVER \
     957                 -o $BUILDDIR/sources/urls.lst urls.xsl \
     958                 $BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1
     959        echo " ...OK"
     960      ;;
    818961    hlfs)
    819962        echo -n "Creating HLFS <${MODEL}> specific URLs file"
  • common/config

    r1504208 r3b63c8c  
    1717
    1818#=== Getting packages ===
     19#    Files will be retrieved from the local archive SRC_ARCHIVE
     20#    (if defined) or the 'net and will be stored in $BUILDDIR/sources
    1921#--- Download the source packages 0(no)/1(yes)
    2022GETPKG=0
     
    3133
    3234#=== Build options ===
    33 #--- Run the makefile at the end  0(no)/1(yes)
     35#--- Automatically run the makefile once it has been created  0(no)/1(yes)
    3436RUNMAKE=0
    3537
  • common/func_compare.sh

    r1504208 r3b63c8c  
    3535
    3636  echo -e "\nsystem_build_$RUN: $PREV_IT $system_build" >> $MKFILE.tmp
    37   PREV=system_build_$RUN
    38 
    3937}
    4038
     
    113111        popd 1> /dev/null
    114112        @touch \$@ && \\
     113        sleep .25 && \\
    115114        echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
    116115        echo --------------------------------------------------------------------------------\$(WHITE)
  • common/func_validate_configs.sh

    r1504208 r3b63c8c  
    3737   "x86_64-64")  [[ "${TARGET}" = "x86_64-unknown-linux-gnu" ]] && return
    3838    ;;
    39    "mips64-64")  [[ "${TARGET}" = "mipsel-unknown-linux-gnu" ]] && return
    40                  [[ "${TARGET}" = "mips-unknown-linux-gnu"   ]] && return
     39   "mips64-64")  [[ "${TARGET}" = "mips64el-unknown-linux-gnu" ]] && return
     40                 [[ "${TARGET}" = "mips64-unknown-linux-gnu"   ]] && return
    4141    ;;
    4242   "sparc64-64") [[ "${TARGET}" = "sparc64-unknown-linux-gnu" ]] && return
     
    4747                 [[ "${TARGET32}" = "i686-pc-linux-gnu" ]] && return
    4848    ;;
    49    "mips64")     [[ "${TARGET}"   = "mipsel-unknown-linux-gnu" ]] &&
     49   "mips64")     [[ "${TARGET}"   = "mips64el-unknown-linux-gnu" ]] &&
    5050                 [[ "${TARGET32}" = "mipsel-unknown-linux-gnu" ]] && return
    5151
    52                  [[ "${TARGET}"   = "mips-unknown-linux-gnu" ]] &&
     52                 [[ "${TARGET}"   = "mips64-unknown-linux-gnu" ]] &&
    5353                 [[ "${TARGET32}" = "mips-unknown-linux-gnu" ]] && return
    5454    ;;
    5555   "sparc64")    [[ "${TARGET}"   = "sparc64-unknown-linux-gnu" ]] &&
    56                  [[ "${TARGET32}" = "sparcv9-unknown-linux-gnu" ]] && return
     56                 [[ "${TARGET32}" = "sparc-unknown-linux-gnu" ]] && return
    5757    ;;
    5858   "ppc64")      [[ "${TARGET}"   = "powerpc64-unknown-linux-gnu" ]] &&
    5959                 [[ "${TARGET32}" = "powerpc-unknown-linux-gnu"   ]] && return
     60    ;;
     61   "arm")        [[ "${TARGET}"   = "arm-unknown-linux-gnu" ]] && return
    6062    ;;
    6163   *)  write_error_and_die
     
    8587
    8688  # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
    87   local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL KEYMAP         PAGE TIMEZONE LANG LC_ALL"
    88   local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD  ARCH  TARGET  TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG"
    89   local -r  lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE                       TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL        VIMLANG PAGE TIMEZONE LANG"
     89  local -r  hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL KEYMAP         PAGE TIMEZONE LANG LC_ALL"
     90  local -r  clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD  ARCH  TARGET  TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG"
     91  local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE         ARCH  TARGET       OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG"
     92  local -r   lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE                       TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB             CONFIG GETKERNEL        VIMLANG PAGE TIMEZONE LANG"
    9093
    9194  local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'
     
    209212      PAGE)       validate_against_str "xletterx xA4x" ;;
    210213      METHOD)     validate_against_str "xchrootx xbootx" ;;
    211       ARCH)       validate_against_str "xx86x xx86_64x xx86_64-64x xsparcx xsparc64x xsparc64-64x xmipsx xmips64x xmips64-64x xppcx xppc64x xalphax" ;;
     214      ARCH)       validate_against_str "xx86x xx86_64x xx86_64-64x xsparcx xsparc64x xsparc64-64x xmipsx xmips64x xmips64-64x xppcx xppc64x xalphax xarmx" ;;
    212215      TARGET)     validate_target ;;
    213216      GRSECURITY_HOST)  validate_against_str "x0x x1x" ;;
     
    217220                     validate_dir -z -d
    218221                   else
    219                      validate_against_str "x${PROGNAME}-developmentx"
     222                     validate_against_str "x${PROGNAME}-${LFSVRS}x"
    220223                   fi ;;
    221224
  • common/makefile-functions

    r1504208 r3b63c8c  
    5555  @echo -e \\t- Enter to the chroot using the command found
    5656  @echo -e \\tin the section -Entering the Chroot Environment-
    57   @echo -e \\texcept if building CLFS with METHOO=boot.
     57  @echo -e \\texcept if building CLFS with METHOD=boot.
    5858  @echo
    5959  @echo -e \\t- Set a password for the root user.
    6060  @echo
    61   @echo -e \\t- Edit /etc/fstab, /etc/hosts, /etc/sysconfig/clock,
     61  @echo -e \\t- Edit or create /etc/fstab, /etc/hosts, /etc/sysconfig/clock,
    6262  @echo -e \\t/etc/sysconfig/console, /etc/sysconfig/network,
    6363  @echo -e \\t/etc/sysconfig//network-devices/ifconfig.eth0/ipv4 and
     
    6666  @echo -e \\t- Exit from the chroot.
    6767  @echo
    68   @echo -e \\t- Set-up the boot loader, except if building CLFS with METHOO=boot.
     68  @echo -e \\t- Set-up the boot loader, except if building CLFS with METHOD=boot.
    6969  @echo -e \\tYou can set-up the host bootloader or the new boot-loader
    7070  @echo -e \\tinstalled on the new system.
    7171  @echo -e \\tIf the last, you must to mount the virtual filesystems, re-enter
    72   @echo -e \\tto the chroot and be sure that /dev is populated with the
     72  @echo -e \\tthe chroot and be sure that /dev is populated with the
    7373  @echo -e \\trequired devices before configure the boot-loader. When ready,
    7474  @echo -e \\texit from the chroot and umount the filesystems
     
    9393  @echo The build is not complete. Follow the next steps:$(WHITE)
    9494  @echo
    95   @echo -e \\t- Edit $(MOUNT_PT)/etc/fstab
     95  @echo -e \\t- Edit or create $(MOUNT_PT)/etc/fstab
    9696  @echo -e \\t and any other configuration file required to suit your needs.
    9797  @echo $(BOLD)
  • common/progress_bar.sh

    r1504208 r3b63c8c  
    2222declare -i  PREV_SEC=0
    2323
     24makePID=$(fuser -v . 2>&1 | grep make)
     25makePID=$(echo $makePID | cut -d" " -f2)
    2426
    2527write_or_exit() {
    2628    # make has been killed or failed or run to completion, leave
    27   if ! fuser -v . 2>&1 | grep make >/dev/null ; then
    28      echo -n "${CURSOR_ON}" && exit
    29   fi
     29  [[ ! -e /proc/$makePID ]] && echo -n "${CURSOR_ON}" && exit
     30
    3031    # Target build complete, leave.
    3132  [[ -f ${TARGET} ]] && echo -n "${CURSOR_ON}" && exit
     33
    3234    # It is safe to write to the screen
    3335  echo -n "$1"
  • master.sh

    r1504208 r3b63c8c  
    106106        dev* | SVN | trunk )
    107107          LFSVRS=development
    108           ;;
    109         *) if [[ "$PROGNAME" = "lfs" ]]; then
    110              case $1 in
    111                6.1.1 )
    112                  echo "For stable 6.1.1 book, please use jhalfs-0.2."
    113                  exit 0
    114                 ;;
    115                * )
    116                  echo "$1 is an unsupported version at this time."
    117                  exit 0
    118                 ;;
    119              esac
    120            else
    121              echo "The requested version, ${L_arrow} ${BOLD}$1${OFF} ${R_arrow}, is undefined in the ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF} series."
    122              exit 0
    123            fi
     108          TREE=trunk/BOOK
     109          ;;
     110        branch-* )
     111          LFSVRS=$1
     112          TREE=branches/${1#branch-}/BOOK
     113          ;;
     114        * )
     115          case $PROGNAME in
     116            lfs | hlfs )
     117              LFSVRS=$1
     118              TREE=tags/$1/BOOK
     119              ;;
     120            clfs )
     121              LFSVRS=$1
     122              TREE=tags/$1
     123              ;;
     124          esac
    124125          ;;
    125126      esac
     
    193194            BOOK=$1
    194195          else
    195             echo -e "\nLooks like $1 isn't a LFS working copy."
     196            echo -e "\nLooks like $1 isn't an LFS working copy."
    196197            exit 1
    197198          fi
     
    211212            BOOK=$1
    212213          else
    213             echo -e "\nLooks like $1 isn't a HLFS working copy."
     214            echo -e "\nLooks like $1 isn't an HLFS working copy."
    214215            exit 1
    215216          fi
     
    218219      ;;
    219220
    220     --comparasion | -C )
     221    --comparison | -C )
    221222      test $# = 1 && eval "$exit_missing_arg"
    222223      shift
     
    263264      ;;
    264265
    265     --make | -M )          RUNMAKE=1 ;;
     266    --run-make | -M )      RUNMAKE=1 ;;
    266267
    267268    --rebuild | -R )       CLEAN=1   ;;
     
    272273      shift
    273274      case $1 in
     275        arm )
     276          ARCH=arm
     277          TARGET="arm-unknown-linux-gnu"
     278          ;;
    274279        x86 )
    275280          ARCH=x86
     
    346351          ;;
    347352        * )
    348           echo -e "\n$1 is an unknown or unsopported arch."
     353          echo -e "\n$1 is an unknown or unsupported arch."
    349354          exit 1
    350355          ;;
     
    411416
    412417
    413 # Check for minumum gcc and kernel versions
     418# Check for minimum gcc and kernel versions
    414419#check_requirements  1 # 0/1  0-do not display values.
    415420echo
     
    494499  #
    495500  if [[ -n "$FILES" ]]; then
    496     # pushd/popd necessary to deal with mulitiple files
     501    # pushd/popd necessary to deal with multiple files
    497502    pushd $PACKAGE_DIR 1> /dev/null
    498503      cp $FILES $JHALFSDIR/
     
    502507  if [[ "$REPORT" = "1" ]]; then
    503508    cp $COMMON_DIR/create-sbu_du-report.sh  $JHALFSDIR/
    504     # After be sure that all look sane, dump the settings to a file
     509    # After being sure that all looks sane, dump the settings to a file
    505510    # This file will be used to create the REPORT header
    506511    validate_config > $JHALFSDIR/jhalfs.config
     
    509514  [[ "$GETPKG" = "1" ]] && cp $COMMON_DIR/urls.xsl  $JHALFSDIR/
    510515  #
     516  cp $COMMON_DIR/packages.xsl  $JHALFSDIR/
     517  #
    511518  sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL}
    512519  export XSL=$JHALFSDIR/${XSL}
Note: See TracChangeset for help on using the changeset viewer.