Initial commit of CLFS3 changes, pt2.
This commit is contained in:
parent
ee21f67735
commit
2639f65b55
4 changed files with 53 additions and 20 deletions
38
Config.in
38
Config.in
|
@ -16,8 +16,8 @@ menu "--- BOOK Settings"
|
||||||
config BOOK_CLFS2
|
config BOOK_CLFS2
|
||||||
bool "Cross-Compiled Linux From Scratch (Version 2)"
|
bool "Cross-Compiled Linux From Scratch (Version 2)"
|
||||||
|
|
||||||
# config BOOK_CLFS3
|
config BOOK_CLFS3
|
||||||
# bool "Cross-Compiled Linux From Scratch (Embedded Systems)"
|
bool "Cross-Compiled Linux From Scratch (Embedded Systems)"
|
||||||
|
|
||||||
config BOOK_HLFS
|
config BOOK_HLFS
|
||||||
bool "Hardened Linux From Scratch"
|
bool "Hardened Linux From Scratch"
|
||||||
|
@ -31,7 +31,7 @@ menu "--- BOOK Settings"
|
||||||
default "lfs" if BOOK_LFS
|
default "lfs" if BOOK_LFS
|
||||||
default "clfs" if BOOK_CLFS
|
default "clfs" if BOOK_CLFS
|
||||||
default "clfs2" if BOOK_CLFS2
|
default "clfs2" if BOOK_CLFS2
|
||||||
# default "clfs3" if BOOK_CLFS3
|
default "clfs3" if BOOK_CLFS3
|
||||||
default "hlfs" if BOOK_HLFS
|
default "hlfs" if BOOK_HLFS
|
||||||
default "blfs" if BOOK_BLFS
|
default "blfs" if BOOK_BLFS
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ menu "--- BOOK Settings"
|
||||||
choice
|
choice
|
||||||
prompt "Target architecture"
|
prompt "Target architecture"
|
||||||
default ARCH_X86
|
default ARCH_X86
|
||||||
depends BOOK_CLFS || BOOK_CLFS2
|
depends BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3
|
||||||
help
|
help
|
||||||
#-- Choose a base architecture
|
#-- Choose a base architecture
|
||||||
|
|
||||||
|
@ -91,24 +91,24 @@ menu "--- BOOK Settings"
|
||||||
bool "x86"
|
bool "x86"
|
||||||
|
|
||||||
config ARCH_MIPS
|
config ARCH_MIPS
|
||||||
bool "mips" if !BOOK_CLFS2
|
bool "mips" if !BOOK_CLFS2 || !BOOK_CLFS3
|
||||||
|
|
||||||
config ARCH_PPC
|
config ARCH_PPC
|
||||||
bool "ppc" if !BOOK_CLFS2
|
bool "ppc" if !BOOK_CLFS2 || !BOOK_CLFS3
|
||||||
|
|
||||||
config ARCH_SPARC
|
config ARCH_SPARC
|
||||||
bool "sparc" if !BOOK_CLFS2
|
bool "sparc" if !BOOK_CLFS2 || !BOOK_CLFS3
|
||||||
|
|
||||||
config ARCH_ALPHA
|
config ARCH_ALPHA
|
||||||
bool "alpha" if !BOOK_CLFS2
|
bool "alpha" if !BOOK_CLFS2 || !BOOK_CLFS3
|
||||||
|
|
||||||
config ARCH_ARM
|
config ARCH_ARM
|
||||||
bool "arm" if !BOOK_CLFS
|
bool "arm" if !BOOK_CLFS || !BOOK_CLFS3
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Library"
|
prompt "Library"
|
||||||
depends (BOOK_CLFS || BOOK_CLFS2)
|
depends (BOOK_CLFS || BOOK_CLFS2 || BOOK_CLFS3 )
|
||||||
default DATA_32 if !ARCH_ALPHA
|
default DATA_32 if !ARCH_ALPHA
|
||||||
default DATA_64 if ARCH_ALPHA
|
default DATA_64 if ARCH_ALPHA
|
||||||
|
|
||||||
|
@ -116,15 +116,15 @@ menu "--- BOOK Settings"
|
||||||
bool "32-bit" if !ARCH_ALPHA
|
bool "32-bit" if !ARCH_ALPHA
|
||||||
|
|
||||||
config DATA_64
|
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
|
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
|
endchoice
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Target"
|
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
|
config PROC_i486
|
||||||
bool "i486" if ARCH_X86 && DATA_32
|
bool "i486" if ARCH_X86 && DATA_32
|
||||||
|
@ -144,7 +144,15 @@ menu "--- BOOK Settings"
|
||||||
|
|
||||||
config TARGET
|
config TARGET
|
||||||
string
|
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 "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 "i686-pc-linux-gnu" if ARCH_X86 && PROC_i686
|
||||||
|
@ -441,7 +449,7 @@ menu "--- General Settings"
|
||||||
config DEF_USER
|
config DEF_USER
|
||||||
string
|
string
|
||||||
default "lfs" if BOOK_LFS
|
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
|
default "hlfs" if BOOK_HLFS
|
||||||
|
|
||||||
config SET_USER
|
config SET_USER
|
||||||
|
|
|
@ -75,6 +75,7 @@ wrt_RunAsRoot() { # Some scripts must be run as root..
|
||||||
blfs ) MOUNT_ENV="BLFS" ;;
|
blfs ) MOUNT_ENV="BLFS" ;;
|
||||||
clfs ) MOUNT_ENV="CLFS" ;;
|
clfs ) MOUNT_ENV="CLFS" ;;
|
||||||
clfs2 ) MOUNT_ENV="CLFS" ;;
|
clfs2 ) MOUNT_ENV="CLFS" ;;
|
||||||
|
clfs3 ) MOUNT_ENV="CLFS" ;;
|
||||||
hlfs ) MOUNT_ENV="HLFS" ;;
|
hlfs ) MOUNT_ENV="HLFS" ;;
|
||||||
*) echo "undefined progname $PROGNAME"; exit 1 ;;
|
*) echo "undefined progname $PROGNAME"; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
@ -457,6 +458,7 @@ get_book() { #
|
||||||
hlfs) svn_root="HLFS" ;;
|
hlfs) svn_root="HLFS" ;;
|
||||||
clfs) svn_root="cross-lfs" ;;
|
clfs) svn_root="cross-lfs" ;;
|
||||||
clfs2) svn_root="cross-lfs" ;;
|
clfs2) svn_root="cross-lfs" ;;
|
||||||
|
clfs3) svn_root="cross-lfs" ;;
|
||||||
*) echo "BOOK not defined in function <get_book>"
|
*) echo "BOOK not defined in function <get_book>"
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
@ -472,7 +474,7 @@ get_book() { #
|
||||||
echo -ne "done\n"
|
echo -ne "done\n"
|
||||||
cd $JHALFSDIR
|
cd $JHALFSDIR
|
||||||
case $PROGNAME in
|
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/$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/<\/.*//') ;;
|
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 \
|
--stringparam lang $LANG \
|
||||||
-o ./${PROGNAME}-commands/ $XSL $BOOK/$ARCH-index.xml >>$LOGDIR/$LOG 2>&1
|
-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)
|
hlfs)
|
||||||
echo -n " ${L_arrow}${BOLD}$MODEL${R_arrow} HLFS libc implementation"
|
echo -n " ${L_arrow}${BOLD}$MODEL${R_arrow} HLFS libc implementation"
|
||||||
xsltproc --nonet \
|
xsltproc --nonet \
|
||||||
|
@ -570,7 +584,8 @@ extract_commands() { #
|
||||||
--stringparam lang $LANG \
|
--stringparam lang $LANG \
|
||||||
-o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
|
-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
|
esac
|
||||||
|
|
||||||
[[ "${BLFS_TOOL}" = "y" ]] && copy_blfs_deps_scripts
|
[[ "${BLFS_TOOL}" = "y" ]] && copy_blfs_deps_scripts
|
||||||
|
@ -596,7 +611,7 @@ create_package_list() { #
|
||||||
rm -f pkg_tarball_list
|
rm -f pkg_tarball_list
|
||||||
echo -n "Creating <${PROGNAME}> list of tarball names for $BOOK $ARCH"
|
echo -n "Creating <${PROGNAME}> list of tarball names for $BOOK $ARCH"
|
||||||
case ${PROGNAME} in
|
case ${PROGNAME} in
|
||||||
clfs | clfs2)
|
clfs | clfs2 | clfs3 )
|
||||||
xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
|
xsltproc --nonet --xinclude -o pkg_tarball_list packages.xsl \
|
||||||
$BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
|
$BOOK/materials/${ARCH}-chapter.xml >>$LOGDIR/$LOG 2>&1
|
||||||
;;
|
;;
|
||||||
|
@ -778,6 +793,14 @@ create_urls() { #
|
||||||
$BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1
|
$BOOK/materials/$ARCH-chapter.xml >>$LOGDIR/$LOG 2>&1
|
||||||
echo " ...OK"
|
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)
|
hlfs)
|
||||||
echo -n "Creating HLFS <${MODEL}> specific URLs file"
|
echo -n "Creating HLFS <${MODEL}> specific URLs file"
|
||||||
xsltproc --nonet --xinclude \
|
xsltproc --nonet --xinclude \
|
||||||
|
|
|
@ -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 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 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 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 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"
|
local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR"
|
||||||
|
|
||||||
|
|
5
jhalfs
5
jhalfs
|
@ -117,6 +117,7 @@ case $BRANCH_ID in
|
||||||
development )
|
development )
|
||||||
case $PROGNAME in
|
case $PROGNAME in
|
||||||
clfs2 ) TREE=branches/clfs-2.0/BOOK ;;
|
clfs2 ) TREE=branches/clfs-2.0/BOOK ;;
|
||||||
|
clfs3 ) TREE=branches/clfs-3.0/BOOK ;;
|
||||||
*) TREE=trunk/BOOK ;;
|
*) TREE=trunk/BOOK ;;
|
||||||
esac
|
esac
|
||||||
LFSVRS=development
|
LFSVRS=development
|
||||||
|
@ -134,7 +135,7 @@ case $BRANCH_ID in
|
||||||
LFSVRS=${BRANCH_ID}
|
LFSVRS=${BRANCH_ID}
|
||||||
TREE=tags/${BRANCH_ID}/BOOK
|
TREE=tags/${BRANCH_ID}/BOOK
|
||||||
;;
|
;;
|
||||||
clfs | clfs2 )
|
clfs | clfs2 | clfs3)
|
||||||
LFSVRS=${BRANCH_ID}
|
LFSVRS=${BRANCH_ID}
|
||||||
TREE=tags/${BRANCH_ID}
|
TREE=tags/${BRANCH_ID}
|
||||||
;;
|
;;
|
||||||
|
@ -428,7 +429,7 @@ fi
|
||||||
# When regeneration the Makefile we need to know also the canonical book version
|
# When regeneration the Makefile we need to know also the canonical book version
|
||||||
if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
|
if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
|
||||||
case $PROGNAME in
|
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/$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/<\/.*//') ;;
|
VERSION=$(xmllint --noent $JHALFSDIR/$BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
|
|
Reference in a new issue