Changeset 3b63c8c
- Timestamp:
- 07/26/2006 06:42:01 PM (18 years ago)
- Branches:
- experimental
- Children:
- 613d46b
- Parents:
- 1504208
- Files:
-
- 4 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/TODO
r1504208 r3b63c8c 20 20 21 21 2. - 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) 23 27 24 28 3. - To develop the code to create the Makefile. … … 27 31 Must make the build scripts executables and set the SRC_ARCHIVE and 28 32 FTP_SERVER envars. 33 Work in progress. 29 34 30 35 4. - To find a way to track already installed packages by previous runs, to can -
CLFS/clfs.xsl
r1504208 r3b63c8c 231 231 <xsl:value-of select="$page"/> 232 232 </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> 233 237 <xsl:otherwise> 234 238 <xsl:text>**EDITME</xsl:text> -
CLFS/config
r1504208 r3b63c8c 23 23 # >>>> 64-64 BUILD <<<< 24 24 # ARCH=x86_64-64 ; TARGET="x86_64-unknown-linux-gnu" 25 # ARCH=mips64-64 ; TARGET="mips el-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" 27 27 # ARCH=sparc64-64 ; TARGET="sparc64-unknown-linux-gnu" 28 28 # ARCH=alpha ; TARGET="alpha-unknown-linux-gnu" … … 30 30 # >>>> MULTILIB 32/64 <<<< 31 31 # ARCH=x86_64 ; TARGET="x86_64-unknown-linux-gnu" ; TARGET32="i686-pc-linux-gnu" 32 # ARCH=mips64 ; TARGET="mips el-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="sparc v9-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" 35 35 # ARCH=ppc64 ; TARGET="powerpc64-unknown-linux-gnu" ; TARGET32="powerpc-unknown-linux-gnu" 36 36 … … 69 69 #--- Book version 70 70 LFSVRS=development 71 TREE=trunk/BOOK 71 72 72 73 #--- Name of the makefile -
CLFS/master.sh
r1504208 r3b63c8c 11 11 host_prep_Makefiles() { # Initialization of the system 12 12 #----------------------------# 13 local LFS_HOST13 local CLFS_HOST 14 14 15 15 echo "${tab_}${GREEN}Processing... ${L_arrow}host prep files${R_arrow}" 16 16 17 17 # 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/")" 19 19 ( 20 20 cat << EOF … … 42 42 025-addinguser: 024-creatingcrossdir 43 43 @\$(call echo_message, Building) 44 @if [ ! -d /home/ lfs ]; then \\45 groupadd lfs; \\46 useradd -s /bin/bash -g lfs -m -k /dev/nulllfs; \\44 @if [ ! -d /home/clfs ]; then \\ 45 groupadd clfs; \\ 46 useradd -s /bin/bash -g clfs -m -k /dev/null clfs; \\ 47 47 else \\ 48 touch user- lfs-exist; \\48 touch user-clfs-exist; \\ 49 49 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 && \\ 54 54 touch \$@ && \\ 55 55 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 58 58 026-settingenvironment: 025-addinguser 59 59 @\$(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; \\ 62 62 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; \\ 65 65 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/.bashrc80 @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 && \\ 81 81 touch envars && \\ 82 82 touch \$@ && \\ … … 118 118 -e 's@-static@@' \ 119 119 -e 's@-final@@' \ 120 -e 's@-headers@@' \ 121 -e 's@-64@@' \ 120 -e 's@-64@@' \ 122 121 -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) 131 123 132 124 #--------------------------------------------------------------------# … … 138 130 wrt_target "${this_script}" "$PREV" 139 131 # 140 # If $ vrsisn'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}" 147 139 # 148 140 # Include a touch of the target name so make can check if it's already been made. … … 169 161 this_script=`basename $file` 170 162 # 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 # 171 172 # First append each name of the script files to a list (this will become 172 173 # the names of the targets in the Makefile … … 177 178 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 178 179 # 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) 182 181 183 182 #--------------------------------------------------------------------# … … 189 188 wrt_target "${this_script}" "$PREV" 190 189 # 191 # If $ vrsisn't empty, we've got a package...190 # If $pkg_tarball isn't empty, we've got a package... 192 191 # Insert instructions for unpacking the package and to set the PKGDIR variable. 193 192 # 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}" 200 199 # 201 200 # Include a touch of the target name so make can check if it's already been made. … … 250 249 *) name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;; 251 250 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) 254 253 255 254 #--------------------------------------------------------------------# … … 261 260 wrt_target "${this_script}" "$PREV" 262 261 # 263 # If $ vrsisn't empty, we've got a package...262 # If $pkg_tarball isn't empty, we've got a package... 264 263 # Insert instructions for unpacking the package and changing directories 265 264 # 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" 268 267 # 269 268 # Select a script execution method 270 269 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}" ;; 273 272 *fstab*) if [[ -n "$FSTAB" ]]; then 274 273 wrt_copy_fstab "${this_script}" 275 274 else 276 wrt_run_as_ su "${this_script}" "${file}"275 wrt_run_as_clfs_su "${this_script}" "${file}" 277 276 fi 278 277 ;; 279 *) wrt_run_as_ su "${this_script}" "${file}" ;;278 *) wrt_run_as_clfs_su "${this_script}" "${file}" ;; 280 279 esac 281 280 # 282 281 # 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}" 284 283 # 285 284 # Include a touch of the target name so make can check if it's already been made. … … 318 317 # Grab the name of the target, strip id number, XXX-script 319 318 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) 321 321 322 322 #--------------------------------------------------------------------# … … 328 328 wrt_target "${this_script}" "$PREV" 329 329 # 330 # If $ vrsisn't empty, we've got a package...330 # If $pkg_tarball isn't empty, we've got a package... 331 331 # Insert instructions for unpacking the package and changing directories 332 332 # 333 if [ "$ vrs" != "" ] ; then333 if [ "$pkg_tarball" != "" ] ; then 334 334 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" ;; 337 337 esac 338 338 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" … … 341 341 # Select a script execution method 342 342 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}" ;; 346 346 esac 347 347 # 348 348 # 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}" 350 350 # 351 351 # Include a touch of the target name so make can check if it's already been made. … … 383 383 -e 's@n32@@'` 384 384 385 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`385 pkg_tarball=$(get_package_tarball_name $name) 386 386 387 387 #--------------------------------------------------------------------# … … 393 393 wrt_target "${this_script}" "$PREV" 394 394 # 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" 399 396 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 400 397 # … … 438 435 -e 's@n32@@'` 439 436 440 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`437 pkg_tarball=$(get_package_tarball_name $name) 441 438 442 439 #--------------------------------------------------------------------# … … 446 443 # Drop in the name of the target on a new line, and the previous target 447 444 # 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" 454 448 [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name" 455 449 # … … 520 514 # a specific package. We need this here to can skip scripts not needed for 521 515 # iterations rebuilds 522 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`523 524 if [[ "$ vrs" = "" ]] && [[ -n "$N" ]] ; then516 pkg_tarball=$(get_package_tarball_name $name) 517 518 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then 525 519 case "${this_script}" in 526 520 *stripping*) ;; … … 545 539 wrt_target "${this_script}${N}" "$PREV" 546 540 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" 551 544 # If the testsuites must be run, initialize the log file 552 545 case $name in … … 564 557 wrt_run_as_chroot1 "${this_script}" "${file}" 565 558 # 566 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"559 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 567 560 # 568 561 # Include a touch of the target name so make can check if it's already been made. … … 631 624 # a specific package. We need this here to can skip scripts not needed for 632 625 # 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 636 630 case "${this_script}" in 637 631 *stripping*) ;; … … 654 648 # Drop in the name of the target on a new line, and the previous target 655 649 # as a dependency. Also call the echo_message function. 656 wrt_target "${this_script}${N}" "$PREV"657 658 # If $ vrsisn't empty, we've got a package...659 if [ "$ vrs" != "" ] ; then660 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" 661 655 wrt_unpack3 "$FILE" 662 656 # If the testsuites must be run, initialize the log file … … 675 669 wrt_run_as_root2 "${this_script}" "${file}" 676 670 # 677 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"671 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 678 672 # 679 673 # Include a touch of the target name so make can check if it's already been made. … … 721 715 *udev-rules) name=udev-cross-lfs ;; 722 716 esac 723 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 717 718 pkg_tarball=$(get_package_tarball_name $name) 724 719 725 720 #--------------------------------------------------------------------# … … 731 726 wrt_target "${this_script}" "$PREV" 732 727 # 733 # If $ vrsisn'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" 736 731 # 737 732 wrt_run_as_chroot1 "${this_script}" "${file}" 738 733 # 739 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs "${name}"734 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs "${name}" 740 735 # 741 736 # Include a touch of the target name so make can check if it's already been made. … … 782 777 ;; 783 778 esac 784 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 779 780 pkg_tarball=$(get_package_tarball_name $name) 785 781 786 782 #--------------------------------------------------------------------# … … 790 786 # Drop in the name of the target on a new line, and the previous target 791 787 # as a dependency. Also call the echo_message function. 792 wrt_target "${this_script}" "$PREV"793 # 794 # If $ vrsisn'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" 797 793 # 798 794 wrt_run_as_root2 "${this_script}" "${file}" 799 795 # 800 [[ "$ vrs" != "" ]] && wrt_remove_build_dirs2 "${name}"796 [[ "$pkg_tarball" != "" ]] && wrt_remove_build_dirs2 "${name}" 801 797 # 802 798 # Include a touch of the target name so make can check if it's already been made. … … 845 841 ;; 846 842 esac 847 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` 843 844 pkg_tarball=$(get_package_tarball_name $name) 848 845 849 846 #--------------------------------------------------------------------# … … 855 852 wrt_target "${this_script}" "$PREV" 856 853 # 857 # If $ vrsisn't empty, we've got a package...854 # If $pkg_tarball isn't empty, we've got a package... 858 855 # Insert instructions for unpacking the package and changing directories 859 856 # 860 [[ "$ vrs" != "" ]] && wrt_unpack2 "$name-$vrs.tar.*"857 [[ "$pkg_tarball" != "" ]] && wrt_unpack2 "$pkg_tarball" 861 858 # 862 859 # Select a script execution method … … 872 869 # 873 870 # 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}" 875 872 # 876 873 # Include a touch of the target name so make can check if it's already been made. … … 918 915 # Grab the name of the target, strip id number and misc words. 919 916 case $this_script in 920 *kernel) name=linux 921 ;; 917 *kernel) name=linux ;; 922 918 *) name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's@-build@@' ` ;; 923 919 esac 924 920 925 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`921 pkg_tarball=$(get_package_tarball_name $name) 926 922 927 923 #--------------------------------------------------------------------# … … 931 927 # Drop in the name of the target on a new line, and the previous target 932 928 # as a dependency. Also call the echo_message function. 933 wrt_target "${this_script}" "$PREV"934 # 935 # If $ vrsisn'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... 936 932 # Insert instructions for unpacking the package and changing directories 937 933 # 938 [[ "$ vrs" != "" ]] && wrt_unpack3 "$name-$vrs.tar.*"934 [[ "$pkg_tarball" != "" ]] && wrt_unpack3 "$pkg_tarball" 939 935 # 940 936 # Select a script execution method … … 952 948 # 953 949 # 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}" 955 951 # 956 952 # Include a touch of the target name so make can check if it's already been made. … … 1032 1028 -e 's|exit||g' \ 1033 1029 -e 's|$| -c|' \ 1034 -e 's|"$$ LFS"|$(MOUNT_PT)|'\1030 -e 's|"$$CLFS"|$(MOUNT_PT)|'\ 1035 1031 -e 's|set -e||'` 1036 1032 echo -e "CHROOT1= $chroot\n" >> $MKFILE … … 1064 1060 clean: clean-chapter4 clean-chapter3 clean-chapter2 1065 1061 1062 restart: 1063 @echo "This feature does not exist for the CLFS makefile. (yet)" 1064 1066 1065 clean-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; \\ 1070 1069 fi; 1071 1070 rm -rf \$(MOUNT_PT)/tools … … 1073 1072 rm -rf \$(MOUNT_PT)/cross-tools 1074 1073 rm -f /cross-tools 1075 rm -f envars user- lfs-exist1074 rm -f envars user-clfs-exist 1076 1075 rm -f 02* logs/02*.log 1077 1076 1078 1077 clean-chapter3: 1079 1078 rm -rf \$(MOUNT_PT)/tools/* 1080 rm -f $cross_tools restore- lfs-env sources-dir1079 rm -f $cross_tools restore-clfs-env sources-dir 1081 1080 cd logs && rm -f $cross_tools && cd .. 1082 1081 … … 1092 1091 1093 1092 1094 restore- lfs-env:1093 restore-clfs-env: 1095 1094 @\$(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; \\ 1098 1097 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; \\ 1101 1100 fi; 1102 @chown lfs:lfs /home/lfs/.bash* && \\1101 @chown clfs:clfs /home/clfs/.bash* && \\ 1103 1102 touch \$@ && \\ 1104 1103 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ … … 1111 1110 @-umount \$(MOUNT_PT)/sys 1112 1111 @-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; \\ 1116 1115 fi; 1117 1116 … … 1143 1142 clean: clean-makesys clean-makeboot clean-jhalfs 1144 1143 1144 restart: 1145 @echo "This feature does not exist for the CLFS makefile. (yet)" 1146 1145 1147 clean-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; \\ 1149 1151 fi; 1150 1152 rm -rf \$(MOUNT_PT)/tools … … 1152 1154 rm -rf \$(MOUNT_PT)/cross-tools 1153 1155 rm -f /cross-tools 1154 rm -f envars user- lfs-exist1156 rm -f envars user-clfs-exist 1155 1157 rm -f 02* logs/02*.log 1156 1158 … … 1158 1160 rm -rf /tools/* 1159 1161 rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools 1160 rm -f restore- lfs-env sources-dir1162 rm -f restore-clfs-env sources-dir 1161 1163 cd logs && rm -f $cross_tools && rm -f $temptools && rm -f $chroottools && rm -f $boottools && cd .. 1162 1164 … … 1174 1176 1175 1177 1176 restore- lfs-env:1178 restore-clfs-env: 1177 1179 @\$(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; \\ 1180 1182 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; \\ 1183 1185 fi; 1184 @chown lfs:lfs /home/lfs/.bash* && \\1186 @chown clfs:clfs /home/clfs/.bash* && \\ 1185 1187 touch \$@ && \\ 1186 1188 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ -
HLFS/config
r1504208 r3b63c8c 39 39 #--- Book version 40 40 LFSVRS=development 41 TREE=trunk/BOOK 41 42 42 43 #--- Name of the makefile -
HLFS/master.sh
r1504208 r3b63c8c 120 120 # Adjust 'name' 121 121 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" ;; 123 125 esac 124 126 125 127 # Set the dependency for the first target. 126 128 if [ -z $PREV ] ; then PREV=022-settingenvironment ; fi 127 128 129 129 130 #--------------------------------------------------------------------# … … 137 138 # Find the version of the command files, if it corresponds with the building of 138 139 # 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 149 143 # Insert instructions for unpacking the package and to set the PKGDIR variable. 150 144 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" ;; 155 147 esac 156 148 # If the testsuites must be run, initialize the log file … … 181 173 # (so we can review config.cache, config.log, etc.) 182 174 # For Binutils the sources must be retained for some time. 183 if [ "$ vrs" != "" ] ; then175 if [ "$pkg_tarball" != "" ] ; then 184 176 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" ;; 189 180 esac 190 181 fi … … 272 263 name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'` 273 264 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 274 279 # Find the version of the command files, if it corresponds with the building of 275 280 # a specific package 276 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`277 278 if [[ "$ vrs" = "" ]] && [[ -n "$N" ]] ; then281 pkg_tarball=$(get_package_tarball_name $name) 282 283 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then 279 284 case "${this_script}" in 280 285 *stripping*) ;; … … 291 296 LOGS="$LOGS ${this_script}" 292 297 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 in298 glibc)299 sed 's/rm /rm -f /' -i chapter06$N/$this_script300 ;;301 gcc)302 sed 's/rm /rm -f /' -i chapter06$N/$this_script303 ;;304 esac305 298 306 299 #--------------------------------------------------------------------# … … 309 302 # 310 303 # 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. 312 305 wrt_target "${this_script}${N}" "$PREV" 313 306 314 # If $ vrsisn't empty, we've got a package...307 # If $pkg_tarball isn't empty, we've got a package... 315 308 # 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" 325 311 wrt_target_vars 326 312 # If the testsuites must be run, initialize the log file 327 313 case $name in 328 binutils | gcc | glibc )314 binutils | gcc-core | glibc ) 329 315 [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}" 330 316 ;; … … 354 340 # 355 341 # Remove the build directory(ies) except if the package build fails. 356 if [ "$ vrs" != "" ] ; then342 if [ "$pkg_tarball" != "" ] ; then 357 343 wrt_remove_build_dirs "$name" 358 344 fi … … 428 414 case "${this_script}" in 429 415 *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 435 419 ;; 436 420 esac … … 547 531 clean: clean-chapter7 clean-chapter6 clean-chapter5 clean-chapter3 548 532 533 restart: restart_code all 534 549 535 clean-chapter3: 550 536 -if [ ! -f user-lfs-exist ]; then \\ … … 600 586 fi; 601 587 588 restart_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 602 629 EOF 603 630 ) >> $MKFILE -
LFS/config
r1504208 r3b63c8c 11 11 12 12 #--- Fully qualified path to a kernel config file 13 # If no config file is 13 # If no config file is specified the kernel is NOT compiled 14 14 CONFIG= 15 15 16 # Get the kernel package and patches even if no configu tation file16 # Get the kernel package and patches even if no configuration file 17 17 # has been supplied? 0(no)/1(yes) 18 18 GETKERNEL=0 … … 33 33 #--- Book version 34 34 LFSVRS=development 35 TREE=trunk/BOOK 35 36 36 37 #--- Name of the makefile -
LFS/master.sh
r1504208 r3b63c8c 107 107 # Find the version of the command files, if it corresponds with the building of 108 108 # 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 119 113 # Insert instructions for unpacking the package and to set the PKGDIR variable. 120 wrt_unpack "$ FILE"114 wrt_unpack "$pkg_tarball" 121 115 # If the testsuites must be run, initialize the log file 122 116 [[ "$TEST" = "3" ]] && wrt_test_log "${this_script}" … … 135 129 # Remove the build directory(ies) except if the package build fails 136 130 # (so we can review config.cache, config.log, etc.) 137 if [ "$ vrs" != "" ] ; then131 if [ "$pkg_tarball" != "" ] ; then 138 132 wrt_remove_build_dirs "$name" 139 133 fi … … 196 190 # a specific package. We need this here to can skip scripts not needed for 197 191 # iterations rebuilds 198 vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`199 200 if [[ "$ vrs" = "" ]] && [[ -n "$N" ]] ; then192 pkg_tarball=$(get_package_tarball_name $name) 193 194 if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then 201 195 case "${this_script}" in 202 196 *stripping*) ;; … … 221 215 wrt_target "${this_script}${N}" "$PREV" 222 216 223 # If $ vrsisn't empty, we've got a package...217 # If $pkg_tarball isn't empty, we've got a package... 224 218 # 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" 228 221 # If the testsuites must be run, initialize the log file 229 222 case $name in … … 247 240 248 241 # Remove the build directory(ies) except if the package build fails. 249 if [ "$ vrs" != "" ] ; then242 if [ "$pkg_tarball" != "" ] ; then 250 243 wrt_remove_build_dirs "$name" 251 244 fi … … 305 298 case "${this_script}" in 306 299 *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" 310 303 ;; 311 304 *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" 315 308 ;; 316 309 esac … … 503 496 mount -vt proc proc \$(MOUNT_PT)/proc;\\ 504 497 fi;\\ 505 if ! mount -l | grep " $\(MOUNT_PT)/sys" >/dev/null ; then \\498 if ! mount -l | grep "\$(MOUNT_PT)/sys" >/dev/null ; then \\ 506 499 mount -vt sysfs sysfs \$(MOUNT_PT)/sys;\\ 507 500 fi;\\ -
README
r1504208 r3b63c8c 5 5 This collection of scripts, known as jhalfs-X, strives to create 6 6 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. 8 8 9 9 The usage of this script assumes you have read and are familiar with … … 34 34 supplied symlinks. After editing the config file for the project you wish 35 35 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 37 46 The term <symlink> refers to the 1 of 3 package symlinks, lfs,hlfs,clfs. 38 47 Replace <symlink> with your choice of packages; i.e.: ./lfs … … 51 60 will give you a context sensitive list of command line switches. 52 61 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 53 98 5. LAYOUT:: 54 99 … … 56 101 /master.sh 57 102 /xxxx.xsl 103 104 /CLFS2/config 105 /master.sh 106 /xxxx.xsl 58 107 59 108 /HLFS/config … … 84 133 85 134 ./clfs ---| 135 ./clfs2 ---| 86 136 ./hlfs ---|+---> master.sh 87 137 ./lfs ---| … … 89 139 90 140 6. 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 91 146 Q. "It doesn't work!" 92 147 A. Yes it does, try ./lfs --help 93 148 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 94 155 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. 96 157 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. 98 159 You may change this value to suit your needs. 99 160 … … 110 171 Q. "What is the function of the SRC_ARCHIVE variable?" 111 172 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 114 175 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 116 177 the directory any downloaded files will be mirrored there. 117 178 … … 120 181 export SRC_ARCHIVE=/wherever/you/store/downloaded/packages 121 182 OR 122 you can change the setting in .common/config.183 you can change the setting in common/config. 123 184 124 185 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 126 187 simple and reliable method of doing so. This method also handles the CLFS 127 188 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..) 128 205 129 206 Authors: -
common/common-functions
r1504208 r3b63c8c 53 53 ${BOLD} -B, --book VER${OFF} 54 54 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 57 61 58 62 ${BOLD} -D --directory DIR${OFF} … … 84 88 use the local working copy placed in DIR as the $(echo $PROGNAME | tr [a-z] [A-Z]) book 85 89 86 ${BOLD} -C, --compar asion TYPE${OFF}90 ${BOLD} -C, --comparison TYPE${OFF} 87 91 do iterative comparison analysis. This extends the total build time 88 92 considerably because the entire final system will rebuild itself … … 91 95 ICA = do ICA as designed by Greg Schafer 92 96 farce = do the farce analysis designed by Ken Moffat 93 both = perfo m both ICA and farce analysis97 both = perform both ICA and farce analysis 94 98 95 99 ${BOLD} -F, --fstab FILE${OFF} … … 105 109 106 110 ${BOLD} -R --rebuild${OFF} 107 clean the build directory before perfo ming any other task. The directory111 clean the build directory before performing any other task. The directory 108 112 is cleaned only if it was populated by a previous jhalfs-X run. 109 113 -EOF- … … 128 132 -EOF- 129 133 134 [[ ${PROGNAME} = "clfs2" ]] && 135 cat <<- -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 130 146 [[ ${PROGNAME} = "hlfs" ]] && 131 147 cat <<- -EOF- … … 208 224 } 209 225 226 227 #----------------------------------# 228 wrt_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 ( 237 cat << 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 243 EOF 244 ) >> $MKFILE.tmp 245 } 246 247 #----------------------------# 248 get_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 } 210 261 211 262 #----------------------------------# … … 266 317 267 318 #----------------------------------# 319 wrt_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 ( 328 cat << 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 333 EOF 334 ) >> $MKFILE.tmp 335 } 336 337 338 #----------------------------------# 268 339 wrt_unpack2() { # 269 340 #----------------------------------# … … 361 432 cat << EOF 362 433 @( 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 435 EOF 436 ) >> $MKFILE.tmp 437 } 438 439 440 #----------------------------------# 441 wrt_run_as_clfs_su() { # Execute script inside time { }, footer to log file 442 #----------------------------------# 443 local this_script=$1 444 local file=$2 445 ( 446 cat << 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 449 EOF 450 ) >> $MKFILE.tmp 451 } 452 453 454 #----------------------------------# 455 wrt_run_as_clfs_root() { # Some scripts must be run as root.. 456 #----------------------------------# 457 local this_script=$1 458 local file=$2 459 ( 460 cat << EOF 461 @( time { export CLFS=\$(MOUNT_PT) && ${PROGNAME}-commands/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\ 363 462 echo -e "\nKB: \`du -skx --exclude=${SCRIPT_ROOT} \$(MOUNT_PT)\`\n" >>logs/$this_script 364 463 EOF … … 536 635 rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,cross-tools,usr,var} 537 636 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} 539 638 echo -ne "Cleaning remainig extracted sources in $BUILDDIR/sources...\n" 540 639 rm -rf `find $BUILDDIR/sources/* -maxdepth 0 -type d` … … 559 658 hlfs) svn_root="HLFS" ;; 560 659 clfs) svn_root="cross-lfs" ;; 660 clfs2) svn_root="cross-lfs" ;; 561 661 *) echo "BOOK not defined in function <get_book>" 562 662 exit 1 ;; … … 567 667 if [ -d ${PROGNAME}-$LFSVRS ] ; then 568 668 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 571 673 echo -ne "done\n" 572 # Set the canonical book version573 674 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 575 681 get_sources 576 682 else 577 683 echo -ne "done\n" 578 # Set the canonical book version579 cd $JHALFSDIR580 VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`581 684 extract_commands 582 685 fi 583 686 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 588 688 echo -ne "done\n" 589 # Set the canonical book version590 cd $JHALFSDIR591 VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`592 689 extract_commands 593 690 fi 691 594 692 else 595 693 echo -ne "Using $BOOK as book's sources ...\n" 596 # Set the canonical book version597 cd $JHALFSDIR598 VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`599 694 extract_commands 600 695 fi 696 echo -ne " Document version ${L_arrow}${BOLD}${VERSION}${R_arrow}\n" 601 697 } 602 698 … … 610 706 611 707 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 613 714 614 715 # Start clean … … 634 735 -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1 635 736 ;; 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 ;; 636 750 hlfs) 637 751 echo -n " ${L_arrow}${BOLD}$MODEL${R_arrow} HLFS libc implementation" … … 668 782 669 783 # 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 675 785 676 786 # Done. Moving on... 677 787 get_sources 678 788 } 789 790 #----------------------------# 791 create_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 679 815 680 816 #----------------------------# … … 794 930 795 931 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 exec tion 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. 798 934 echo "${tab_}${BOLD}${RED}*** ${YELLOW}Automatic execution of the generated makefile has been inhibited. ${RED}***${OFF}${nl_}" 799 935 RUNMAKE=0 800 936 fi 801 937 } 802 803 938 804 939 #----------------------------# … … 816 951 echo " ...OK" 817 952 ;; 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 ;; 818 961 hlfs) 819 962 echo -n "Creating HLFS <${MODEL}> specific URLs file" -
common/config
r1504208 r3b63c8c 17 17 18 18 #=== 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 19 21 #--- Download the source packages 0(no)/1(yes) 20 22 GETPKG=0 … … 31 33 32 34 #=== 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) 34 36 RUNMAKE=0 35 37 -
common/func_compare.sh
r1504208 r3b63c8c 35 35 36 36 echo -e "\nsystem_build_$RUN: $PREV_IT $system_build" >> $MKFILE.tmp 37 PREV=system_build_$RUN38 39 37 } 40 38 … … 113 111 popd 1> /dev/null 114 112 @touch \$@ && \\ 113 sleep .25 && \\ 115 114 echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\ 116 115 echo --------------------------------------------------------------------------------\$(WHITE) -
common/func_validate_configs.sh
r1504208 r3b63c8c 37 37 "x86_64-64") [[ "${TARGET}" = "x86_64-unknown-linux-gnu" ]] && return 38 38 ;; 39 "mips64-64") [[ "${TARGET}" = "mips el-unknown-linux-gnu" ]] && return40 [[ "${TARGET}" = "mips -unknown-linux-gnu" ]] && return39 "mips64-64") [[ "${TARGET}" = "mips64el-unknown-linux-gnu" ]] && return 40 [[ "${TARGET}" = "mips64-unknown-linux-gnu" ]] && return 41 41 ;; 42 42 "sparc64-64") [[ "${TARGET}" = "sparc64-unknown-linux-gnu" ]] && return … … 47 47 [[ "${TARGET32}" = "i686-pc-linux-gnu" ]] && return 48 48 ;; 49 "mips64") [[ "${TARGET}" = "mips el-unknown-linux-gnu" ]] &&49 "mips64") [[ "${TARGET}" = "mips64el-unknown-linux-gnu" ]] && 50 50 [[ "${TARGET32}" = "mipsel-unknown-linux-gnu" ]] && return 51 51 52 [[ "${TARGET}" = "mips -unknown-linux-gnu" ]] &&52 [[ "${TARGET}" = "mips64-unknown-linux-gnu" ]] && 53 53 [[ "${TARGET32}" = "mips-unknown-linux-gnu" ]] && return 54 54 ;; 55 55 "sparc64") [[ "${TARGET}" = "sparc64-unknown-linux-gnu" ]] && 56 [[ "${TARGET32}" = "sparc v9-unknown-linux-gnu" ]] && return56 [[ "${TARGET32}" = "sparc-unknown-linux-gnu" ]] && return 57 57 ;; 58 58 "ppc64") [[ "${TARGET}" = "powerpc64-unknown-linux-gnu" ]] && 59 59 [[ "${TARGET32}" = "powerpc-unknown-linux-gnu" ]] && return 60 ;; 61 "arm") [[ "${TARGET}" = "arm-unknown-linux-gnu" ]] && return 60 62 ;; 61 63 *) write_error_and_die … … 85 87 86 88 # 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" 90 93 91 94 local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,' … … 209 212 PAGE) validate_against_str "xletterx xA4x" ;; 210 213 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" ;; 212 215 TARGET) validate_target ;; 213 216 GRSECURITY_HOST) validate_against_str "x0x x1x" ;; … … 217 220 validate_dir -z -d 218 221 else 219 validate_against_str "x${PROGNAME}- developmentx"222 validate_against_str "x${PROGNAME}-${LFSVRS}x" 220 223 fi ;; 221 224 -
common/makefile-functions
r1504208 r3b63c8c 55 55 @echo -e \\t- Enter to the chroot using the command found 56 56 @echo -e \\tin the section -Entering the Chroot Environment- 57 @echo -e \\texcept if building CLFS with METHO O=boot.57 @echo -e \\texcept if building CLFS with METHOD=boot. 58 58 @echo 59 59 @echo -e \\t- Set a password for the root user. 60 60 @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, 62 62 @echo -e \\t/etc/sysconfig/console, /etc/sysconfig/network, 63 63 @echo -e \\t/etc/sysconfig//network-devices/ifconfig.eth0/ipv4 and … … 66 66 @echo -e \\t- Exit from the chroot. 67 67 @echo 68 @echo -e \\t- Set-up the boot loader, except if building CLFS with METHO O=boot.68 @echo -e \\t- Set-up the boot loader, except if building CLFS with METHOD=boot. 69 69 @echo -e \\tYou can set-up the host bootloader or the new boot-loader 70 70 @echo -e \\tinstalled on the new system. 71 71 @echo -e \\tIf the last, you must to mount the virtual filesystems, re-enter 72 @echo -e \\tt o the chroot and be sure that /dev is populated with the72 @echo -e \\tthe chroot and be sure that /dev is populated with the 73 73 @echo -e \\trequired devices before configure the boot-loader. When ready, 74 74 @echo -e \\texit from the chroot and umount the filesystems … … 93 93 @echo The build is not complete. Follow the next steps:$(WHITE) 94 94 @echo 95 @echo -e \\t- Edit $(MOUNT_PT)/etc/fstab95 @echo -e \\t- Edit or create $(MOUNT_PT)/etc/fstab 96 96 @echo -e \\t and any other configuration file required to suit your needs. 97 97 @echo $(BOLD) -
common/progress_bar.sh
r1504208 r3b63c8c 22 22 declare -i PREV_SEC=0 23 23 24 makePID=$(fuser -v . 2>&1 | grep make) 25 makePID=$(echo $makePID | cut -d" " -f2) 24 26 25 27 write_or_exit() { 26 28 # 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 30 31 # Target build complete, leave. 31 32 [[ -f ${TARGET} ]] && echo -n "${CURSOR_ON}" && exit 33 32 34 # It is safe to write to the screen 33 35 echo -n "$1" -
master.sh
r1504208 r3b63c8c 106 106 dev* | SVN | trunk ) 107 107 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 124 125 ;; 125 126 esac … … 193 194 BOOK=$1 194 195 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." 196 197 exit 1 197 198 fi … … 211 212 BOOK=$1 212 213 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." 214 215 exit 1 215 216 fi … … 218 219 ;; 219 220 220 --compar asion | -C )221 --comparison | -C ) 221 222 test $# = 1 && eval "$exit_missing_arg" 222 223 shift … … 263 264 ;; 264 265 265 -- make | -M )RUNMAKE=1 ;;266 --run-make | -M ) RUNMAKE=1 ;; 266 267 267 268 --rebuild | -R ) CLEAN=1 ;; … … 272 273 shift 273 274 case $1 in 275 arm ) 276 ARCH=arm 277 TARGET="arm-unknown-linux-gnu" 278 ;; 274 279 x86 ) 275 280 ARCH=x86 … … 346 351 ;; 347 352 * ) 348 echo -e "\n$1 is an unknown or uns opported arch."353 echo -e "\n$1 is an unknown or unsupported arch." 349 354 exit 1 350 355 ;; … … 411 416 412 417 413 # Check for min umum gcc and kernel versions418 # Check for minimum gcc and kernel versions 414 419 #check_requirements 1 # 0/1 0-do not display values. 415 420 echo … … 494 499 # 495 500 if [[ -n "$FILES" ]]; then 496 # pushd/popd necessary to deal with mul itiple files501 # pushd/popd necessary to deal with multiple files 497 502 pushd $PACKAGE_DIR 1> /dev/null 498 503 cp $FILES $JHALFSDIR/ … … 502 507 if [[ "$REPORT" = "1" ]]; then 503 508 cp $COMMON_DIR/create-sbu_du-report.sh $JHALFSDIR/ 504 # After be sure that all looksane, dump the settings to a file509 # After being sure that all looks sane, dump the settings to a file 505 510 # This file will be used to create the REPORT header 506 511 validate_config > $JHALFSDIR/jhalfs.config … … 509 514 [[ "$GETPKG" = "1" ]] && cp $COMMON_DIR/urls.xsl $JHALFSDIR/ 510 515 # 516 cp $COMMON_DIR/packages.xsl $JHALFSDIR/ 517 # 511 518 sed 's,FAKEDIR,'$BOOK',' $PACKAGE_DIR/$XSL > $JHALFSDIR/${XSL} 512 519 export XSL=$JHALFSDIR/${XSL}
Note:
See TracChangeset
for help on using the changeset viewer.