From 5c575e1b8cfaebaf2389c3d1701d70d5c21a59d6 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sun, 3 Jun 2007 10:27:05 +0000 Subject: [PATCH] HLFS: Added support to select the kernel series based book. --- Config.in | 19 +++++++++++++++++++ HLFS/hlfs.xsl | 8 +++++++- common/libs/func_book_parser | 1 + common/libs/func_validate_configs.sh | 7 +++---- 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/Config.in b/Config.in index 2ed3c76..27b563f 100644 --- a/Config.in +++ b/Config.in @@ -377,6 +377,25 @@ menu "--- BOOK Settings" string default "glibc" if LIB_GLIBC default "uclibc" if LIB_UCLIBC + + choice + prompt "Kernel series" + depends on BOOK_HLFS + help + #-- Which kernel series to use: 2.6/2.4 + + config KERNEL_26 + bool "2.6 kernel series" + + config KERNEL_24 + bool "2.4 kernel series" + endchoice + + config KERNEL + depends on BOOK_HLFS + string + default "2.6" if KERNEL_26 + default "2.4" if KERNEL_24 #--- End HLFS specific params #--- Custom Tools support diff --git a/HLFS/hlfs.xsl b/HLFS/hlfs.xsl index fc65f68..215ed72 100644 --- a/HLFS/hlfs.xsl +++ b/HLFS/hlfs.xsl @@ -16,6 +16,9 @@ + + + @@ -51,6 +54,7 @@ ../@id='chapter-building-system' or ../@id='chapter-bootable') and ((@condition=$model or not(@condition)) and + ((@vendor=$kernel or not(@vendor)) and count(descendant::screen/userinput) > 0 and count(descendant::screen/userinput) > count(descendant::screen[@role='nodump']))"> @@ -144,6 +148,7 @@ @@ -319,7 +324,8 @@ - + diff --git a/common/libs/func_book_parser b/common/libs/func_book_parser index d78e4a4..5da65f8 100644 --- a/common/libs/func_book_parser +++ b/common/libs/func_book_parser @@ -122,6 +122,7 @@ extract_commands() { # xsltproc --nonet \ --xinclude \ --stringparam model $MODEL \ + --stringparam kernel $KERNEL \ --stringparam testsuite $TEST \ --stringparam bomb-testsuite $BOMB_TEST \ --stringparam timezone $TIMEZONE \ diff --git a/common/libs/func_validate_configs.sh b/common/libs/func_validate_configs.sh index be77233..81df8d3 100644 --- a/common/libs/func_validate_configs.sh +++ b/common/libs/func_validate_configs.sh @@ -31,7 +31,7 @@ inline_doc # BOOK Settings by book local -r LFS_book="$BOOK_common BLFS_TOOL" - local -r HLFS_book="$BOOK_common BLFS_TOOL MODEL GRSECURITY_HOST" + local -r HLFS_book="$BOOK_common BLFS_TOOL MODEL KERNEL GRSECURITY_HOST" local -r CLFS_book="$BOOK_common BLFS_TOOL METHOD $BOOK_clfsX TARGET32 BOOT_CONFIG" local -r CLFS2_book="$BOOK_common BLFS_TOOL $BOOK_clfsX" local -r CLFS3_book="$BOOK_common $BOOK_clfsX PLATFORM MIPS_LEVEL" @@ -171,9 +171,8 @@ inline_doc CONFIG) validate_file -z+ -e -s ;; BOOT_CONFIG) [[ "${METHOD}" = "boot" ]] && validate_file -z -e -s ;; - # Treatment of 'special' parameters - LANG | \ - LC_ALL) # See it the locale values exist on this machine + # Treatment of LANG parameter + LANG ) # See it the locale value has been set echo -n "`eval echo $PARAM_VALS`" [[ -z "${!config_param}" ]] && echo " -- Variable $config_param cannot be empty!" &&