From 056486c9cbf83592d2814b6ce649eadd4135fd84 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sat, 5 Aug 2006 15:42:52 +0000 Subject: [PATCH] Ported r2882 from trunk. --- CLFS/clfs.xsl | 70 +++++++++++++++++++------ Config.in | 90 +++++++++++++++++++-------------- HLFS/hlfs.xsl | 65 ++++++++++++++++++++---- LFS/lfs.xsl | 61 +++++++++++++++++----- common/common-functions | 4 ++ common/config | 5 ++ common/func_validate_configs.sh | 11 ++-- 7 files changed, 223 insertions(+), 83 deletions(-) diff --git a/CLFS/clfs.xsl b/CLFS/clfs.xsl index ec4a4ce..46063b7 100644 --- a/CLFS/clfs.xsl +++ b/CLFS/clfs.xsl @@ -23,9 +23,16 @@ 0 = none 1 = only Glibc, GCC and Binutils testsuites 2 = all testsuites - 3 = alias to 2 --> + 3 = alias to 2 + --> + + + @@ -117,10 +124,18 @@ - - make -k - - >> $TEST_LOG 2>&1 || true + + + + make -k + + >> $TEST_LOG 2>&1 || true + + + + >> $TEST_LOG 2>&1 + + @@ -172,11 +187,24 @@ - - - >> $TEST_LOG 2>&1 || true + + + + + + + + + -k check + + >> $TEST_LOG 2>&1 || true + + + + >> $TEST_LOG 2>&1 + + - @@ -185,7 +213,15 @@ string() = 'make -k check'"> - make -k check >> $TEST_LOG 2>&1 || true + + + make -k check >> $TEST_LOG 2>&1 || true + + + + >> $TEST_LOG 2>&1 + + @@ -193,7 +229,14 @@ - >> $TEST_LOG 2>&1 || true + + + >> $TEST_LOG 2>&1 || true + + + >> $TEST_LOG 2>&1 + + @@ -202,10 +245,7 @@ - - >> $TEST_LOG - - + >> $TEST_LOG diff --git a/Config.in b/Config.in index f526039..966f05d 100644 --- a/Config.in +++ b/Config.in @@ -17,7 +17,7 @@ mainmenu "JHALFS Build Script Configuration" config BOOK_HLFS bool "hlfs" config BOOK_BLFS - bool "blfs" + bool "blfs" endchoice config RUN_ME string @@ -31,7 +31,7 @@ mainmenu "JHALFS Build Script Configuration" #--- Book version -#menu "Book Version" +#menu "Book Version" choice prompt "Release" default relSVN @@ -82,7 +82,7 @@ mainmenu "JHALFS Build Script Configuration" default "clfs" if BOOK_CLFS || BOOK_CLFS2 default "hlfs" if BOOK_HLFS - config SET_USER + config SET_USER string "User account" depends CONFIG_USER default DEF_USER @@ -92,8 +92,8 @@ mainmenu "JHALFS Build Script Configuration" bool "Set Group?" default n depends CONFIG_USER - - config SET_GROUP + + config SET_GROUP string "GROUP account" depends CONFIG_GROUP default DEF_USER @@ -108,7 +108,7 @@ mainmenu "JHALFS Build Script Configuration" default LUSER if !CONFIG_GROUP default SET_GROUP if CONFIG_GROUP ------------------------ - + comment "--------CLFS specific params---------" depends on BOOK_CLFS || BOOK_CLFS2 @@ -119,7 +119,7 @@ depends on BOOK_CLFS || BOOK_CLFS2 help Choose a base architecture config ARCH_X86 - bool "x86" + bool "x86" config ARCH_MIPS bool "mips" if !BOOK_CLFS2 config ARCH_PPC @@ -165,7 +165,7 @@ depends on BOOK_CLFS || BOOK_CLFS2 string depends DATA_32 default "i486-pc-linux-gnu" if ARCH_X86 && PROC_i486 - default "i586-pc-linux-gnu" if ARCH_X86 && PROC_i586 + default "i586-pc-linux-gnu" if ARCH_X86 && PROC_i586 default "i686-pc-linux-gnu" if ARCH_X86 && PROC_i686 default "mipsel-unknown-linux-gnu" if ARCH_MIPS && PROC_mipsel default "mips-unknown-linux-gnu" if ARCH_MIPS && PROC_mips @@ -176,7 +176,7 @@ depends on BOOK_CLFS || BOOK_CLFS2 config TARGET string depends DATA_64 - default "x86_64-unknown-linux-gnu" if ARCH_X86 + default "x86_64-unknown-linux-gnu" if ARCH_X86 default "mips64el-unknown-linux-gnu" if ARCH_MIPS && PROC_mipsel default "mips64-unknown-linux-gnu" if ARCH_MIPS && PROC_mips default "sparc64-unknown-linux-gnu" if ARCH_SPARC @@ -190,7 +190,7 @@ depends on BOOK_CLFS || BOOK_CLFS2 default "mips64-unknown-linux-gnu" if ARCH_MIPS && PROC_mips default "sparc64-unknown-linux-gnu" if ARCH_SPARC default "powerpc64-unknown-linux-gnu" if ARCH_PPC - + config TARGET32 string @@ -199,7 +199,7 @@ depends on BOOK_CLFS || BOOK_CLFS2 default "mipsel-unknown-linux-gnu" if ARCH_MIPS && PROC_mipsel default "mips-unknown-linux-gnu" if ARCH_MIPS && PROC_mips default "sparc-unknown-linux-gnu" if ARCH_SPARC - default "powerpc-unknown-linux-gnu" if ARCH_PPC + default "powerpc-unknown-linux-gnu" if ARCH_PPC config ARCH string @@ -209,7 +209,7 @@ depends on BOOK_CLFS || BOOK_CLFS2 default "mips" if ARCH_MIPS default "sparc" if ARCH_SPARC default "arm" if ARCH_ARM - + config ARCH string depends DATA_64 @@ -217,7 +217,7 @@ depends on BOOK_CLFS || BOOK_CLFS2 default "mips64-64" if ARCH_MIPS default "sparc64-64" if ARCH_SPARC default "alpha" if ARCH_ALPHA - + config ARCH string depends DATA_MULTI @@ -236,13 +236,13 @@ depends on BOOK_CLFS || BOOK_CLFS2 config BUILD_CHROOT bool "chroot" config BUILD_BOOT - bool "boot" + bool "boot" endchoice config METHOD string default "chroot" if BUILD_CHROOT default "boot" if BUILD_BOOT - + config BOOT_CONFIG string "BOOT kernel config file (mandatory)" default "***EDIT ME***" @@ -262,10 +262,10 @@ depends on BOOK_CLFS || BOOK_CLFS2 # keymap file relative to /usr/share/kbd/keymaps/ # (e.g., i386/qwerty/us.map.gz) or "none" if you do not want # a keymap included in the kernel - + === Note about CLFS === If building the SVN or 1.0.0rc3 version using the boot method and - compiling the keymap into the kernel, you MUST manually edit the + compiling the keymap into the kernel, you MUST manually edit the "loadkeys" command found in $JHALFSDIR/clfs-commands/boot/066-kernel to set the full path in your host to the keymap file. @@ -282,7 +282,7 @@ depends on BOOK_HLFS depends on BOOK_HLFS help #--- If your build system has grsecurity patches applied - # you MUST enable this switch. + # you MUST enable this switch. choice prompt "Library" @@ -328,7 +328,7 @@ depends on BOOK_HLFS #--- Download all packages and patches required by the book selected # NOTE: Looks for files in the local archive defined by SRC_ARCHIVE # first and if necessary retrieve them from the 'net. - # Files will be transfered to $BUILDDIR/sources. + # Files will be transfered to $BUILDDIR/sources. config CONFIG_GETKERNEL bool "Always retrieve kernel package" @@ -376,19 +376,19 @@ depends on BOOK_HLFS # There are build issues or the system doesn't work as # expected, please rebuild without optimizations before # asking for support. - - choice + + choice prompt "OPT level " default OPT_1 depends CONFIG_OPTIMIZE help ***Optimization values are set in optimize/* files - + config OPT_1 bool "Final system only" config OPT_2 bool "Both temp tools and final system" - endchoice + endchoice config OPTIMIZE int default "0" if !CONFIG_OPTIMIZE @@ -403,21 +403,21 @@ depends on BOOK_HLFS #--- Should some iterative comparison analysis by made? # Unless you are familiar with ICA and/or FARCE do not select this option # - # ICA and FARCE are analysis tools for comparing one + # ICA and FARCE are analysis tools for comparing one # build to the next. Builds mays differ from one iteration # to another due to the build order and these tools try # to ferret out those differences by examining the stored # build logs and binary files. # # The scripts are well commented and can be found here ./extras/* - # + # config ITERATIONS int "Number of test runs (2,3,4,5)" depends on CONFIG_COMPARE range 2 5 default 3 - + config CONFIG_ICA bool "ICA testing" depends on CONFIG_COMPARE @@ -428,7 +428,7 @@ depends on BOOK_HLFS config CONFIG_FARCE bool "farce testing" depends on CONFIG_COMPARE - default n + default n help #--- Run farce testing #------------------ @@ -442,17 +442,17 @@ depends on BOOK_HLFS # 2 = all chapter06 testsuites # 3 = all chapter05 and chapter06 testsuites # (in CLFS, alias to 2) - + HLFS has no testsuites available in the toolchain phase # 1 = only chapter06 Glibc, Butterfly-tookchain # 2 = all chapter06 testsuites - # - + # + choice prompt "Tests ->" depends !BOOK_CLFS2 && CONFIG_TESTS default TEST_1 - + config TST_1 bool "Only chap06 Glibc/GCC/Binutils tests" if !BOOK_HLFS config TST_1 @@ -468,6 +468,20 @@ depends on BOOK_HLFS default "1" if TST_1 default "2" if TST_2 default "3" if TST_3 + choice + prompt "Flavour ->" + depends !BOOK_CLFS2 && CONFIG_TESTS + default NO_BOMB + + config NO_BOMB + bool "Don't stop on test suite failures" + config BOMB + bool "Abort the build at the first test suite failure" + endchoice + config BOMB_TEST + int + default "0" if NO_BOMB + default "1" if BOMB config CONFIG_REPORT bool "Create SBU and disk usage report" @@ -498,7 +512,7 @@ depends on BOOK_HLFS default PAGE_LETTER help #--- page definition for groff letter/A4 - + config PAGE_LETTER bool "letter" config PAGE_A4 @@ -527,7 +541,7 @@ depends on BOOK_HLFS help #--- Select this option if you wish to build the kernel. # - # You will be prompted for the full path to the .config + # You will be prompted for the full path to the .config # file. It will be copied to the 'sources' directory and # rename kernel-config config CONFIG @@ -560,10 +574,10 @@ depends on BOOK_HLFS config BLFS_CMDLINE string "BLFS packages" default "none" - depends CONFIG_BLFS_CMDS - - -# convert CONFIG_XXXX n/y to XXXX 0/1 + depends CONFIG_BLFS_CMDS + + +# convert CONFIG_XXXX n/y to XXXX 0/1 config COMPARE int @@ -575,7 +589,7 @@ depends on BOOK_HLFS default 0 if !CONFIG_GETPKG default 1 if CONFIG_GETPKG - config GETKERNEL + config GETKERNEL int default 0 if !CONFIG_GETKERNEL default 1 if CONFIG_GETKERNEL diff --git a/HLFS/hlfs.xsl b/HLFS/hlfs.xsl index 6e2efd7..f0ee311 100644 --- a/HLFS/hlfs.xsl +++ b/HLFS/hlfs.xsl @@ -26,9 +26,16 @@ 0 = none 1 = only chapter06 Glibc, GCC and Binutils testsuites 2 = all chapter06 testsuites - 3 = alias to 2 --> + 3 = alias to 2 + --> + + + @@ -135,10 +142,18 @@ - - make -k - - >> $TEST_LOG 2>&1 || true + + + + make -k + + >> $TEST_LOG 2>&1 || true + + + + >> $TEST_LOG 2>&1 + + @@ -205,11 +220,24 @@ - - - >> $TEST_LOG 2>&1 || true + + + + + + + + + -k check + + >> $TEST_LOG 2>&1 || true + + + + >> $TEST_LOG 2>&1 + + - @@ -217,7 +245,15 @@ - make -k check >> $TEST_LOG 2>&1 || true + + + + >> $TEST_LOG 2>&1 || true + + + >> $TEST_LOG 2>&1 + + @@ -226,7 +262,14 @@ - >> $TEST_LOG 2>&1 || true + + + >> $TEST_LOG 2>&1 || true + + + >> $TEST_LOG 2>&1 + + diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index 7ab84f6..f8f6df5 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -17,9 +17,16 @@ 0 = none 1 = only chapter06 Glibc, GCC and Binutils testsuites 2 = all chapter06 testsuites - 3 = all chapter05 and chapter06 testsuites--> + 3 = all chapter05 and chapter06 testsuites + --> + + + @@ -109,10 +116,18 @@ (($testsuite = '2' and ancestor::chapter[@id='chapter-building-system']) or $testsuite = '3')"> - - make -k - - >> $TEST_LOG 2>&1 || true + + + + make -k + + >> $TEST_LOG 2>&1 || true + + + + >> $TEST_LOG 2>&1 + + @@ -154,11 +169,24 @@ - - - >> $TEST_LOG 2>&1 || true + + + + + + + + + -k check + + >> $TEST_LOG 2>&1 || true + + + + >> $TEST_LOG 2>&1 + + - @@ -169,7 +197,15 @@ - make -k check >> $TEST_LOG 2>&1 || true + + + make -k check >> $TEST_LOG 2>&1 || true + + + + >> $TEST_LOG 2>&1 + + @@ -188,10 +224,7 @@ ancestor::chapter[@id='chapter-building-system']) or $testsuite = '3'"> - - >> $TEST_LOG - - + >> $TEST_LOG diff --git a/common/common-functions b/common/common-functions index 3118175..72b8904 100644 --- a/common/common-functions +++ b/common/common-functions @@ -690,6 +690,7 @@ extract_commands() { # --xinclude \ --stringparam method $METHOD \ --stringparam testsuite $TEST \ + --stringparam bomb-testsuite $BOMB_TEST \ --stringparam vim-lang $VIMLANG \ --stringparam timezone $TIMEZONE \ --stringparam page $PAGE \ @@ -703,6 +704,7 @@ extract_commands() { # xsltproc --nonet \ --xinclude \ --stringparam testsuite $TEST \ + --stringparam bomb-testsuite $BOMB_TEST \ --stringparam vim-lang $VIMLANG \ --stringparam timezone $TIMEZONE \ --stringparam page $PAGE \ @@ -716,6 +718,7 @@ extract_commands() { # --xinclude \ --stringparam model $MODEL \ --stringparam testsuite $TEST \ + --stringparam bomb-testsuite $BOMB_TEST \ --stringparam timezone $TIMEZONE \ --stringparam page $PAGE \ --stringparam lang $LANG \ @@ -729,6 +732,7 @@ extract_commands() { # xsltproc --nonet \ --xinclude \ --stringparam testsuite $TEST \ + --stringparam bomb-testsuite $BOMB_TEST \ --stringparam vim-lang $VIMLANG \ --stringparam timezone $TIMEZONE \ --stringparam page $PAGE \ diff --git a/common/config b/common/config index bb8d988..7e55b06 100644 --- a/common/config +++ b/common/config @@ -51,6 +51,11 @@ OPTIMIZE=0 # (in CLFS and HLFS, alias to 2) TEST=1 +#--- Bomb on test suites failures? +# 0 = no, I want to build the full system and review the logs +# 1 = yes, bomb at the first test suite failure to can review the build dir +BOMB_TEST=0 + #--- Run the stripping phases 0(no)/1(yes) STRIP=1 diff --git a/common/func_validate_configs.sh b/common/func_validate_configs.sh index 6496d38..14b765f 100644 --- a/common/func_validate_configs.sh +++ b/common/func_validate_configs.sh @@ -86,10 +86,10 @@ validate_config() { # Are the config values sane (within reason) inline_doc # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables - 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 LUSER LGROUP" - 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 LUSER LGROUP" - 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 LUSER LGROUP" - 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 LUSER LGROUP" + local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL LUSER LGROUP" + local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" + 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 LUSER LGROUP" + local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,' local -r ERROR_MSG_pt2=' check the config file ${BOLD}${GREEN}\<$(echo $PROGNAME | tr [a-z] [A-Z])/config\> or \${OFF}' @@ -205,6 +205,7 @@ inline_doc RUN_FARCE) [[ "$COMPARE" = "1" ]] && validate_against_str "x0x x1x" ;; ITERATIONS) [[ "$COMPARE" = "1" ]] && validate_against_str "x2x x3x x4x x5x" ;; TEST) validate_against_str "x0x x1x x2x x3x" ;; + BOMB_TEST) [[ ! "$TEST" = "0" ]] && validate_against_str "x0x x1x" ;; OPTIMIZE) validate_against_str "x0x x1x x2x" ;; STRIP) validate_against_str "x0x x1x" ;; VIMLANG) validate_against_str "x0x x1x" ;; @@ -213,7 +214,7 @@ inline_doc METHOD) validate_against_str "xchrootx xbootx" ;; ARCH) validate_against_str "xx86x xx86_64x xx86_64-64x xsparcx xsparc64x xsparc64-64x xmipsx xmips64x xmips64-64x xppcx xppc64x xalphax xarmx" ;; TARGET) validate_target ;; - LUSER) echo -e "`eval echo $PARAM_VALS`" + LUSER) echo -e "`eval echo $PARAM_VALS`" [[ "${!config_param}" = "**EDIT ME**" ]] && write_error_and_die ;; LGROUP) echo -e "`eval echo $PARAM_VALS`"