Fix various issues when building CLFS.
This commit is contained in:
parent
5267879fbb
commit
608fbe13d0
5 changed files with 139 additions and 7 deletions
|
@ -216,9 +216,9 @@
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- Fixing toolchain test suites run -->
|
<!-- Fixing toolchain test suites run XXX more to fix -->
|
||||||
<xsl:when test="string() = 'make check' or
|
<xsl:when test="string() = 'make check' or
|
||||||
string() = 'make -k check'">
|
contains(string(), 'make -k check')">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$testsuite != '0'">
|
<xsl:when test="$testsuite != '0'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
@ -283,6 +283,9 @@
|
||||||
<xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
|
<xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
|
||||||
<xsl:value-of select="$timezone"/>
|
<xsl:value-of select="$timezone"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="ancestor::sect1[@id='ch-system-eglibc']">
|
||||||
|
<xsl:value-of select="$timezone"/>
|
||||||
|
</xsl:when>
|
||||||
<xsl:when test="ancestor::sect1[@id='ch-system-groff']">
|
<xsl:when test="ancestor::sect1[@id='ch-system-groff']">
|
||||||
<xsl:value-of select="$page"/>
|
<xsl:value-of select="$page"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
120
CLFS/master.sh
120
CLFS/master.sh
|
@ -225,6 +225,7 @@ chroot_Makefiles() { #
|
||||||
pkg_tarball=$(get_package_tarball_name $name)
|
pkg_tarball=$(get_package_tarball_name $name)
|
||||||
|
|
||||||
# This is very ugly:: util-linux is in /chroot but must be run under LUSER
|
# This is very ugly:: util-linux is in /chroot but must be run under LUSER
|
||||||
|
# Same for e2fsprogs (in CLFS 1.1.0)
|
||||||
# .. Customized makefile entry
|
# .. Customized makefile entry
|
||||||
case "${this_script}" in
|
case "${this_script}" in
|
||||||
*util-linux)
|
*util-linux)
|
||||||
|
@ -236,6 +237,42 @@ chroot_Makefiles() { #
|
||||||
wrt_touch
|
wrt_touch
|
||||||
temptools="$temptools $this_script"
|
temptools="$temptools $this_script"
|
||||||
continue ;;
|
continue ;;
|
||||||
|
*util-linux-ng)
|
||||||
|
LUSER_wrt_target "${this_script}" "$PREV"
|
||||||
|
LUSER_wrt_unpack "$pkg_tarball"
|
||||||
|
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||||
|
LUSER_wrt_RunAsUser "${file}"
|
||||||
|
LUSER_RemoveBuildDirs "${name}"
|
||||||
|
wrt_touch
|
||||||
|
temptools="$temptools $this_script"
|
||||||
|
continue ;;
|
||||||
|
*util-linux-libs)
|
||||||
|
LUSER_wrt_target "${this_script}" "$PREV"
|
||||||
|
LUSER_wrt_unpack "$pkg_tarball"
|
||||||
|
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||||
|
LUSER_wrt_RunAsUser "${file}"
|
||||||
|
LUSER_RemoveBuildDirs "${name}"
|
||||||
|
wrt_touch
|
||||||
|
temptools="$temptools $this_script"
|
||||||
|
continue ;;
|
||||||
|
*e2fsprogs)
|
||||||
|
LUSER_wrt_target "${this_script}" "$PREV"
|
||||||
|
LUSER_wrt_unpack "$pkg_tarball"
|
||||||
|
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||||
|
LUSER_wrt_RunAsUser "${file}"
|
||||||
|
LUSER_RemoveBuildDirs "${name}"
|
||||||
|
wrt_touch
|
||||||
|
temptools="$temptools $this_script"
|
||||||
|
continue ;;
|
||||||
|
*e2fsprogs-libs)
|
||||||
|
LUSER_wrt_target "${this_script}" "$PREV"
|
||||||
|
LUSER_wrt_unpack "$pkg_tarball"
|
||||||
|
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||||
|
LUSER_wrt_RunAsUser "${file}"
|
||||||
|
LUSER_RemoveBuildDirs "${name}"
|
||||||
|
wrt_touch
|
||||||
|
temptools="$temptools $this_script"
|
||||||
|
continue ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
@ -518,7 +555,7 @@ final_system_Makefiles() { #
|
||||||
CHROOT_Unpack "$pkg_tarball"
|
CHROOT_Unpack "$pkg_tarball"
|
||||||
# If the testsuites must be run, initialize the log file
|
# If the testsuites must be run, initialize the log file
|
||||||
case $name in
|
case $name in
|
||||||
binutils | gcc | glibc )
|
binutils | gcc | glibc | eglibc )
|
||||||
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
|
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
|
@ -633,6 +670,84 @@ bootscripts_Makefiles() { #
|
||||||
done # for file in bootscripts/* ...
|
done # for file in bootscripts/* ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#--------------------------------------#
|
||||||
|
network_Makefiles() { #
|
||||||
|
#--------------------------------------#
|
||||||
|
|
||||||
|
if [[ "${METHOD}" = "chroot" ]]; then
|
||||||
|
echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) network ( CHROOT ) ${R_arrow}"
|
||||||
|
else
|
||||||
|
echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) network ( ROOT ) ${R_arrow}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for file in network/* ; do
|
||||||
|
# Keep the script file name
|
||||||
|
this_script=`basename $file`
|
||||||
|
|
||||||
|
case $this_script in
|
||||||
|
*choose) continue ;; # This is not a script but a commentary.
|
||||||
|
*dhcp) continue ;; # Assume static networking.
|
||||||
|
*dhcpcd) continue ;; # Assume static networking.
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# First append each name of the script files to a list (this will become
|
||||||
|
# the names of the targets in the Makefile
|
||||||
|
networktools="$networktools $this_script"
|
||||||
|
|
||||||
|
# Grab the name of the target, strip id number, XXX-script
|
||||||
|
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'\
|
||||||
|
-e 's@-64bit@@' \
|
||||||
|
-e 's@-64@@' \
|
||||||
|
-e 's@64@@' \
|
||||||
|
-e 's@n32@@'`
|
||||||
|
case $name in
|
||||||
|
*network*) name=network-cross-lfs ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
pkg_tarball=$(get_package_tarball_name $name)
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------#
|
||||||
|
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
|
||||||
|
#--------------------------------------------------------------------#
|
||||||
|
#
|
||||||
|
# Drop in the name of the target on a new line, and the previous target
|
||||||
|
# as a dependency. Also call the echo_message function.
|
||||||
|
CHROOT_wrt_target "${this_script}" "$PREV"
|
||||||
|
#
|
||||||
|
# If $pkg_tarball isn't empty, we've got a package...
|
||||||
|
#
|
||||||
|
if [ "$pkg_tarball" != "" ] ; then
|
||||||
|
if [ "${INSTALL_LOG}" = "y" ] ; then
|
||||||
|
CHROOT_wrt_LogNewFiles "$name"
|
||||||
|
fi
|
||||||
|
CHROOT_Unpack "$pkg_tarball"
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
CHROOT_wrt_RunAsRoot "${file}"
|
||||||
|
#
|
||||||
|
# Write installed files log and remove the build directory(ies)
|
||||||
|
# except if the package build fails.
|
||||||
|
if [ "$pkg_tarball" != "" ] ; then
|
||||||
|
CHROOT_wrt_RemoveBuildDirs "$name"
|
||||||
|
if [ "${INSTALL_LOG}" = "y" ] ; then
|
||||||
|
CHROOT_wrt_LogNewFiles "$name"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
# Include a touch of the target name so make can check if it's already been made.
|
||||||
|
wrt_touch
|
||||||
|
#
|
||||||
|
#--------------------------------------------------------------------#
|
||||||
|
# >>>>>>>> END OF Makefile ENTRY <<<<<<<< #
|
||||||
|
#--------------------------------------------------------------------#
|
||||||
|
#
|
||||||
|
# Keep the script file name for Makefile dependencies.
|
||||||
|
PREV=$this_script
|
||||||
|
|
||||||
|
done # for file in network/* ...
|
||||||
|
}
|
||||||
|
|
||||||
#--------------------------------------#
|
#--------------------------------------#
|
||||||
bootable_Makefiles() { #
|
bootable_Makefiles() { #
|
||||||
#--------------------------------------#
|
#--------------------------------------#
|
||||||
|
@ -756,6 +871,9 @@ set -e
|
||||||
# Add the iterations targets, if needed
|
# Add the iterations targets, if needed
|
||||||
[[ "$COMPARE" = "y" ]] && wrt_compare_targets
|
[[ "$COMPARE" = "y" ]] && wrt_compare_targets
|
||||||
bootscripts_Makefiles # mk_BOOTSCRIPT (CHROOT) $bootscripttools
|
bootscripts_Makefiles # mk_BOOTSCRIPT (CHROOT) $bootscripttools
|
||||||
|
if [ -d network ]; then
|
||||||
|
network_Makefiles # If present, process network setup.
|
||||||
|
fi
|
||||||
bootable_Makefiles # mk_BOOTABLE (CHROOT) $bootabletools
|
bootable_Makefiles # mk_BOOTABLE (CHROOT) $bootabletools
|
||||||
|
|
||||||
# Add the CUSTOM_TOOLS targets, if needed
|
# Add the CUSTOM_TOOLS targets, if needed
|
||||||
|
|
|
@ -71,7 +71,8 @@
|
||||||
<xsl:text>set -e
</xsl:text>
|
<xsl:text>set -e
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
<xsl:if test="sect2[@role='installation']">
|
<xsl:if test="sect2[@role='installation'] and
|
||||||
|
not(@id='ch-cross-tools-sysroot-wrapper')">
|
||||||
<xsl:text>cd $PKGDIR
</xsl:text>
|
<xsl:text>cd $PKGDIR
</xsl:text>
|
||||||
<xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'">
|
<xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'">
|
||||||
<xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1
</xsl:text>
|
<xsl:text>tar -xvf ../vim-&vim-version;-lang.* --strip-components=1
</xsl:text>
|
||||||
|
@ -138,6 +139,9 @@
|
||||||
<xsl:when test="ancestor::sect1[@id='ch-cross-tools-glibc']">
|
<xsl:when test="ancestor::sect1[@id='ch-cross-tools-glibc']">
|
||||||
<xsl:value-of select="$timezone"/>
|
<xsl:value-of select="$timezone"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
<xsl:when test="ancestor::sect1[@id='ch-cross-tools-eglibc']">
|
||||||
|
<xsl:value-of select="$timezone"/>
|
||||||
|
</xsl:when>
|
||||||
<xsl:when test="ancestor::sect1[@id='ch-cross-tools-groff'] or
|
<xsl:when test="ancestor::sect1[@id='ch-cross-tools-groff'] or
|
||||||
ancestor::sect1[@id='ch-system-groff']">
|
ancestor::sect1[@id='ch-system-groff']">
|
||||||
<xsl:value-of select="$page"/>
|
<xsl:value-of select="$page"/>
|
||||||
|
|
|
@ -260,7 +260,7 @@ menu "--- BOOK Settings"
|
||||||
default "hppa1.1-unknown-linux-gnu" if PROC_hppa1
|
default "hppa1.1-unknown-linux-gnu" if PROC_hppa1
|
||||||
default "hppa2.0-unknown-linux-gnu" if PROC_hppa2
|
default "hppa2.0-unknown-linux-gnu" if PROC_hppa2
|
||||||
|
|
||||||
default "arm-unknown-linux-gnu" if ARCH_ARM && BOOK_CLFS2
|
default "arm-unknown-linux-gnueabi" if ARCH_ARM && BOOK_CLFS2
|
||||||
|
|
||||||
default "arm-unknown-linux-uclibc" if PROC_ARM
|
default "arm-unknown-linux-uclibc" if PROC_ARM
|
||||||
default "armv5l-unknown-linux-uclibc" if PROC_ARM5L
|
default "armv5l-unknown-linux-uclibc" if PROC_ARM5L
|
||||||
|
|
|
@ -71,6 +71,8 @@ get_package_tarball_name() { #
|
||||||
case $script_name in
|
case $script_name in
|
||||||
tcl) echo $(grep "^tcl" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
tcl) echo $(grep "^tcl" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
;;
|
;;
|
||||||
|
iputils) echo $(grep "^iputils" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
|
;;
|
||||||
powerpc-utils) echo $(grep "^powerpc-utils" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
powerpc-utils) echo $(grep "^powerpc-utils" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
;;
|
;;
|
||||||
uClibc)
|
uClibc)
|
||||||
|
@ -85,12 +87,17 @@ get_package_tarball_name() { #
|
||||||
# Uses kernel headers directly
|
# Uses kernel headers directly
|
||||||
echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
else
|
else
|
||||||
# CLFS{2,3} use massaged headers package
|
# CLFS{2,3} used to use massaged headers package
|
||||||
echo $(grep "^linux-headers-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
# echo $(grep "^linux-headers-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
|
echo $(grep "^linux-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
expect) echo $(grep "^expect" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
expect) echo $(grep "^expect" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
;;
|
;;
|
||||||
|
e2fsprogs-libs) echo $(grep "^e2fsprogs" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
|
;;
|
||||||
|
util-linux-libs) echo $(grep "^util-linux" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
|
;;
|
||||||
xz-utils) echo $(grep "^xz" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
xz-utils) echo $(grep "^xz" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
;;
|
;;
|
||||||
sqlite) echo $(grep "^sqlite" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
sqlite) echo $(grep "^sqlite" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
|
|
Reference in a new issue