HLFS: Added support to select the kernel series based book.
This commit is contained in:
parent
05760bc8d6
commit
5c575e1b8c
4 changed files with 30 additions and 5 deletions
19
Config.in
19
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
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
<!-- What libc implentation must be used? -->
|
||||
<xsl:param name="model" select="glibc"/>
|
||||
|
||||
<!-- What kernel serie must be used? -->
|
||||
<xsl:param name="kernel" select="2.6"/>
|
||||
|
||||
<!-- Is the host kernel using grsecurity? -->
|
||||
<xsl:param name="grsecurity_host" select="n"/>
|
||||
|
||||
|
@ -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 @@
|
|||
|
||||
<xsl:template match="screen">
|
||||
<xsl:if test="(@condition=$model or not(@condition)) and
|
||||
(@vendor=$kernel or not(@vendor)) and
|
||||
child::* = userinput and not(@role = 'nodump')">
|
||||
<xsl:apply-templates select="userinput" mode="screen"/>
|
||||
</xsl:if>
|
||||
|
@ -319,7 +324,8 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="literal">
|
||||
<xsl:if test="@condition=$model or not(@condition)">
|
||||
<xsl:if test="(@condition=$model or not(@condition)) and
|
||||
(@vendor=$kernel or not(@vendor))">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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!" &&
|
||||
|
|
Reference in a new issue