[prev in list] [next in list] [prev in thread] [next in thread]
List: ipcop-svn
Subject: [Ipcop-svn] SF.net SVN: ipcop:[4723] ipcop/trunk
From: gespinasse () users ! sourceforge ! net
Date: 2010-07-11 6:24:46
Message-ID: E1OXpy2-0003P9-Uo () sfp-svn-6 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 4723
http://ipcop.svn.sourceforge.net/ipcop/?rev=4723&view=rev
Author: gespinasse
Date: 2010-07-11 06:24:46 +0000 (Sun, 11 Jul 2010)
Log Message:
-----------
Set LDFLAG to use hash-style=gnu to savec a bit of space
log_${MACHINE} now only contain compilation log
file_${MACHINE} contain the files list
Change compilation order to match LFS
Remove from the PATH the part that was used for gcc cross-compile
Remove the 2 cross-compile symlink
Modified Paths:
--------------
ipcop/trunk/lfs/Config
ipcop/trunk/make.sh
Removed Paths:
-------------
ipcop/trunk/lfs/binutils-cross-compile
ipcop/trunk/lfs/gcc-cross-compile
Modified: ipcop/trunk/lfs/Config
===================================================================
--- ipcop/trunk/lfs/Config 2010-07-11 06:16:29 UTC (rev 4722)
+++ ipcop/trunk/lfs/Config 2010-07-11 06:24:46 UTC (rev 4723)
@@ -42,7 +42,7 @@
#
DIR_DL = $(LFS_BASEDIR)/cache
DIR_CHK = $(LFS_BASEDIR)/cache/check
-DIR_INFO = $(LFS_BASEDIR)/log_$(MACHINE)
+DIR_INFO = $(LFS_BASEDIR)/files_$(MACHINE)
DIR_TEST = $(LFS_BASEDIR)/test_$(MACHINE)/$(BUILDDATE)
DIR_TMP = $(LFS_BASEDIR)/cache/tmp
@@ -87,10 +87,10 @@
# special cases
# - if the corresponding rootfile is not found, touch $(TARGET)_missing_rootfile
# - on a partial rebuild without a new file inside TARGET_diff, just touch TARGET
- # $(TARGET)_diff : result of the diff
+ # $(DIR_INFO)/$(TARGET)_diff : result of the diff
# ROOTFILE : reference of include/exclude files
# $(TARGET)_rootfile : ROOTFILE with KVER replacement
- # $(TARGET) : log result with {commented|include|added} files
+ # $(TARGET) : files list result with {commented|include|added} files
if [ -s "$(TARGET)_diff" ]; then \
LFS_SCRIPT=$(firstword $(MAKEFILE_LIST)); \
ROOTFILE=`find $(DIR_SRC)/config/rootfiles/common -maxdepth 1 -type f -name \
$$LFS_SCRIPT`; \
Deleted: ipcop/trunk/lfs/binutils-cross-compile
===================================================================
--- ipcop/trunk/lfs/binutils-cross-compile 2010-07-11 06:16:29 UTC (rev 4722)
+++ ipcop/trunk/lfs/binutils-cross-compile 2010-07-11 06:24:46 UTC (rev 4723)
@@ -1 +0,0 @@
-link binutils
\ No newline at end of file
Deleted: ipcop/trunk/lfs/gcc-cross-compile
===================================================================
--- ipcop/trunk/lfs/gcc-cross-compile 2010-07-11 06:16:29 UTC (rev 4722)
+++ ipcop/trunk/lfs/gcc-cross-compile 2010-07-11 06:24:46 UTC (rev 4723)
@@ -1 +0,0 @@
-link gcc
\ No newline at end of file
Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2010-07-11 06:16:29 UTC (rev 4722)
+++ ipcop/trunk/make.sh 2010-07-11 06:24:46 UTC (rev 4723)
@@ -58,7 +58,7 @@
PREVIOUSSVNREV=4330
# Just an arbitrary name for the downloadable, prebuilt toolchain (if you want to \
save time compiling).
-TOOLCHAINVERSION=1.9.9
+TOOLCHAINVERSION=1.9.15
# A collection of all the external software needed to build, install, and run ipcop. \
This is for GPL compliance. OTHERSRC=${SNAME}-${VERSION}-othersrc.tar.bz2
@@ -108,6 +108,11 @@
# Set up INSTALLER_DIR
INSTALLER_DIR=installer
+# To compile a package more than once in the same stage
+# and send PASS value to both the log file and lfs makefile
+# Has to be reset after usage or next log will have a wrong name
+PASS=""
+
# This is the LFS branch we're following for check_versions.
# Can be either stable or development
#LFS_BRANCH=stable
@@ -288,25 +293,35 @@
# MACHINE_REAL is the target for kernel compilation
# If MACHINE != MACHINE_REAL, gcc-x-cross-compile is build.
# Currently sparc64 and ppc64 use gcc-x-cross-compile
+
+LDFLAGS="-Wl,--hash-style=gnu" # may try later adding -Wl,-O1 but that may make the \
code larger +
+# Toolchain is different on 32 vs 64-bits build
+
+
case ${MACHINE} in
i?86)
MACHINE=i486
- MACHINE_REAL=i486
+ MACHINE_REAL=${MACHINE}
+ # lfs is just something different than (pc|unknow) to force cross-compilation on \
the first pass + # i486 is different from i586,i686
+ LFS_TGT=${MACHINE}-lfs-linux-gnu
LINKER=/lib/ld-linux.so.2
- CFLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer \
-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -Wl,-z,now" + CFLAGS="-Os \
-march=${MACHINE} -mtune=pentium -pipe -fomit-frame-pointer -D_FORTIFY_SOURCE=2 \
-fstack-protector-all -fPIE -Wl,-z,now" CXXFLAGS=${CFLAGS}
;;
x86_64)
- MACHINE_REAL=i486
+ MACHINE_REAL=${MACHINE}
MACHINE=i486
+ LFS_TGT=${MACHINE}-lfs-linux-gnu
WRAPPER_32BIT=linux32
LINKER=/lib/ld-linux.so.2
- CFLAGS="-Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer \
-D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -Wl,-z,now" + CFLAGS="-Os \
-march=${MACHINE} -mtune=pentium -pipe -fomit-frame-pointer -D_FORTIFY_SOURCE=2 \
-fstack-protector-all -fPIE -Wl,-z,now" CXXFLAGS=${CFLAGS}
;;
alpha)
- MACHINE=alpha
- MACHINE_REAL=alpha
+ MACHINE_REAL=${MACHINE}
+ LFS_TGT=${MACHINE}-lfs-linux-gnu
LINKER=/lib/ld-linux.so.2
CFLAGS="-O2 -march=ev4 -mtune=ev56 -mieee -pipe"
CXXFLAGS="-O2 -march=ev4 -mtune=ev56 -mieee -pipe"
@@ -314,6 +329,8 @@
sparc|sparc64)
MACHINE_REAL=${MACHINE}
MACHINE=sparc
+ # force a 32-bits build
+ LFS_TGT=${MACHINE}-lfs-linux-gnu
WRAPPER_32BIT=linux32
LINKER=/lib/ld-linux.so.2
CFLAGS="-O2 -pipe -mcpu=ultrasparc -mtune=ultrasparc"
@@ -322,6 +339,8 @@
ppc|ppc64)
MACHINE_REAL=${MACHINE}
MACHINE=ppc
+ # ppc is different from powerpc
+ LFS_TGT=powerpc-lfs-linux-gnu
WRAPPER_32BIT=linux32
LINKER=/lib/ld.so.1
CFLAGS="-O2 -pipe"
@@ -333,6 +352,15 @@
;;
esac
+# Preliminary logs are send there
+PREPLOGFILE=${BASEDIR}/log_${MACHINE}/_build_00_preparation.log
+export PREPLOGFILE
+
+# find last failing log always at the same place
+# name is without the path as we RM using the _build${MACHINE} path
+# but cp from {BASEDIR}/log_${MACHINE}
+LATEST="_latest_interrupt.log"
+
export CCACHE_DIR=${BASEDIR}/ccache
export CCACHE_HASHDIR=1
@@ -388,7 +416,7 @@
export PATH=${ORG_PATH}
# include machine in TOOLCHAINNAME
-TOOLCHAINNAME=${SNAME}-${TOOLCHAINVERSION}-toolchain-${MACHINE}.tar.gz
+TOOLCHAINNAME=${SNAME}-${TOOLCHAINVERSION}-toolchain-${MACHINE_REAL}.tar.gz
#################################################################################
# Make sure the log directory exists #
@@ -555,8 +583,10 @@
echo -ne "${SET_TIME_COL} time (sec)${SET_RESULT_COL} status${NORMAL}\n"
;;
make_pkg)
- echo "${2}" | while read PKG_VER_SHORT PROGRAM OPTIONS
+ echo "${2}" | while read PKG_VER_SHORT PROGRAM
do
+ OPTIONS=""
+ [ -n "${PASS}" ] && OPTIONS="PASS=${PASS}"
SET_VER_COL_REAL=`position_cursor ${TIME_COL} ${PKG_VER_SHORT} -3`
if [ x"${OPTIONS}" == x"" ]; then
@@ -620,7 +650,7 @@
local FAILURE=0
local i
- echo -ne "Checking for ${PKG_NAME}" | tee -a ${LOGFILE}
+ echo -ne "Checking for ${PKG_NAME}" | tee -a ${PREPLOGFILE}
for i in `seq 1 4`; do
if [ 0`echo ${FOUND} | cut -d"." -f ${i}` -gt 0`echo ${REQUIRED} | cut -d"." -f \
${i}` ]; then @@ -745,7 +775,15 @@
beautify message STOP
fi
beautify message FAIL "\n${FAIL}ERROR${NORMAL}: ${BOLD}$*${NORMAL}"
- echo -ne "Check ${LOGFILE} for errors if applicable"
+ # we may recompiling and don't know when LOGFILE exist if we are writing there
+ if [ -z ${LOGFILE} ]; then
+ # stop before compilation : prequisite, download, md5
+ echo -ne "Check ${PREPLOGFILE} for errors if applicable"
+ else
+ # stop during compilation
+ cp ${LOGFILE} ${BASEDIR}/log_${MACHINE}/${LATEST}
+ echo -ne "Check log_${MACHINE}/${LATEST} for errors if applicable"
+ fi
# In case of an abnormal ending, make sure the cursor is visible
echo -ne "\\033[?25h\n"
@@ -886,13 +924,10 @@
{
echo -ne "${BOLD}*** Setting up our build environment${NORMAL}\n"
- LOGFILE=${BASEDIR}/log_${MACHINE}/_build_00_preparation.log
- export LOGFILE
-
#################################################################################
# System configuration #
#################################################################################
- echo "System configuration" >> ${LOGFILE}
+ echo "System configuration" >> ${PREPLOGFILE}
# Set umask
umask 022
@@ -906,7 +941,7 @@
# Setting our nice level #
#################################################################################
if [ x`nice` != x"${NICE}" ]; then
- echo "Setting our nice level to ${NICE}" >> ${LOGFILE}
+ echo "Setting our nice level to ${NICE}" >> ${PREPLOGFILE}
echo -ne "Setting our nice level to ${NICE}"
${SUDO} ${RENICE} ${NICE} $$ > /dev/null
@@ -959,6 +994,7 @@
#################################################################################
${MKDIR} ${BASEDIR}/{cache,ccache,cache/tmp}
${MKDIR} ${BASEDIR}/build_${MACHINE}/${TOOLS_DIR}/usr
+ ${MKDIR} ${BASEDIR}/files_${MACHINE}
${MKDIR} ${BASEDIR}/test_${MACHINE}
if [ x"${RUNNING_TEST}" == x"yes" ]; then
${MKDIR} ${BASEDIR}/test_${MACHINE}/${BUILDDATE}
@@ -980,7 +1016,7 @@
${SUDO} ${MKDIR} ${LFS}/dev/pts
${SUDO} ${MKDIR} ${LFS}/proc
${SUDO} ${MKDIR} ${LFS}/sys
- ${SUDO} ${MKDIR} ${LFS}/usr/src/{cache,ccache,config,doc,html,langs,lfs,log_${MACHINE},src,test_${MACHINE},updates}
+ ${SUDO} ${MKDIR} ${LFS}/usr/src/{cache,ccache,config,doc,files_${MACHINE},html,langs,lfs,log_${MACHINE},src,test_${MACHINE},updates}
${SUDO} ${MKDIR} ${LFS}/${INSTALLER_DIR}
#################################################################################
@@ -1007,6 +1043,7 @@
${SUDO} ${BIND} ${BASEDIR}/ccache ${LFS}/usr/src/ccache
${SUDO} ${BIND} ${BASEDIR}/config ${LFS}/usr/src/config
${SUDO} ${BIND} ${BASEDIR}/doc ${LFS}/usr/src/doc
+ ${SUDO} ${BIND} ${BASEDIR}/files_${MACHINE} ${LFS}/usr/src/files_${MACHINE}
${SUDO} ${BIND} ${BASEDIR}/html ${LFS}/usr/src/html
${SUDO} ${BIND} ${BASEDIR}/langs ${LFS}/usr/src/langs
${SUDO} ${BIND} ${BASEDIR}/lfs ${LFS}/usr/src/lfs
@@ -1037,18 +1074,20 @@
${RM} ${LFS}/usr/src/log_${MACHINE}/_build_06_othersrc-list.log 2>/dev/null
# Those log are totally remade at each build, so don't accumulate log
${RM} ${LFS}/usr/src/log_${MACHINE}/_build_{00_preparation,05_packages}.log \
2>/dev/null + ${RM} ${LFS}/usr/src/log_${MACHINE}/${LATEST} 2>/dev/null
} # End of prepareenv()
+
#########################################################################################################
# Print result of a toolchain prerequisites test to log #
#########################################################################################################
report_result()
{
if [ $1 -eq 0 ]; then
- echo ": DONE" >> ${LOGFILE}
+ echo ": DONE" >> ${PREPLOGFILE}
else
- echo ": FAIL" >> ${LOGFILE}
+ echo ": FAIL" >> ${PREPLOGFILE}
fi
} # End of report_result()
@@ -1058,9 +1097,6 @@
#########################################################################################################
toolchain_check_prerequisites()
{
- LOGFILE=${BASEDIR}/log_${MACHINE}/_build_00_preparation.log
- export LOGFILE
-
local SUCCESS=1
local RESULT
@@ -1259,8 +1295,8 @@
#########################################################################################################
entershell()
{
- # /${TOOLS_DIR}/usr/bin is for ccache, /usr/${MACHINE_REAL}-linux/bin for \
cross-compilation
- PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin:/usr/${MACHINE_REAL}-linux/bin
+ # /${TOOLS_DIR}/usr/bin is for ccache
+ PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin
if [ ! -e ${LFS}/usr/src/lfs/ ]; then
exiterror "No such file or directory: ${LFS}/usr/src/lfs/"
@@ -1290,10 +1326,11 @@
MACHINE_REAL="${MACHINE_REAL}" \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
KVER=${KVER} \
STAGE=${STAGE} \
STAGE_ORDER=${STAGE_ORDER} \
- LOGFILE=`echo ${LOGFILE} | sed "s,${BASEDIR},/usr/src,g"` \
+ LOGFILE=`echo ${PREPLOGFILE} | sed "s,${BASEDIR},/usr/src,g"` \
${WRAPPER_32BIT} bash
if [ ${?} -ne 0 ]; then
@@ -1318,25 +1355,35 @@
exiterror "No such file or directory: ${BASEDIR}/lfs/${1}"
fi
+ # so we catch for sure error in PREPLOGFILE
+ unset LOGFILE
if grep -E "^HOST_ARCH.*${MACHINE}|^HOST_ARCH.*all" ${BASEDIR}/lfs/${1} >/dev/null; \
then get_pkg_ver ${BASEDIR}/lfs/${1}
beautify make_pkg "${PKG_VER_SHORT} $*"
- echo -e "`date -u '+%b %e %T'`: Building $* " >> ${LOGFILE}
+ # Send download and checksum to preparation.log,
+ # so splitted log have minimal more text on rebuild
+ # make: Nothing to be done for `install'
+ echo -e "`date -u '+%b %e %T'`: Building $* " >> ${PREPLOGFILE}
cd ${BASEDIR}/lfs && make -s -f $* MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} \
MESSAGE="${1}\t " \
- download >> ${LOGFILE} 2>&1
+ download >> ${PREPLOGFILE} 2>&1
if [ ${?} -ne 0 ]; then
exiterror "Download error in ${1}"
fi
cd ${BASEDIR}/lfs && make -s -f $* MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} \
MESSAGE="${1}\t md5sum" \
- md5 >> ${LOGFILE} 2>&1
+ md5 >> ${PREPLOGFILE} 2>&1
if [ ${?} -ne 0 ]; then
exiterror "md5sum error in ${1}, check file in cache or signature"
fi
+ # Split log per package
+ LOGFILE="${BASEDIR}/log_${MACHINE}/${STAGE_ORDER}_${STAGE}/${1}-${PKG_VER}"
+ # Add a separator and PASS if PASS is not empty
+ [ -n "${PASS}" ] && \
LOGFILE="${BASEDIR}/log_${MACHINE}/${STAGE_ORDER}_${STAGE}/${1}-${PKG_VER}_${PASS}" +
return 0 # pass all!
else
return 1 # skip, not for this arch
@@ -1372,6 +1419,7 @@
# CFLAGS and CXXFLAGS are not set on purpose (recommended to be empty by lfs)
cd ${BASEDIR}/lfs && ${WRAPPER_32BIT} make -f $* \
CONFIG_ROOT=${CONFIG_ROOT} \
+ LFS_TGT=${LFS_TGT} \
LINKER=${LINKER} \
TOOLS_DIR=${TOOLS_DIR} \
REQUIRED_KERNEL=${REQUIRED_KERNEL} \
@@ -1380,11 +1428,14 @@
LFS_BASEDIR=${BASEDIR} \
LFS=${LFS} \
PARALLELISM=${PARALLELISM} \
+ PASS=${PASS} \
RUNNING_TEST=${RUNNING_TEST} \
STAGE=${STAGE} \
STAGE_ORDER=${STAGE_ORDER} \
SHELL='/bin/bash' \
install >> ${LOGFILE} 2>&1
+ # the >> is needed to keep log on rebuild or log is replaced by
+ # make: Nothing to be done for `install'.
local COMPILE_RESULT=${?}
local PKG_TIME_END=`date +%s`
@@ -1411,7 +1462,6 @@
[ ${?} -eq 1 ] && return 0 # package is not for this arch, goto next
local PKG_TIME_START=`date +%s`
- local PKG_VER=`get_pkg_ver ${BASEDIR}/lfs/${1}`
local WRAPPER_32BIT=${WRAPPER_32BIT}
# When cross-compiling, make sure the kernel is compiled for the target
@@ -1448,6 +1498,7 @@
CCACHE_HASHDIR=${CCACHE_HASHDIR} \
DISTCC_DIR=/usr/src/distcc \
PARALLELISM=${PARALLELISM} \
+ PASS=${PASS} \
LINKER=${LINKER} \
TOOLS_DIR=${TOOLS_DIR} \
INSTALLER_DIR=${INSTALLER_DIR} \
@@ -1458,6 +1509,7 @@
BUILDDATE="${BUILDDATE}" \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
RUNNING_TEST=${RUNNING_TEST} \
KVER=${KVER} \
PERLVER=${PERLVER} \
@@ -1496,26 +1548,20 @@
STAGE_ORDER=01
STAGE=toolchain
+ ${MKDIR} ${BASEDIR}/files_${MACHINE}/01_toolchain
${MKDIR} ${BASEDIR}/log_${MACHINE}/01_toolchain
- LOGFILE="${BASEDIR}/log_${MACHINE}/_build_01_toolchain.log"
- export LOGFILE
-
if [ -f $BASEDIR/log_${MACHINE}/01_toolchain/ccache-* ]; then
beautify message INFO "You can't partially rebuild some parts of the toolchain \
cleanly." beautify message INFO "Preferably before each toolchain build, \
use:\n./make.sh clean" fi
- if [ x`uname -m` == x"x86_64" ]; then
- exiterror "Toolchain build does not work actually on x86_64.\n" \
- "You need to use one made on a i686\n or load one with ./make.sh gettoolchain to \
be able to continue\n"
- fi
# For 64bit hosts except alpha, we compile 32bit userland and 64bit kernel. We \
build a small helper that # fools the system into thinking we're on a 32bit \
architecture. This works for x86_64, ppc64 and sparc64 # We use linux32 even on \
32bit machines, so 32bit and 64bit could use exactly the same toolchain package if [ \
x"${MACHINE}" != x"alpha" ]; then
- toolchain_make linux32
+ : # toolchain_make linux32
fi
# make distcc first so that CCACHE_PREFIX works immediately
@@ -1524,16 +1570,20 @@
fi
toolchain_make ccache
- toolchain_make binutils PASS=1
- toolchain_make gcc PASS=1
+ PASS="1"
+ toolchain_make binutils
+ toolchain_make gcc
+ PASS=""
toolchain_make linux-headers
toolchain_make glibc
toolchain_make adjust-toolchain
+ PASS="2"
+ toolchain_make binutils
+ toolchain_make gcc
+ PASS=""
toolchain_make tcl # tcl,expect,dejagnu only needed to run gcc tests
toolchain_make expect
toolchain_make dejagnu
- toolchain_make gcc PASS=2
- toolchain_make binutils PASS=2
toolchain_make ncurses
toolchain_make bash
toolchain_make bzip2
@@ -1541,7 +1591,9 @@
toolchain_make tar # build just after xz to avoid using pipe with .xz package (if \
host tar is old) toolchain_make coreutils
toolchain_make diffutils
- toolchain_make util-linux-ng # contrary to LFS, we compile as mount is needed \
inside stage2 + toolchain_make file
+ # contrary to LFS, we compile as mount is needed inside stage2 and linux32 is used \
in chroot_make + toolchain_make util-linux-ng
toolchain_make findutils
toolchain_make gawk
toolchain_make gettext
@@ -1571,11 +1623,9 @@
STAGE_ORDER=02
STAGE=base
+ ${MKDIR} ${BASEDIR}/files_${MACHINE}/02_base
${MKDIR} ${BASEDIR}/log_${MACHINE}/02_base
- LOGFILE="${BASEDIR}/log_${MACHINE}/_build_02_base.log"
- export LOGFILE
-
chroot_make stage2
chroot_make linux-headers
chroot_make glibc
@@ -1584,8 +1634,8 @@
chroot_make binutils
chroot_make gmp
chroot_make mpfr
- chroot_make file
chroot_make gcc
+ chroot_make gcc2
chroot_make sed
chroot_make pkg-config
chroot_make ncurses
@@ -1596,15 +1646,17 @@
chroot_make m4
chroot_make bison
chroot_make procps
+ chroot_make grep
+ chroot_make readline
+ chroot_make bash
chroot_make libtool
chroot_make perl
- chroot_make readline
chroot_make autoconf
chroot_make automake
- chroot_make bash
chroot_make bzip2
chroot_make xz
chroot_make diffutils
+ chroot_make gawk # file is not recompiled on base as not include in iso
chroot_make findutils
chroot_make flex
chroot_make aboot
@@ -1614,9 +1666,7 @@
chroot_make hfsutils
chroot_make yaboot
chroot_make quik
- chroot_make gawk
chroot_make gettext
- chroot_make grep
chroot_make groff
chroot_make gzip
chroot_make iproute2
@@ -1645,16 +1695,14 @@
{
beautify build_stage "Building ipcop"
- # /${TOOLS_DIR}/usr/bin is for ccache, /usr/${MACHINE_REAL}-linux/bin for \
cross-compilation
- PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin:/usr/${MACHINE_REAL}-linux/bin
+ # /${TOOLS_DIR}/usr/bin is for ccache
+ PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin
STAGE_ORDER=03
STAGE=ipcop
+ ${MKDIR} ${BASEDIR}/files_${MACHINE}/03_ipcop
${MKDIR} ${BASEDIR}/log_${MACHINE}/03_ipcop
- LOGFILE="${BASEDIR}/log_${MACHINE}/_build_03_ipcop.log"
- export LOGFILE
-
# Build these first as some of the kernel packages below rely on
# these for some of their client program functionality
chroot_make ipcop
@@ -1668,9 +1716,6 @@
chroot_make ppp
chroot_make rp-pppoe
chroot_make unzip
- # Build cross-compile mini-toolchain (binutils and gcc) so we can build a kernel \
for 64bit machines
- chroot_make binutils-cross-compile
- chroot_make gcc-cross-compile
chroot_make linux
chroot_make CnxADSL
chroot_make wanpipe
@@ -1787,16 +1832,14 @@
{
beautify build_stage "Building miscellaneous"
- # /${TOOLS_DIR}/usr/bin is for ccache, /usr/${MACHINE_REAL}-linux/bin for \
cross-compilation
- PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin:/usr/${MACHINE_REAL}-linux/bin
+ # /${TOOLS_DIR}/usr/bin is for ccache
+ PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin
STAGE_ORDER=04
STAGE=misc
+ ${MKDIR} ${BASEDIR}/files_${MACHINE}/04_misc
${MKDIR} ${BASEDIR}/log_${MACHINE}/04_misc
- LOGFILE="${BASEDIR}/log_${MACHINE}/_build_04_misc.log"
- export LOGFILE
-
chroot_make cdrtools
chroot_make memtest
chroot_make syslinux
@@ -1830,16 +1873,18 @@
{
beautify build_stage "Building packages"
- # /${TOOLS_DIR}/usr/bin is for ccache, /usr/${MACHINE_REAL}-linux/bin for \
cross-compilation
- PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin:/usr/${MACHINE_REAL}-linux/bin
+ # /${TOOLS_DIR}/usr/bin is for ccache
+ PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin
STAGE_ORDER=05
STAGE=packages
+ ${MKDIR} ${BASEDIR}/files_${MACHINE}/05_packages
${MKDIR} ${BASEDIR}/log_${MACHINE}/05_packages
+ # we rebuild each time, so remove previous log
+ # first be sure something to be removed (no -f at RM)
+ touch ${BASEDIR}/log_${MACHINE}/05_packages/foo
+ ${SUDO} ${RM} ${BASEDIR}/log_${MACHINE}/05_packages/*
- LOGFILE="${BASEDIR}/log_${MACHINE}/_build_05_packages.log"
- export LOGFILE
-
chroot_make stage5
chroot_make installer
chroot_make initramfs
@@ -1854,11 +1899,15 @@
echo "Skip avm drivers"
fi
- chroot_make packages_list PASS=1
+ PASS=1
+ chroot_make packages_list
+ PASS=""
chroot_make update
chroot_make cdrom
chroot_make netboot
- chroot_make packages_list PASS=2
+ PASS=2
+ chroot_make packages_list
+ PASS=""
if [ x"${SKIP_USB_IMAGES}" != x"yes" ]; then
chroot_make usb-key
@@ -1880,8 +1929,6 @@
#########################################################################################################
loadsrc()
{
- LOGFILE=${BASEDIR}/log_${MACHINE}/_build_00_preparation.log
-
${MKDIR} ${BASEDIR}/log_${MACHINE}
${MKDIR} ${BASEDIR}/cache
local COUNTER=0
@@ -1918,10 +1965,10 @@
beautify message ARCH ${HOST_ARCH}
- make -s -f ${i} MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} MESSAGE="${i}\t" \
download >> ${LOGFILE} 2>&1 + make -s -f ${i} MACHINE=${MACHINE} \
LFS_BASEDIR=${BASEDIR} MESSAGE="${i}\t" download >> ${PREPLOGFILE} 2>&1 if [ ${?} \
-ne 0 ]; then beautify message FAIL wget
- echo "${1} : wget error in '${i}'" >> ${LOGFILE} 2>&1
+ echo "${1} : wget error in '${i}'" >> ${PREPLOGFILE} 2>&1
FINISHED=0
FAILED[${WGET_FAIL_COUNTER}]=${i}
WGET_FAIL_COUNTER=$[ ${WGET_FAIL_COUNTER} + 1]
@@ -1929,7 +1976,7 @@
beautify message DONE wget
fi
- make -s -f ${i} MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} MESSAGE="${i}\t " md5 \
>> ${LOGFILE} 2>&1 + make -s -f ${i} MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} \
> > MESSAGE="${i}\t " md5 >> ${PREPLOGFILE} 2>&1
if [ ${?} -ne 0 ]; then
beautify message FAIL
MD5SUM_FAIL_COUNTER=$[ ${MD5SUM_FAIL_COUNTER} + 1]
@@ -1937,7 +1984,7 @@
beautify message DONE
fi
else
- echo "${i} : skipping '${i}' on ${MACHINE}" >> ${LOGFILE} 2>&1
+ echo "${i} : skipping '${i}' on ${MACHINE}" >> ${PREPLOGFILE} 2>&1
fi
done
@@ -1955,17 +2002,17 @@
FINISHED=1
echo -ne "${BOLD}${i} (Attempt: ${c})${NORMAL}"
- make -s -f ${i} MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} MESSAGE="${i}\t \
(${c}/${MAX_RETRIES})" download >> ${LOGFILE} 2>&1 + make -s -f ${i} \
MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} MESSAGE="${i}\t (${c}/${MAX_RETRIES})" \
download >> ${PREPLOGFILE} 2>&1 if [ ${?} -ne 0 ]; then
beautify message FAIL wget
- echo "${1} : wget error in '${i}'" >> ${LOGFILE} 2>&1
+ echo "${1} : wget error in '${i}'" >> ${PREPLOGFILE} 2>&1
FINISHED=0
else
beautify message DONE wget
WGET_FAIL_COUNTER=$[ ${WGET_FAIL_COUNTER} - 1]
fi
- make -s -f ${i} MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} MESSAGE="${i}\t " md5 \
>> ${LOGFILE} 2>&1 + make -s -f ${i} MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} \
> > MESSAGE="${i}\t " md5 >> ${PREPLOGFILE} 2>&1
if [ ${?} -ne 0 ]; then
beautify message FAIL
else
@@ -1998,27 +2045,28 @@
#########################################################################################################
package_toolchain()
{
- # Gilles : I don't think this is still true, as we now just create symlink to \
toolchain on stage2
- # Just change error to warning for now
- if [ -f ${BASEDIR}/log_${MACHINE}/02_base/stage2 ]; then
- beautify message WARN "Toolchain may have been altered and made unfit for future \
rebuilding" + # if base adjust-toolchain has run, we can't package
+ if [ -f ${TOOLS_DIR}/bin/ld-old ]; then
+ exiterror "To late, toolchain has been altered"
fi
TOOLCHAINFILES="01_toolchain.lst"
- echo "*** Packaging the ${MACHINE} toolchain" >> ${LOGFILE}
- echo -ne "${BOLD}*** Packaging the ${MACHINE} toolchain${NORMAL}\n"
+ echo "*** Packaging the ${MACHINE} toolchain" >> ${PREPLOGFILE}
+ echo -ne "${BOLD}*** Packaging the ${MACHINE_REAL} toolchain${NORMAL}\n"
# Remove the man pages from the toolchain
${RM} /${TOOLS_DIR}/man /${TOOLS_DIR}/usr/man
- echo "Creating the ${MACHINE} toolchain tar archive" >> ${LOGFILE}
- echo -ne "Creating the ${MACHINE} toolchain tar archive"
+ echo "Creating the ${MACHINE_REAL} toolchain tar archive" >> ${PREPLOGFILE}
+ echo -ne "Creating the ${MACHINE_REAL} toolchain tar archive"
cd ${BASEDIR} && tar --create --gzip --verbose \
--exclude="log_${MACHINE}/_build_0[0,2-6]_*.log" \
--exclude="log_${MACHINE}/_build_${TOOLCHAINFILES}" \
--exclude="log_${MACHINE}/0[2-6]_*" \
--file=cache/${TOOLCHAINNAME} \
build_${MACHINE}/${TOOLS_DIR} \
- log_${MACHINE} > log_${MACHINE}/_build_${TOOLCHAINFILES}
+ log_${MACHINE} \
+ files_${MACHINE}/01_toolchain \
+ > log_${MACHINE}/_build_${TOOLCHAINFILES}
if [ $? -eq 0 ]; then
beautify message DONE
@@ -2026,8 +2074,8 @@
beautify message FAIL
fi
- echo "Calculating the ${MACHINE} toolchain tar archive md5sum" >> ${LOGFILE}
- echo -ne "Calculating the ${MACHINE} toolchain tar archive md5sum"
+ echo "Calculating the ${MACHINE_REAL} toolchain tar archive md5sum" >> \
${PREPLOGFILE} + echo -ne "Calculating the ${MACHINE_REAL} toolchain tar archive \
md5sum" md5sum cache/${TOOLCHAINNAME} > cache/${TOOLCHAINNAME}.md5
if [ $? -eq 0 ]; then
@@ -2076,9 +2124,9 @@
echo -ne "Building ${BOLD}${NAME}-${VERSION}${NORMAL} for ${BOLD}${MACHINE} on \
${MACHINE_REAL}${NORMAL}\n"
- if [ -f ${BASEDIR}/log_${MACHINE}/01_toolchain/strip ]; then
+ if [ -f ${BASEDIR}/files_${MACHINE}/01_toolchain/strip ]; then
prepareenv
- beautify message DONE "Stage toolchain already built (found \
log_${MACHINE}/01_toolchain/strip)" + beautify message DONE "Stage toolchain already \
built (found files_${MACHINE}/01_toolchain/strip)" elif [ -f \
${BASEDIR}/cache/${TOOLCHAINNAME} -a -f ${BASEDIR}/cache/${TOOLCHAINNAME}.md5 ]; then \
echo -ne "${BOLD}*** Restore from ${TOOLCHAINNAME}${NORMAL}\n" echo -ne "Checking \
md5sum" @@ -2239,6 +2287,7 @@
[ ${?} -ne 0 ] && exiterror "Not safe to clean the tree with some mountpoint still \
there, retry when compilation has finished"
${SUDO} ${RM} ${BASEDIR}/build_${MACHINE}
+ ${SUDO} ${RM} ${BASEDIR}/files_${MACHINE}
${SUDO} ${RM} ${BASEDIR}/log_${MACHINE}
${SUDO} ${RM} ${BASEDIR}/updates/${VERSION}/patch.tar.gz
@@ -2280,7 +2329,7 @@
### or better to link to a ChangeLog that we put somewhere online ?
END
-
+
;;
newupdate)
# create structure for $VERSION update
@@ -2318,8 +2367,9 @@
exit 1
fi
prepareenv
- PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin:/usr/${MACHINE_REAL}-linux/bin
+ PATH=/${TOOLS_DIR}/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/${TOOLS_DIR}/bin
export PATH
+ STAGE_ORDER=05; STAGE=packages # needed for logfile name
chroot_make files_check
if [ -f ${BASEDIR}/doc/${NAME}-${PREVIOUSVERSION}-all-files-list.${MACHINE}.txt.md5 \
]; then echo -ne "Running MD5 compare"
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic