From 2639f65b55f58d01591ecb0412d8acc9106452ff Mon Sep 17 00:00:00 2001 From: George Boudreau Date: Sat, 11 Nov 2006 00:09:42 +0000 Subject: [PATCH] Initial commit of CLFS3 changes, pt2. --- Config.in | 38 ++++++++++++++++++++------------- common/common-functions | 29 ++++++++++++++++++++++--- common/func_validate_configs.sh | 1 + jhalfs | 5 +++-- 4 files changed, 53 insertions(+), 20 deletions(-) diff --git a/Config.in b/Config.in index 05b0547..445a294 100644 --- a/Config.in +++ b/Config.in @@ -16,8 +16,8 @@ menu "--- BOOK Settings" config BOOK_CLFS2 bool "Cross-Compiled Linux From Scratch (Version 2)" -# config BOOK_CLFS3 -# bool "Cross-Compiled Linux From Scratch (Embedded Systems)" + config BOOK_CLFS3 + bool "Cross-Compiled Linux From Scratch (Embedded Systems)" config BOOK_HLFS bool "Hardened Linux From Scratch" @@ -31,7 +31,7 @@ menu "--- BOOK Settings" default "lfs" if BOOK_LFS default "clfs" if BOOK_CLFS default "clfs2" if BOOK_CLFS2 -# default "clfs3" if BOOK_CLFS3 + default "clfs3" if BOOK_CLFS3 default "hlfs" if BOOK_HLFS default "blfs" if BOOK_BLFS @@ -83,7 +83,7 @@ menu "--- BOOK Settings" choice prompt "Target architecture" default ARCH_X86 - depends BOOK_CLFS || BOOK_CLFS2 + depends BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3 help #-- Choose a base architecture @@ -91,24 +91,24 @@ menu "--- BOOK Settings" bool "x86" config ARCH_MIPS - bool "mips" if !BOOK_CLFS2 + bool "mips" if !BOOK_CLFS2 || !BOOK_CLFS3 config ARCH_PPC - bool "ppc" if !BOOK_CLFS2 + bool "ppc" if !BOOK_CLFS2 || !BOOK_CLFS3 config ARCH_SPARC - bool "sparc" if !BOOK_CLFS2 + bool "sparc" if !BOOK_CLFS2 || !BOOK_CLFS3 config ARCH_ALPHA - bool "alpha" if !BOOK_CLFS2 + bool "alpha" if !BOOK_CLFS2 || !BOOK_CLFS3 config ARCH_ARM - bool "arm" if !BOOK_CLFS + bool "arm" if !BOOK_CLFS || !BOOK_CLFS3 endchoice choice prompt "Library" - depends (BOOK_CLFS || BOOK_CLFS2) + depends (BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3 ) default DATA_32 if !ARCH_ALPHA default DATA_64 if ARCH_ALPHA @@ -116,15 +116,15 @@ menu "--- BOOK Settings" bool "32-bit" if !ARCH_ALPHA config DATA_64 - bool "64-bit" if !ARCH_PPC && !ARCH_ARM && !(BOOK_CLFS2 && ARCH_X86) + bool "64-bit" if !ARCH_PPC && !ARCH_ARM && !((BOOK_CLFS2 || BOOK_CLFS3) && ARCH_X86) config DATA_MULTI - bool "multilib" if !ARCH_ALPHA && !ARCH_ARM && !(BOOK_CLFS2 && ARCH_X86) + bool "multilib" if !ARCH_ALPHA && !ARCH_ARM && !((BOOK_CLFS2 || BOOK_CLFS3) && ARCH_X86) endchoice choice prompt "Target" - depends (BOOK_CLFS || BOOK_CLFS2) && ((ARCH_X86 && DATA_32) || ARCH_MIPS) + depends (BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3) && ((ARCH_X86 && DATA_32) || ARCH_MIPS) config PROC_i486 bool "i486" if ARCH_X86 && DATA_32 @@ -144,7 +144,15 @@ menu "--- BOOK Settings" config TARGET string - depends DATA_32 + depends DATA_32 && BOOK_CLFS3 + default "i486-pc-linux-uclibc" if ARCH_X86 && PROC_i486 + default "i586-pc-linux-uclibc" if ARCH_X86 && PROC_i586 + default "i686-pc-linux-uclibc" if ARCH_X86 && PROC_i686 + + + config TARGET + string + depends DATA_32 && !BOOK_CLFS3 default "i486-pc-linux-gnu" if ARCH_X86 && PROC_i486 default "i586-pc-linux-gnu" if ARCH_X86 && PROC_i586 default "i686-pc-linux-gnu" if ARCH_X86 && PROC_i686 @@ -441,7 +449,7 @@ menu "--- General Settings" config DEF_USER string default "lfs" if BOOK_LFS - default "clfs" if BOOK_CLFS || BOOK_CLFS2 + default "clfs" if BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3 default "hlfs" if BOOK_HLFS config SET_USER diff --git a/common/common-functions b/common/common-functions index cb5ab02..020066d 100644 --- a/common/common-functions +++ b/common/common-functions @@ -75,6 +75,7 @@ wrt_RunAsRoot() { # Some scripts must be run as root.. blfs ) MOUNT_ENV="BLFS" ;; clfs ) MOUNT_ENV="CLFS" ;; clfs2 ) MOUNT_ENV="CLFS" ;; + clfs3 ) MOUNT_ENV="CLFS" ;; hlfs ) MOUNT_ENV="HLFS" ;; *) echo "undefined progname $PROGNAME"; exit 1 ;; esac @@ -457,6 +458,7 @@ get_book() { # hlfs) svn_root="HLFS" ;; clfs) svn_root="cross-lfs" ;; clfs2) svn_root="cross-lfs" ;; + clfs3) svn_root="cross-lfs" ;; *) echo "BOOK not defined in function " exit 1 ;; esac @@ -472,7 +474,7 @@ get_book() { # echo -ne "done\n" cd $JHALFSDIR case $PROGNAME in - clfs | clfs2) + clfs | clfs2 | clfs3 ) VERSION=$(xmllint --noent $BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;; *) VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;; @@ -544,6 +546,18 @@ extract_commands() { # --stringparam lang $LANG \ -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1 ;; + + clfs3) + echo -n " ${L_arrow}${BOLD}$ARCH${R_arrow} target architecture" + xsltproc --nonet \ + --xinclude \ + --stringparam vim-lang $VIMLANG \ + --stringparam timezone $TIMEZONE \ + --stringparam page $PAGE \ + --stringparam lang $LANG \ + -o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1 + ;; + hlfs) echo -n " ${L_arrow}${BOLD}$MODEL${R_arrow} HLFS libc implementation" xsltproc --nonet \ @@ -570,7 +584,8 @@ extract_commands() { # --stringparam lang $LANG \ -o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1 ;; - *) exit 1 ;; + *) echo -n " ${L_arrow}${BOLD}${PROGNAME}${R_arrow} book invalid, terminate build" + exit 1 ;; esac [[ "${BLFS_TOOL}" = "y" ]] && copy_blfs_deps_scripts @@ -596,7 +611,7 @@ create_package_list() { # rm -f pkg_tarball_list echo -n "Creating <${PROGNAME}> list of tarball names for $BOOK $ARCH" case ${PROGNAME} in - clfs | clfs2) + clfs | clfs2 | clfs3 ) xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \ $BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1 ;; @@ -778,6 +793,14 @@ create_urls() { # $BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1 echo " ...OK" ;; + clfs3) + echo -n "Creating CLFS3 <${ARCH}> specific URLs file" + xsltproc --nonet --xinclude \ + --stringparam server $SERVER \ + -o $BUILDDIR/sources/urls.lst urls.xsl \ + $BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1 + echo " ...OK" + ;; hlfs) echo -n "Creating HLFS <${MODEL}> specific URLs file" xsltproc --nonet --xinclude \ diff --git a/common/func_validate_configs.sh b/common/func_validate_configs.sh index 4cd6f4d..501e315 100644 --- a/common/func_validate_configs.sh +++ b/common/func_validate_configs.sh @@ -23,6 +23,7 @@ inline_doc 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 PAGE TIMEZONE LANG LC_ALL LUSER LGROUP BLFS_TOOL REBUILD_MAKEFILE" local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL REBUILD_MAKEFILE" local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL REBUILD_MAKEFILE" + local -r clfs3_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL REBUILD_MAKEFILE" 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 BLFS_TOOL CUSTOM_TOOLS REBUILD_MAKEFILE" local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR" diff --git a/jhalfs b/jhalfs index 6b7e16d..224e70e 100755 --- a/jhalfs +++ b/jhalfs @@ -117,6 +117,7 @@ case $BRANCH_ID in development ) case $PROGNAME in clfs2 ) TREE=branches/clfs-2.0/BOOK ;; + clfs3 ) TREE=branches/clfs-3.0/BOOK ;; *) TREE=trunk/BOOK ;; esac LFSVRS=development @@ -134,7 +135,7 @@ case $BRANCH_ID in LFSVRS=${BRANCH_ID} TREE=tags/${BRANCH_ID}/BOOK ;; - clfs | clfs2 ) + clfs | clfs2 | clfs3) LFSVRS=${BRANCH_ID} TREE=tags/${BRANCH_ID} ;; @@ -428,7 +429,7 @@ fi # When regeneration the Makefile we need to know also the canonical book version if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then case $PROGNAME in - clfs | clfs2 ) + clfs | clfs2 | clfs3 ) VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;; *) VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;