cookutils rev 421

cook, cross, *.conf: improve cross compilation and small clean
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 19 04:47:53 2012 +0200 (2012-05-19)
parents 9c322a61167d
children 50cd87593dae
files cook cook.conf cooker cross cross.conf doc/cross.txt
line diff
     1.1 --- a/cook	Wed May 16 11:55:25 2012 +0200
     1.2 +++ b/cook	Sat May 19 04:47:53 2012 +0200
     1.3 @@ -17,9 +17,6 @@
     1.4  broken="$CACHE/broken"
     1.5  blocked="$CACHE/blocked"
     1.6  
     1.7 -# Old style compatibility
     1.8 -SOURCES_REPOSITORY=$SRC
     1.9 -
    1.10  #
    1.11  # Functions
    1.12  #
    1.13 @@ -319,8 +316,7 @@
    1.14  
    1.15  # Copy all generic files (locale, pixmaps, .desktop). We use standard paths,
    1.16  # so some packages need to copy these files with the receipt and genpkg_rules.
    1.17 -copy_generic_files()
    1.18 -{
    1.19 +copy_generic_files() {
    1.20  	# $LOCALE is set in cook.conf
    1.21  	if [ "$LOCALE" ]; then
    1.22  		if [ -d "$install/usr/share/locale" ]; then
    1.23 @@ -373,8 +369,7 @@
    1.24  # Find and strip : --strip-all (-s) or --strip-debug on static libs as well
    1.25  # as removing uneeded files like in Python packages. Cross compiled binaries
    1.26  # must be stripped with cross-tools aka $ARCH-slitaz-*-strip
    1.27 -strip_package()
    1.28 -{
    1.29 +strip_package() {
    1.30  	case "$ARCH" in
    1.31  		arm|x86_64) export STRIP=${HOST_SYSTEM}-strip ;;
    1.32  		*) export STRIP=strip ;;
    1.33 @@ -442,9 +437,9 @@
    1.34  				echo "cook: $ARCH sysroot: $SYSROOT"
    1.35  			else
    1.36  				echo "cook: adding /usr/cross/$ARCH/bin to PATH"
    1.37 -				export PATH=$PATH:/usr/cross/$ARCH/bin
    1.38 +				export PATH=$PATH:$CROSS_PREFIX/bin
    1.39  			fi
    1.40 -			export CROSS_COMPILE=$HOST_SYSTEM-
    1.41 +			export CROSS_COMPILE=${HOST_SYSTEM}-
    1.42  			echo "cook: using cross-tools: $CROSS_COMPILE"
    1.43  			export CC=${HOST_SYSTEM}-gcc
    1.44  			export CXX=${HOST_SYSTEM}-g++
    1.45 @@ -452,9 +447,7 @@
    1.46  			export AS=${HOST_SYSTEM}-as
    1.47  			export RANLIB=${HOST_SYSTEM}-ranlib
    1.48  			export LD=${HOST_SYSTEM}-ld
    1.49 -			export STRIP=${HOST_SYSTEM}-strip
    1.50 -			#export PKGCONFIG=${HOST_SYSTEM}-pkg-config
    1.51 -			;;
    1.52 +			export STRIP=${HOST_SYSTEM}-strip ;;
    1.53  	esac
    1.54  
    1.55  	[ "$QA" ] && receipt_quality
    1.56 @@ -775,8 +768,7 @@
    1.57  	fi
    1.58  }
    1.59  
    1.60 -tac()
    1.61 -{
    1.62 +tac() {
    1.63  	sed '1!G;h;$!d' $1
    1.64  }
    1.65  
    1.66 @@ -895,7 +887,7 @@
    1.67  		# Use setup pkgs from cross.conf or cook.conf. When cross compiling
    1.68  		# ARCH-setup or 'cross check-env' should be used before: cook setup
    1.69  		case "$ARCH" in
    1.70 -			arm)
    1.71 +			arm|x86_64)
    1.72  				if [ ! -x "/usr/bin/cross" ]; then
    1.73  					gettext "ERROR: cross is not installed"; echo
    1.74  					exit 1
    1.75 @@ -905,7 +897,7 @@
    1.76  		esac
    1.77  		for pkg in $SETUP_PKGS; do
    1.78  			if [ "$forced" ]; then
    1.79 -				tazpkg get-install $pkg --forced
    1.80 +				tazpkg -gi $pkg --forced
    1.81  			else
    1.82  				[ -d "$INSTALLED/$pkg" ] || tazpkg get-install $pkg
    1.83  			fi
    1.84 @@ -938,7 +930,7 @@
    1.85  		arch=${1%-setup}
    1.86  		check_root
    1.87  		echo ""
    1.88 -		gettext "Setting up your cross environment"; echo
    1.89 +		boldify $(gettext "Setting up your cross environment")
    1.90  		separator
    1.91  		init_db_files
    1.92  		sed -i \
    1.93 @@ -959,22 +951,22 @@
    1.94  					/etc/slitaz/cook.conf ;;
    1.95  		esac
    1.96  		. /etc/slitaz/cook.conf
    1.97 -		echo "Target arch   : $ARCH"
    1.98 -		echo "Configure args: $CONFIGURE_ARGS"
    1.99 +		echo "Target arch     : $ARCH"
   1.100 +		echo "Configure args  : $CONFIGURE_ARGS"
   1.101  		if [ "$SYSROOT" ]; then
   1.102 -			echo "Arch sysroot: $SYSROOT"
   1.103 +			echo "Arch sysroot    : $SYSROOT"
   1.104  			CC=/usr/bin/${HOST_SYSTEM}-gcc
   1.105  		else
   1.106 -			echo "Path: /usr/cross/$ARCH/bin"
   1.107 +			echo "Additional path : /usr/cross/$ARCH/bin"
   1.108  			CC=/usr/cross/$ARCH/bin/${HOST_SYSTEM}-gcc
   1.109  		fi
   1.110  		if [ -x $CC ]; then
   1.111 -			echo "Cross compiler: ${HOST_SYSTEM}-gcc"
   1.112 +			echo "Cross compiler  : ${HOST_SYSTEM}-gcc"
   1.113  		else
   1.114 -			echo "WARNING: C compiler is missing: ${HOST_SYSTEM}-gcc"
   1.115 +			colorize "C compiler is missing: ${HOST_SYSTEM}-gcc" 36
   1.116  			echo "Run 'cross compile' to cook a toolchain"
   1.117  		fi
   1.118 -		echo "" ;;
   1.119 +		separator && echo "" ;;
   1.120  	test)
   1.121  		# Test a cook environment.
   1.122  		echo "Cook test: testing the cook environment" | log
     2.1 --- a/cook.conf	Wed May 16 11:55:25 2012 +0200
     2.2 +++ b/cook.conf	Sat May 19 04:47:53 2012 +0200
     2.3 @@ -43,9 +43,14 @@
     2.4  BUILD_SYSTEM="$ARCH-slitaz-linux"
     2.5  HOST_SYSTEM="$ARCH-slitaz-linux"
     2.6  
     2.7 -# Cross compilation settings. Cross sysroot is used by cross-tools to
     2.8 -# set the system. SliTaz standard is to point sysroot to the directory
     2.9 -# of the cross toolchain. Example: SYSROOT="/usr/$HOST_SYSTEM"
    2.10 +# Cross compilation settings. Prefix is use by cook to export PATH so it
    2.11 +# can use the cross-tools in $CROSS_PREFIX/bin.
    2.12 +CROSS_PREFIX=/usr/cross/$ARCH
    2.13 +
    2.14 +# Sysroot is used by cross-tools to set the system. SliTaz standard is
    2.15 +# to point sysroot to the directory of the cross toolchain. The default
    2.16 +# is to use cross with: --prefix=/usr/cross/$ARCH and no --with-sysroot=
    2.17 +# Example: SYSROOT="/usr/$HOST_SYSTEM"
    2.18  SYSROOT=""
    2.19  
    2.20  # SliTaz optimisation flags - Wide compatibility & optimized for ARCH.
    2.21 @@ -89,3 +94,4 @@
    2.22  
    2.23  # Old way/tazwok compatibility.
    2.24  BUILD_HOST="$HOST_SYSTEM"
    2.25 +SOURCES_REPOSITORY=$SRC
     3.1 --- a/cooker	Wed May 16 11:55:25 2012 +0200
     3.2 +++ b/cooker	Sat May 19 04:47:53 2012 +0200
     3.3 @@ -295,13 +295,10 @@
     3.4  		[ "$2" ] || hours=2
     3.5  		if [ ! -f "$crontabs" ]; then
     3.6  			mkdir -p /var/spool/cron/crontabs
     3.7 -			echo "# Run SliTaz Cooker every $hours hours" > $crontabs
     3.8 -			echo "0 */$hours * * *  /usr/bin/cooker" >> $crontabs
     3.9 -			/etc/init.d/crond start
    3.10  		fi
    3.11  		if ! fgrep -q /usr/bin/cooker $crontabs; then
    3.12  			echo "# Run SliTaz Cooker every $hours hours" > $crontabs
    3.13 -			echo "0 */$hours * * *  /usr/bin/cooker" >> $crontabs
    3.14 +			echo "0 */$hours * * *  /usr/bin/cooker --output=html" >> $crontabs
    3.15  			killall crond 2>/dev/null && /etc/init.d/crond start
    3.16  		fi ;;
    3.17  	check-cron)
     4.1 --- a/cross	Wed May 16 11:55:25 2012 +0200
     4.2 +++ b/cross	Sat May 19 04:47:53 2012 +0200
     4.3 @@ -26,12 +26,12 @@
     4.4    howto           Man alike and howto
     4.5    info            Display cross-tools info
     4.6    testsuite       Execute a small testsuite
     4.7 -  check-env       Check build host tools
     4.8 +  check           Check build host environment
     4.9    download        Download necessary sources
    4.10    show-log        Show a compile log
    4.11    binutils        Compile Binutils
    4.12 +  linux-headers   Install Kernel headers
    4.13    gcc-static      Compile GCC static
    4.14 -  linux-headers   Install Kernel headers
    4.15    glibc           Compile GNU Glibc
    4.16    gcc-final       Compile final GCC
    4.17    busybox         Cross compile Busybox
    4.18 @@ -78,11 +78,12 @@
    4.19  # Get source if not yet in $SRC.
    4.20  download_src() {
    4.21  	mkdir -p $SRC && cd $SRC
    4.22 -	[ -f "binutils-$BINUTILS_VERSION.tar.bz2" ] || wget $BINUTILS_WGET
    4.23 -	[ -f "linux-$LINUX_VERSION.tar.bz2" ] || wget $LINUX_WGET
    4.24 -	[ -f "glibc-$GLIBC_VERSION.tar.bz2" ] || wget $GLIBC_WGET
    4.25 -	[ -f "gcc-$GCC_VERSION.tar.bz2" ] || wget $GCC_WGET
    4.26 -	[ -f "busybox-$BUSYBOX_VERSION.tar.bz2" ] || wget $BUSYBOX_WGET
    4.27 +	[ -f "$BINUTILS_TARBALL" ] || wget $BINUTILS_WGET
    4.28 +	[ -f "$LINUX_TARBALL" ] || wget $LINUX_WGET
    4.29 +	[ -f "$GLIBC_TARBALL" ] || wget $GLIBC_WGET
    4.30 +	[ -f "$GCC_TARBALL" ] || wget $GCC_WGET
    4.31 +	[ -f "$BUSYBOX_TARBALL" ] || wget $BUSYBOX_WGET
    4.32 +	[ -f "$PKGCONFIG_TARBALL" ] || wget $PKGCONFIG_WGET
    4.33  }
    4.34  
    4.35  # Use sysroot or not ?
    4.36 @@ -91,9 +92,41 @@
    4.37  		PREFIX=/usr
    4.38  		HDR_PATH=$SYSROOT/usr
    4.39  		sysroot="--with-sysroot=$SYSROOT"
    4.40 -		echo "Configure : $sysroot"
    4.41 +		echo "Configure: $sysroot"
    4.42  	else
    4.43 -		HDR_PATH=$PREFIX
    4.44 +		HDR_PATH=$PREFIX/usr
    4.45 +	fi
    4.46 +}
    4.47 +
    4.48 +# Work around to fix GCC include search path
    4.49 +#
    4.50 +# GCC include search path is: $PREFIX/$TARGET/include, so make sure it
    4.51 +# is a symlink to default: $PREFIX/usr/include
    4.52 +#
    4.53 +# Glibc install headers in: $PREFIX/include, move them to usr/include
    4.54 +# if needed. After when we cross compile packages with cook we have
    4.55 +# to install build dependencies using --root=$CROSS_PREFIX and so
    4.56 +# default include dir is: $PREFIX/usr/include ($PREFIX is the root
    4.57 +# of our cross environment.
    4.58 +#
    4.59 +check_include() {
    4.60 +	cd $PREFIX
    4.61 +	echo "Checking: $PREFIX"
    4.62 +	if ! readlink include >/dev/null; then
    4.63 +		echo "Creating symlink: usr/include include"
    4.64 +		cp -a include usr && rm -rf include
    4.65 +		ln -s usr/include include
    4.66 +	fi
    4.67 +	cd $PREFIX/$TARGET
    4.68 +	echo "Checking: $PREFIX/$TARGET"
    4.69 +	if ! readlink include >/dev/null; then
    4.70 +		echo "Creating symlink: ../usr/include include"
    4.71 +		cp -a include ../usr && rm -rf include
    4.72 +		ln -s ../usr/include include
    4.73 +	fi
    4.74 +	if ! readlink lib >/dev/null; then
    4.75 +		echo "Creating symlink: ../lib lib"
    4.76 +		rm -rf lib && ln -s ../lib lib
    4.77  	fi
    4.78  }
    4.79  
    4.80 @@ -101,10 +134,10 @@
    4.81  binutils() {
    4.82  	init_compile
    4.83  	rm -rf binutils-$BINUTILS_VERSION
    4.84 -	echo "Extracting: binutils-$BINUTILS_VERSION.tar.bz2"
    4.85 -	tar xjf $SRC/binutils-$BINUTILS_VERSION.tar.bz2
    4.86 +	echo "Extracting: $BINUTILS_TARBALL"
    4.87 +	tar xjf $SRC/$BINUTILS_TARBALL
    4.88  	: ${BINUTILS_ARGS=--enable-shared}
    4.89 -	echo "Configure : $BINUTILS_ARGS"
    4.90 +	echo "Configure: $BINUTILS_ARGS"
    4.91  	check_sysroot
    4.92  	cd binutils-$BINUTILS_VERSION
    4.93  	./configure \
    4.94 @@ -114,15 +147,28 @@
    4.95  		$BINUTILS_ARGS $sysroot
    4.96  	make || exit 1
    4.97  	make install
    4.98 -	#echo "cross: binutils compiled on: $(date)"
    4.99 +	echo "cross: binutils compiled on: $(date)"
   4.100  }
   4.101  
   4.102 -# 2. GCC static (first pass)
   4.103 +# 2. Kernel headers could use CROSS_COMPILE but gcc is not yet build.
   4.104 +# NOTE: Compile GCC static first then linux-headers ?
   4.105 +linux_headers() {
   4.106 +	init_compile
   4.107 +	echo "Extracting: $LINUX_TARBALL"
   4.108 +	tar xjf $SRC/$LINUX_TARBALL
   4.109 +	check_sysroot
   4.110 +	cd linux-$LINUX_VERSION
   4.111 +	make mrproper
   4.112 +	make ARCH=$ARCH headers_check
   4.113 +	make ARCH=$ARCH headers_install INSTALL_HDR_PATH=$HDR_PATH
   4.114 +}
   4.115 +
   4.116 +# 3. GCC static (first pass)
   4.117  gcc_static() {
   4.118  	init_compile
   4.119 -	echo "Extracting: gcc-$GCC_VERSION.tar.bz2"
   4.120 -	tar xjf $SRC/gcc-$GCC_VERSION.tar.bz2
   4.121 -	echo "Configure : $GCC_STATIC_ARGS"
   4.122 +	echo "Extracting: $GCC_TARBALL"
   4.123 +	tar xjf $SRC/$GCC_TARBALL
   4.124 +	echo "Configure: $GCC_STATIC_ARGS"
   4.125  	check_sysroot
   4.126  	# Arch fixes and work around
   4.127  	case "$ARCH" in
   4.128 @@ -147,28 +193,17 @@
   4.129  	make install-gcc install-target-libgcc
   4.130  	cd $PREFIX/lib/gcc/$TARGET/$GCC_VERSION
   4.131  	echo "Creating symlink for static libgcc: libgcc_eh.a"
   4.132 -	rm -f libgcc_eh.a && ln -s libgcc.a libgcc_eh.a
   4.133 -}
   4.134 -
   4.135 -# 3. Kernel headers use static GCC
   4.136 -linux_headers() {
   4.137 -	init_compile
   4.138 -	echo "Extracting: linux-$LINUX_VERSION.tar.bz2"
   4.139 -	tar xjf $SRC/linux-$LINUX_VERSION.tar.bz2
   4.140 -	check_sysroot
   4.141 -	cd linux-$LINUX_VERSION
   4.142 -	make mrproper
   4.143 -	make ARCH=$ARCH headers_check
   4.144 -	make ARCH=$ARCH headers_install \
   4.145 -		INSTALL_HDR_PATH=$HDR_PATH
   4.146 +	rm -f libgcc_eh.a
   4.147 +	ln -s libgcc.a libgcc_eh.a
   4.148 +	echo "cross: gcc-static compiled on: $(date)"
   4.149  }
   4.150  
   4.151  # 4. GNU Glibc
   4.152  glibc() {
   4.153  	init_compile
   4.154 -	echo "Extracting: glibc-$GLIBC_VERSION.tar.bz2"
   4.155 -	tar xjf $SRC/glibc-$GLIBC_VERSION.tar.bz2
   4.156 -	echo "Configure : $GLIBC_ARGS"
   4.157 +	echo "Extracting: $GLIBC_TARBALL"
   4.158 +	tar xjf $SRC/$GLIBC_TARBALL
   4.159 +	echo "Configure: $GLIBC_ARGS"
   4.160  	[ "$continue" ] || rm -rf glibc-build
   4.161  	# Some arch may need glibc-ports and custom CFLAGS
   4.162  	case "$ARCH" in
   4.163 @@ -184,7 +219,7 @@
   4.164  		x86_64)
   4.165  			ccflags="-m64" ;;
   4.166  	esac
   4.167 -	#echo "CFLAGS: $CFLAGS"
   4.168 +	echo "CFLAGS: $CFLAGS"
   4.169  	mkdir -p glibc-build && cd glibc-build
   4.170  	BUILD_CC="gcc" \
   4.171  	CC="${TARGET}-gcc $ccflags" \
   4.172 @@ -194,7 +229,7 @@
   4.173  		--prefix=$PREFIX \
   4.174  		--libexec=$PREFIX/lib/glibc \
   4.175  		--host=$TARGET \
   4.176 -		--with-headers=$PREFIX/include \
   4.177 +		--with-headers=$PREFIX/usr/include \
   4.178  		--with-binutils=$PREFIX/bin \
   4.179  		$GLIBC_ARGS
   4.180  	make || exit 1
   4.181 @@ -204,25 +239,23 @@
   4.182  		cd $SYSROOT
   4.183  		ln -s usr/include sys-include
   4.184  	else
   4.185 -		cd $PREFIX/$TARGET
   4.186 -		rm -rf lib include
   4.187 -		ln -s ../lib lib
   4.188 -		ln -s ../include include
   4.189 +		check_include
   4.190  	fi
   4.191 -	#unset CFLAGS
   4.192 +	unset CFLAGS
   4.193 +	echo "cross: glibc compiled on: $(date)"
   4.194  }
   4.195  
   4.196  # 5. GCC final
   4.197  gcc_final() {
   4.198  	init_compile
   4.199  	if [ ! -d "gcc-$GCC_VERSION" ]; then
   4.200 -		echo "Extracting: gcc-$GCC_VERSION.tar.bz2"
   4.201 -		tar xjf $SRC/gcc-$GCC_VERSION.tar.bz2
   4.202 +		echo "Extracting: $GCC_TARBALL"
   4.203 +		tar xjf $SRC/$GCC_TARBALL
   4.204  	fi
   4.205 -	echo "Configure : $GCC_FINAL_ARGS"
   4.206 +	echo "Configure: $GCC_FINAL_ARGS"
   4.207  	check_sysroot
   4.208 -	rm -rf gcc-build
   4.209 -	mkdir gcc-build && cd gcc-build
   4.210 +	[ "$continue" ] || rm -rf gcc-build
   4.211 +	mkdir -p gcc-build && cd gcc-build
   4.212  	../gcc-$GCC_VERSION/configure \
   4.213  		--prefix=$PREFIX \
   4.214  		--libexec=$PREFIX/lib \
   4.215 @@ -234,15 +267,16 @@
   4.216  		--with-pkgversion="SliTaz" \
   4.217  		$GCC_FINAL_ARGS $sysroot
   4.218  	make || exit 1
   4.219 -	make install
   4.220 +	make install &&
   4.221 +	echo "cross: GCC final compiled on: $(date)"
   4.222  }
   4.223  
   4.224  # Build Busybox to we can create prebuilt tiny rootfs image and boot
   4.225  # from NFS ?
   4.226  cross_busybox() {
   4.227  	init_compile
   4.228 -	echo "Extracting: busybox-$BUSYBOX_VERSION.tar.bz2"
   4.229 -	tar xjf $SRC/busybox-$BUSYBOX_VERSION.tar.bz2
   4.230 +	echo "Extracting: $BUSYBOX_TARBALL"
   4.231 +	tar xjf $SRC/$BUSYBOX_TARBALL
   4.232  	cd busybox-$BUSYBOX_VERSION
   4.233  	# CROSS_COMPILE is exported via init_compile.
   4.234  	make defconfig
   4.235 @@ -250,7 +284,8 @@
   4.236  	make install
   4.237  	chmod 4755 _install/bin/busybox
   4.238  	readelf -h _install/bin/busybox
   4.239 -	echo "Busybox install path: $(pwd)/_install"
   4.240 +	echo "cross: busybox install path: $(pwd)/_install"
   4.241 +	echo "cross: busybox compiled on: $(date)"
   4.242  }
   4.243  
   4.244  #
   4.245 @@ -297,14 +332,26 @@
   4.246  		fi
   4.247  		echo -e "\n[CHECKING] readelf -h test.out" | tee -a $logdir/testsuite.log
   4.248  		readelf -h test.out | tee -a $logdir/testsuite.log ;;
   4.249 -	check-env)
   4.250 -		for pkg in mpfr mpfr-dev gmp gmp-dev mpc-library gawk autoconf
   4.251 -		do
   4.252 +	check)
   4.253 +		echo "Checking: build system packages"
   4.254 +		for pkg in slitaz-toolchain mpfr mpfr-dev gmp gmp-dev mpc-library \
   4.255 +			gawk autoconf; do
   4.256  			if [ ! -d "/var/lib/tazpkg/installed/$pkg" ]; then
   4.257  				echo "Missing packages: $pkg"
   4.258 -				[ "$install" ] && tazpkg -gi $pkg
   4.259 +				if [ -x /usr/sbin/spk-add ]; then
   4.260 +					spk-add $pkg
   4.261 +				else
   4.262 +					tazpkg -gi $pkg
   4.263 +				fi
   4.264  			fi
   4.265 -		done ;;
   4.266 +		done
   4.267 +		# See: check_include()
   4.268 +		if [ "$SYSROOT" ]; then
   4.269 +			echo "Using: --with-sysroot=$SYSROOT"
   4.270 +			echo "WARNING: not well tested and buggy"
   4.271 +			exit 0
   4.272 +		fi
   4.273 +		check_include ;;
   4.274  	download)
   4.275  		download_src ;;
   4.276  	show-log)
     5.1 --- a/cross.conf	Wed May 16 11:55:25 2012 +0200
     5.2 +++ b/cross.conf	Sat May 19 04:47:53 2012 +0200
     5.3 @@ -16,17 +16,24 @@
     5.4  
     5.5  # Cross-tools versions
     5.6  BINUTILS_VERSION="2.22"
     5.7 -LINUX_VERSION="2.6.35.13"
     5.8 +LINUX_VERSION="3.2.14"
     5.9  GLIBC_VERSION="2.13"
    5.10  GCC_VERSION="4.6.3"
    5.11  BUSYBOX_VERSION="1.20.0"
    5.12  
    5.13 +# Cross-tools tarballs
    5.14 +BINUTILS_TARBALL="binutils-$BINUTILS_VERSION.tar.bz2"
    5.15 +LINUX_TARBALL="linux-$LINUX_VERSION.tar.bz2"
    5.16 +GLIBC_TARBALL="glibc-$GLIBC_VERSION.tar.bz2"
    5.17 +GCC_TARBALL="gcc-$GCC_VERSION.tar.bz2"
    5.18 +BUSYBOX_TARBALL="busybox-$BUSYBOX_VERSION.tar.bz2"
    5.19 +
    5.20  # Cross tools urls
    5.21 -BINUTILS_WGET="http://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VERSION.tar.bz2"
    5.22 -LINUX_WGET="http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-$LINUX_VERSION.tar.bz2"
    5.23 -GLIBC_WGET="http://ftp.gnu.org/gnu/libc/glibc-$GLIBC_VERSION.tar.bz2"
    5.24 -GCC_WGET="http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2"
    5.25 -BUSYBOX_WGET="http://busybox.net/downloads/busybox-$BUSYBOX_VERSION.tar.bz2"
    5.26 +BINUTILS_WGET="http://ftp.gnu.org/gnu/binutils/$BINUTILS_TARBALL"
    5.27 +LINUX_WGET="http://www.kernel.org/pub/linux/kernel/v3.x/$LINUX_TARBALL"
    5.28 +GLIBC_WGET="http://ftp.gnu.org/gnu/libc/$GLIBC_TARBALL"
    5.29 +GCC_WGET="http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/$GCC_TARBALL"
    5.30 +BUSYBOX_WGET="http://busybox.net/downloads/$BUSYBOX_TARBALL"
    5.31  
    5.32  # Peer package configure arguments
    5.33  # x86_64: BINUTILS_ARGS="--disable-multilib --enable-64-bit-bfd"
     6.1 --- a/doc/cross.txt	Wed May 16 11:55:25 2012 +0200
     6.2 +++ b/doc/cross.txt	Sat May 19 04:47:53 2012 +0200
     6.3 @@ -12,7 +12,6 @@
     6.4  
     6.5  OPTIONS
     6.6  	--log      clean: Will also clean log files
     6.7 -	--install  check-env: Install needed packages
     6.8  	--config=  Use specified configuration file
     6.9  
    6.10  HOWTO:
    6.11 @@ -37,12 +36,13 @@
    6.12  	# cd cookutils
    6.13  	# make install-cross
    6.14  
    6.15 -	Setup the build environment and compile a cross toolchain
    6.16 -	-------------------------------------------------------------
    6.17 +	Setup the build environment, get source and compile a cross toolchain
    6.18 +	---------------------------------------------------------------------
    6.19  	# cook arm-setup
    6.20  	# cook setup
    6.21  	(vi/nano /etc/slitaz/cross.conf)
    6.22 -	# cross check-env --install
    6.23 +	# cross check
    6.24 +	# cross download
    6.25  	# cross compile
    6.26  
    6.27  	Test the cross toolchain