From 1786cd5454ea76e7f894efa81a7cef80a057b634 Mon Sep 17 00:00:00 2001 From: hugo Date: Thu, 4 Mar 2010 17:37:14 +0000 Subject: [PATCH] CLFS pour ARM fonctionnel --- functions | 20 ++++++++++++++- functions-update | 37 +++++++++++++++++++--------- packages-list | 7 +++--- stage0/cis-ac | 2 +- stage0/cis-binutils | 3 ++- stage0/cis-cloog-ppl | 2 +- stage0/cis-eglibc | 19 +++++++++------ stage0/cis-gcc-pass1 | 34 ++++++++++++++++++-------- stage0/cis-gcc-pass2 | 28 +++++++++++++++------ stage0/cis-linux-api-headers | 6 ++--- stage0/cis-ncurses | 2 +- stage0/cis-pre-install | 34 +++++++++++--------------- stage0/cis-uclibc | 31 ++++++++++++++++++++++++ stage0/install-1 | 47 ++++++++++++++++++++++++++---------- stage0/packages-update | 21 +++++++++++----- stage0/stage0-install | 2 +- stage1/install-linux-minimal | 6 ++--- sysinfos | 11 +++++---- 18 files changed, 216 insertions(+), 96 deletions(-) create mode 100755 stage0/cis-uclibc diff --git a/functions b/functions index 8ee7dd0..d3a4c2d 100644 --- a/functions +++ b/functions @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This file is 'sourced' by other scripts, therefore the above line is of no # use, except when modifying the file in emacs to have syntax highlighting. @@ -33,14 +33,27 @@ else fi case "${HVL_TARGET}" in + arm*) + CLFS_BUILDFLAGS="-mabi=apcs-gnu" + CLFS_TARGET="${HVL_TARGET}-unknown-linux-gnueabi" + CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/arm.*/arm/g') + CLFS_ENDIAN=$(echo ${CLFS_ARCH} | sed -e 's/armeb/BIG/' -e 's/arm/LITTLE/') + if [ "${CLFS_ENDIAN}" = "LITTLE" ]; then + CLFS_NOT_ENDIAN="BIG" + else + CLFS_NOT_ENDIAN="LITTLE" + fi + ;; "x86_64") CLFS_BUILDFLAGS="-m64" CLFS_TARGET="${HVL_TARGET}-unknown-linux-gnu" + CLFS_ARCH=${HVL_TARGET} ;; "x86") # No special flags CLFS_BUILDFLAGS="" CLFS_TARGET="i686-unknown-linux-gnu" + CLFS_ARCH=${HVL_TARGET} ;; *) echo "Unsupported target architecture: ${HVL_TARGET}" @@ -48,6 +61,11 @@ case "${HVL_TARGET}" in ;; esac +CLFS_HOST="$(echo $MACHTYPE | \ + sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")" + +export CLFS_BUILDFLAGS CLFS_TARGET CLFS_ARCH CLFS_HOST CLFS_ENDIAN CLFS_NOT_ENDIAN + CLFS=${LFS} # Extracting the version number from a complete package name. diff --git a/functions-update b/functions-update index d886f24..33d9cf4 100644 --- a/functions-update +++ b/functions-update @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash LFS_PKG_BASE="$(dirname $(pwd))/packages" LFS_PKG_DIR="${LFS_PKG_BASE}/${LFS_STAGE}" @@ -25,7 +25,7 @@ TETEX_URL="http://www.tug.org/ftp/tex-archive/systems/unix/teTeX" BLFS_XORG_URL="http://anduin.linuxfromscratch.org/files/BLFS/svn/xorg" XORG_URL="http://xorg.freedesktop.org/releases/individual" -WGETCMD="wget --directory-prefix=${LFS_PKG_DIR} --timeout=15 --tries=3 -nc --continue --no-check-certificate -o ${WGET_LOG_FILE}" +WGETCMD="wget --directory-prefix=${LFS_PKG_DIR} --timeout=15 --tries=3 -nc --continue --no-check-certificate --no-verbose --output-file=${WGET_LOG_FILE}" LFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-lfs.html BLFS_PATCHES_LIST=${LFS_PKG_DIR}/patches-list-blfs.html @@ -40,6 +40,10 @@ static_fetch_patches_list() PATCHES_LIST_FILENAME=${2} ${WGETCMD} "${PATCHES_URL}/" && + + # Append log to global log file + cat ${WGET_LOG_FILE} >> ${LFS_LOG_FILE} && + mv ${LFS_PKG_DIR}/index.html ${PATCHES_LIST_FILENAME} } @@ -191,6 +195,7 @@ detect_file_not_found() echo "404 NOTFOUND" return 0 elif grep "No such file" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then + echo "No such file" return 0 else return 1 @@ -218,25 +223,30 @@ static_getpkg() MY_ARCH_EXT="tar.bz2 tar.gz tgz tar.Z" fi - echo " MY_ARCH_EXT=${MY_ARCH_EXT}" - for arch_ext in ${MY_ARCH_EXT}; do # Don't take any chance: remove any partially downloaded file. # If we arrive here, it means the final destination file was not found # so we can safely remove any file prior to trying to download it. rm -f ${LFS_PKG_DIR}/${PACK}.${arch_ext} + echo "Tryng to fetch ${PACK}.${arch_ext}" + ${WGETCMD} ${URL}/${PACK}.${arch_ext} wget_status=$? - # Failure: if it was a connection timeout, don't try for other file extensions. + # Append log to global log file + cat ${WGET_LOG_FILE} >> ${LFS_LOG_FILE} + + # Failure: if it was a connection timeout, don't try for other file + # extensions. if grep "failed: Connection timed out" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then echo "Error, wget reported: Connection timed out" return 1 fi if detect_file_not_found; then - # Try next archive extension if web server reported that file is not found. + # Try next archive extension if web server reported that file is not + # found. continue; fi @@ -367,13 +377,16 @@ fpkg() # Check for available patches with PACKAGE (TARGET) name. static_getpatch ${PACK} - # Check for available patches with SRC_FILENAME name. - static_getpatch ${SRC_FILENAME} + if [ ${SRC_FILENAME} != ${PACK} ]; then + # Check for available patches with SRC_FILENAME name. + static_getpatch ${SRC_FILENAME} - # Rename any patch fetched (in fpkg call) and replace SOURCE by TARGET in - # patch name. - if ls ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch 1> /dev/null 2>&1; then - rename ${SRC_FILENAME} ${PACK} ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch + # Rename any patch fetched (in fpkg call) and replace SOURCE by TARGET + # in patch name. + if ls ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch 1> /dev/null 2>&1; then + echo "CMD=${SRC_FILENAME} ${PACK} ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch" + rename ${SRC_FILENAME} ${PACK} ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch + fi fi } diff --git a/packages-list b/packages-list index 0f76ace..dec6cd8 100644 --- a/packages-list +++ b/packages-list @@ -68,7 +68,8 @@ E2FSPROGS="e2fsprogs-1.41.9" EASYTAG="easytag-2.1" ED="ed-1.4" EGGDBUS="eggdbus-0.6" -EGLIBC="eglibc-2.10.1" +EGLIBC="eglibc-2.10.1-20090825-r8873" +UCLIBC="uClibc-0.9.30.1" EMACS="emacs-23.1" ESOUND="esound-0.2.37" EXPAT="expat-2.0.1" @@ -231,7 +232,7 @@ JAVA="jre-1.6.0_05" KBD="kbd-1.15" KERBEROS5="krb5-1.4.1" -KERNEL="linux-2.6.32.3" +KERNEL="linux-2.6.32.9" KVM="kvm-84" LAME="lame-3.97" @@ -295,7 +296,7 @@ MFOUR="m4-1.4.13" MILTER_GREYLIST="milter-greylist-4.0" MILTER_SPF="smf-spf-2.0.1" MODULE_INIT_TOOLS="module-init-tools-3.11.1" -MPFR="mpfr-2.4.1" +MPFR="mpfr-2.4.2" MUTT="mutt-1.5.20" MYSQL="mysql-5.1.42" diff --git a/stage0/cis-ac b/stage0/cis-ac index e7fa2bd..4f32036 100755 --- a/stage0/cis-ac +++ b/stage0/cis-ac @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # First argument of this script is the package name. diff --git a/stage0/cis-binutils b/stage0/cis-binutils index b3d1b7c..b86de64 100755 --- a/stage0/cis-binutils +++ b/stage0/cis-binutils @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # Reading system configuration informations, functions and package versions. @@ -13,6 +13,7 @@ case "${HVL_TARGET}" in "x86_64") # This adds 64 bit support to Binutils. TARGET_CONFIGURE_OPTS="--enable-64-bit-bfd" + ########## --with-lib-path=/tools/lib ;; esac diff --git a/stage0/cis-cloog-ppl b/stage0/cis-cloog-ppl index ee71baa..66d2946 100755 --- a/stage0/cis-cloog-ppl +++ b/stage0/cis-cloog-ppl @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # First argument of this script is the package name. diff --git a/stage0/cis-eglibc b/stage0/cis-eglibc index 50f469f..5c7f872 100755 --- a/stage0/cis-eglibc +++ b/stage0/cis-eglibc @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # Reading system configuration informations, functions and package versions. @@ -32,16 +32,20 @@ EOF # Configure options: # BUILD_CC="gcc" -# This sets Glibc to use the current compiler on our system. This is used to create the tools Glibc uses during its build. +# This sets Glibc to use the current compiler on our system. This is used to +# create the tools Glibc uses during its build. # CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}" -# Forces Glibc to build using our target architecture GCC utilizing any special CLFS build flags. +# Forces Glibc to build using our target architecture GCC utilizing any +# special CLFS build flags. # AR="${CLFS_TARGET}-ar" -# This forces Glibc to use the ar utility we made for our target architecture. +# This forces Glibc to use the ar utility we made for our target +# architecture. # RANLIB="${CLFS_TARGET}-ranlib" -# This forces Glibc to use the ranlib utility we made for our target architecture. +# This forces Glibc to use the ranlib utility we made for our target +# architecture. # # --disable-profile -# This builds the libraries without profiling information. Omit this option if profiling on the temporary tools is necessary. +# This builds the libraries without profiling information. # --enable-add-ons # This tells Glibc to utilize all add-ons that are available. # --with-tls @@ -57,7 +61,8 @@ EOF # --with-__thread # This tells Glibc to use use the __thread for libc and libpthread builds. # --with-binutils=/cross-tools/bin -# This tells Glibc to use the Binutils that are specific to our target architecture. +# This tells Glibc to use the Binutils that are specific to our target +# architecture. # --disable-profile # Builds the libraries without profiling information. BUILD_CC="gcc" \ diff --git a/stage0/cis-gcc-pass1 b/stage0/cis-gcc-pass1 index f849774..da0102e 100755 --- a/stage0/cis-gcc-pass1 +++ b/stage0/cis-gcc-pass1 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # Reading system configuration informations, functions and package versions. @@ -9,6 +9,15 @@ source ../packages-list # Manually applying patches apply_patch ${1}-branch_update-1.patch ${1} +case "${HVL_TARGET}" in + "x86*") + TARGET_CONFIGURE_OPTS="--with-ppl=/cross-tools \ + --with-cloog=/cross-tools \ + --with-local-prefix=/tools \ + --disable-multilib" + ;; +esac + case "${HVL_TARGET}" in "x86") apply_patch ${1}-specs-1.patch ${1} @@ -34,14 +43,15 @@ sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g" \ touch /tools/include/limits.h # --with-local-prefix=/tools -# The purpose of this switch is to remove /usr/local/include from gcc's include search path. -# This is not absolutely essential, however, it helps to minimize the influence of the host system. +# Remove /usr/local/include from gcc's include search path. This is not +# absolutely essential, however, it helps to minimize the influence of the +# host system. # --disable-shared # Disables the creation of the shared libraries. # --disable-threads -# This will prevent GCC from looking for the multi-thread include files, since they haven't been -# created for this architecture yet. GCC will be able to find the multi-thread information after -# the Glibc headers are created. +# Prevents GCC from looking for the multi-thread include files, since they +# haven't been created for this architecture yet. GCC will be able to find +# the multi-thread information after the libc headers are created. # --enable-languages=c # This option ensures that only the C compiler is built. cd ${LFS_TMP}/${1}-build @@ -52,13 +62,10 @@ AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ --host=${CLFS_HOST} \ --target=${CLFS_TARGET} \ --with-sysroot=${CLFS} \ - --with-local-prefix=/tools \ --disable-nls \ --disable-shared \ --with-mpfr=/cross-tools \ --with-gmp=/cross-tools \ - --with-ppl=/cross-tools \ - --with-cloog=/cross-tools \ --without-headers \ --with-newlib \ --disable-decimal-float \ @@ -67,8 +74,15 @@ AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ --disable-libssp \ --disable-threads \ --enable-languages=c \ - --disable-multilib + ${TARGET_CONFIGURE_OPTS} ${HVMAKE} all-gcc all-target-libgcc ${HVMAKE} install-gcc install-target-libgcc +case "${HVL_TARGET}" in + arm*) + # Workaround for uClibc + echo "#include \"/cross-tools/lib/gcc/arm926t-unknown-linux-gnueabi/4.4.2/include-fixed/limits.h\"" > /tools/include/limits.h + ;; +esac + exit $? diff --git a/stage0/cis-gcc-pass2 b/stage0/cis-gcc-pass2 index 0df47dd..22923c3 100755 --- a/stage0/cis-gcc-pass2 +++ b/stage0/cis-gcc-pass2 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # Reading system configuration informations, functions and package versions. @@ -9,6 +9,18 @@ source ../packages-list # Manually applying patches apply_patch ${1}-branch_update-1.patch ${1} +case "${HVL_TARGET}" in + "x86*") + TARGET_CONFIGURE_OPTS="--with-ppl=/cross-tools \ + --with-cloog=/cross-tools \ + --disable-multilib" + ;; + arm*) + # Removing workaround for uClibc + echo "" > /tools/include/limits.h + ;; +esac + case "${HVL_TARGET}" in "x86") apply_patch ${1}-specs-1.patch ${1} @@ -34,10 +46,12 @@ sed -e "s@\(^CROSS_SYSTEM_HEADER_DIR =\).*@\1 /tools/include@g" \ # --enable-languages=c,c++ # This option ensures that only the C and C++ compilers are built. # --enable-__cxa_atexit -# This option allows use of __cxa_atexit, rather than atexit, to register C++ destructors for local -# statics and global objects and is essential for fully standards-compliant handling of -# destructors. It also affects the C++ ABI and therefore results in C++ shared libraries and C++ -# programs that are interoperable with other Linux distributions. +# This option allows use of __cxa_atexit, rather than atexit, to register +# C++ destructors for local +# statics and global objects and is essential for fully standards-compliant +# handling of destructors. It also affects the C++ ABI and therefore results +# in C++ shared libraries and C++ programs that are interoperable with other +# Linux distributions. # --enable-c99 # Enable C99 support for C programs. # --enable-long-long @@ -59,12 +73,10 @@ AR=ar LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ --enable-__cxa_atexit \ --with-mpfr=/cross-tools \ --with-gmp=/cross-tools \ - --with-ppl=/cross-tools \ - --with-cloog=/cross-tools \ --enable-c99 \ --enable-long-long \ --enable-threads=posix \ - --disable-multilib + ${TARGET_CONFIGURE_OPTS} ${HVMAKE} \ AS_FOR_TARGET="${CLFS_TARGET}-as" \ LD_FOR_TARGET="${CLFS_TARGET}-ld" diff --git a/stage0/cis-linux-api-headers b/stage0/cis-linux-api-headers index e5ae471..e51344a 100755 --- a/stage0/cis-linux-api-headers +++ b/stage0/cis-linux-api-headers @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # Reading system configuration informations, functions and package versions. @@ -12,8 +12,8 @@ apply_patches ${1} cd ${LFS_TMP}/${1} ${HVMAKE} mrproper -${HVMAKE} ARCH=${HVL_TARGET} headers_check -${HVMAKE} ARCH=${HVL_TARGET} INSTALL_HDR_PATH=dest headers_install +${HVMAKE} ARCH=${CLFS_ARCH} headers_check +${HVMAKE} ARCH=${CLFS_ARCH} INSTALL_HDR_PATH=dest headers_install install -dv /tools/include cp -rv dest/include/* /tools/include diff --git a/stage0/cis-ncurses b/stage0/cis-ncurses index f9fec65..1e100f7 100755 --- a/stage0/cis-ncurses +++ b/stage0/cis-ncurses @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # First argument of this script is the package name. diff --git a/stage0/cis-pre-install b/stage0/cis-pre-install index f52fc9b..1fa9261 100755 --- a/stage0/cis-pre-install +++ b/stage0/cis-pre-install @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit # Reading system configuration informations, functions and package versions. @@ -18,6 +18,18 @@ if [ ! -d ${LFS} ]; then exit 1 fi +# Testing for the presence of the lfs user +# We cannot always automatically create the user 'lfs' because the installation media +# can be a CD-ROM (read-only) +# If installing from some kind of live-CD, simply install as root without the LFS +# user :) +if ! grep "lfs" /etc/passwd 1> /dev/null 2>&1; then + # The option '-k /dev/null' prevents possible copying of files from a + # skeleton directory (default is /etc/skel). + groupadd lfs + useradd -s /bin/bash -g lfs -m -k /dev/null lfs +fi + # Creating basic directories for subdir in tmp var boot tools cross-tools; do dir=${LFS}/${subdir} @@ -33,38 +45,20 @@ for subdir in tools cross-tools; do ln -sfvT ${LFS}/${subdir} /${subdir} done -# Testing for the presence of the lfs user -# We cannot automatically create the user 'lfs' because the installation media -# can be a CD-ROM (read-only) -# If installing from some kind of live-CD, simply install as root without the LFS user :) -if ! grep "lfs" /etc/passwd 1> /dev/null 2>&1; then - # The option '-k /dev/null' prevents possible copying of files from a - # skeleton directory (default is /etc/skel). - groupadd lfs - useradd -s /bin/bash -g lfs -m -k /dev/null lfs -fi - cat > /home/lfs/.bashrc << "EOF" # Setting up the environment set +h umask 022 LC_ALL=POSIX PATH=/cross-tools/bin:/bin:/usr/bin -CLFS_BUILDFLAGS=_CLFS_BUILDFLAGS_ -CLFS_HOST="$(echo $MACHTYPE | \ - sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")" -CLFS_TARGET=_CLFS_TARGET_ HVMAKE="make -j ${MAKEJOBS}" unset CFLAGS unset CXXFLAGS -export LC_ALL PATH CLFS_BUILDFLAGS CLFS_HOST CLFS_TARGET HVMAKE +export LC_ALL PATH HVMAKE EOF -sed -i -e "s!_CLFS_BUILDFLAGS_!${CLFS_BUILDFLAGS}!g" /home/lfs/.bashrc -sed -i -e "s!_CLFS_TARGET_!${CLFS_TARGET}!g" /home/lfs/.bashrc - chown lfs:lfs /home/lfs/.bashrc exit $? diff --git a/stage0/cis-uclibc b/stage0/cis-uclibc new file mode 100755 index 0000000..e1b6d73 --- /dev/null +++ b/stage0/cis-uclibc @@ -0,0 +1,31 @@ +#!/bin/bash +set -o errexit + +# Reading system configuration informations, functions and package versions. +source ../sysinfos +source ../functions +source ../packages-list + +# Manually apply patch +apply_patch ${1}-branch_update-1.patch ${1} + +case "${HVL_TARGET}" in + arm926t) + apply_patch ${1}-config-arm926t.patch ${1} + ;; +esac + +cd ${LFS_TMP}/${1} + +sed -e "s@\(^CROSS_COMPILER_PREFIX=\).*@\1\"${CLFS_TARGET}-\"@" \ + -e "s@\(^KERNEL_HEADERS=\).*@\1\"/tools/include\"@" \ + -e "s@.*\(DEVEL_PREFIX=\).*@\1\"/tools/\"@" \ + -e "s@.*\(^ARCH_${CLFS_NOT_ENDIAN}_ENDIAN\).*@# \1 is not set@g" \ + -e "s@.*\(ARCH_${CLFS_ENDIAN}_ENDIAN\).*@\1=y@g" \ + -e "s@.*\(ARCH_WANTS_${CLFS_ENDIAN}_ENDIAN\).*@\1=y@g" \ + -i .config + +${HVMAKE} CROSS=${CLFS_TARGET}- CC="${CLFS_TARGET}-gcc ${BUILD}" +${HVMAKE} PREFIX=${CLFS} install + +exit $? diff --git a/stage0/install-1 b/stage0/install-1 index 6f07a43..b9bf735 100755 --- a/stage0/install-1 +++ b/stage0/install-1 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash source ~/.bashrc @@ -17,24 +17,45 @@ export LFS_TMP="${LFS}/tmp" init_log_file ipkg_cust ${KERNEL} cis-linux-api-headers -ipkg_ac ${FILE_PKG} -ipkg_cust ${NCURSES} cis-ncurses "--without-debug --without-shared" + +case "${HVL_TARGET}" in + x86*) + ipkg_ac ${FILE_PKG} + ipkg_cust ${NCURSES} cis-ncurses "--without-debug --without-shared" + ;; +esac + CPPFLAGS=-fexceptions \ ipkg_ac ${GMP} "--enable-cxx" LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ ipkg_ac ${MPFR} "--enable-shared --with-gmp=/cross-tools" -LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ - ipkg_ac ${PPL} "--enable-shared \ - --enable-interfaces=c,cxx \ - --disable-optimization \ - --with-libgmp-prefix=/cross-tools \ - --with-libgmpxx-prefix=/cross-tools" -LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ - ipkg_cust ${CLOOG_PPL} cis-cloog-ppl "--enable-shared --with-bits=gmp \ - --with-gmp=/cross-tools --with-ppl=/cross-tools" + +case "${HVL_TARGET}" in + x86*) + LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ + ipkg_ac ${PPL} "--enable-shared \ + --enable-interfaces=c,cxx \ + --disable-optimization \ + --with-libgmp-prefix=/cross-tools \ + --with-libgmpxx-prefix=/cross-tools" + LDFLAGS="-Wl,-rpath,/cross-tools/lib" \ + ipkg_cust ${CLOOG_PPL} cis-cloog-ppl "--enable-shared --with-bits=gmp \ + --with-gmp=/cross-tools --with-ppl=/cross-tools" + ;; +esac + ipkg_cust ${BINUTILS} cis-binutils ipkg ${GCC_CORE} cis-gcc-pass1 "${GCC_CORE}-pass1" -ipkg_cust ${EGLIBC} cis-eglibc + +case "${HVL_TARGET}" in + x86*) + ipkg_cust ${EGLIBC} cis-eglibc + ;; + arm*) + ipkg_cust ${UCLIBC} cis-uclibc + ;; +esac + ipkg ${GCC_CORE} cis-gcc-pass2 "${GCC_CORE}-pass2" exit $? diff --git a/stage0/packages-update b/stage0/packages-update index af1dc07..9e73a49 100755 --- a/stage0/packages-update +++ b/stage0/packages-update @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash LFS_STAGE="stage0" # We don't use LFS or BLFS patches because we want to carefully @@ -19,14 +19,23 @@ if [ ${#} -eq 1 -a "x${1}" = "xtest" ]; then fi fpkg ${KERNEL} "http://www.kernel.org/pub/linux/kernel/v2.6" -fpkg ${FILE_PKG} "http://cross-lfs.org/files/packages/svn" +fpkg ${FILE_PKG} "ftp://ftp.astron.com/pub/file" fpkg_gnu ${NCURSES} fpkg_gnu ${GMP} -fpkg ${MPFR} "http://www.mpfr.org/mpfr-current" -fpkg ${PPL} "http://www.cs.unipr.it/ppl/Download/ftp/releases/$(get_pkg_ver ${PPL})" +fpkg_gnu ${MPFR} +fpkg -s "$(get_pkg_ver ${PPL})" ${PPL} \ + "http://www.cs.unipr.it/ppl/Download/ftp/releases" fpkg ${CLOOG_PPL} "ftp://gcc.gnu.org/pub/gcc/infrastructure" fpkg_gnu ${BINUTILS} -fpkg ${GCC_CORE} ${GNU_URL}/gcc/${GCC_CORE} -fpkg ${EGLIBC} "http://cross-lfs.org/files/packages/svn" +fpkg_gnu ${GCC_CORE} "gcc/${GCC_CORE}" + +case "${HVL_TARGET}" in + x86*) + fpkg ${EGLIBC} "http://cross-lfs.org/files/packages/svn" + ;; + arm*) + fpkg ${UCLIBC} "http://www.uclibc.org/downloads" + ;; +esac exit $? diff --git a/stage0/stage0-install b/stage0/stage0-install index 20d1f7b..c358247 100755 --- a/stage0/stage0-install +++ b/stage0/stage0-install @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -o errexit LFS_STAGE=stage0 diff --git a/stage1/install-linux-minimal b/stage1/install-linux-minimal index f79d126..9aa5f82 100755 --- a/stage1/install-linux-minimal +++ b/stage1/install-linux-minimal @@ -26,13 +26,13 @@ echo "DEST=${LFS}/boot" >> ${SCRIPT} echo "PATH=\${PATH}:${LFS}/cross-tools/bin" >> ${SCRIPT} echo "" >> ${SCRIPT} -echo "make ARCH=${HVL_TARGET} CROSS_COMPILE=${CLFS_TARGET}- menuconfig &&" >> ${SCRIPT} +echo "make ARCH=${CLFS_ARCH} CROSS_COMPILE=${CLFS_TARGET}- menuconfig &&" >> ${SCRIPT} # Compile the kernel image: -echo "make ARCH=${HVL_TARGET} CROSS_COMPILE=${CLFS_TARGET}- &&" >> ${SCRIPT} +echo "make ARCH=${CLFS_ARCH} CROSS_COMPILE=${CLFS_TARGET}- &&" >> ${SCRIPT} # Install the kernel: -echo "cp -v arch/${HVL_TARGET}/boot/bzImage \${DEST}/vmlinuz-\${KERNEL_NAME} &&" >> ${SCRIPT} +echo "cp -v arch/${CLFS_ARCH}/boot/bzImage \${DEST}/vmlinuz-\${KERNEL_NAME} &&" >> ${SCRIPT} # Install map file: echo "cp -v System.map \${DEST}/System.map-\${KERNEL_NAME} &&" >> ${SCRIPT} diff --git a/sysinfos b/sysinfos index 3a93cc4..f422789 100644 --- a/sysinfos +++ b/sysinfos @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This file contains the informations specific to the target system # onto which Linux-HV will be installed @@ -9,13 +9,13 @@ MAKEJOBS=1 # Installation type: server, ltsp-server or workstation. -INST_TYPE="ltsp-server" +INST_TYPE="server" # New user to create REGUSER="hugo" # Destination path where to install new Linux-HV system -LFS="" +LFS="/mnt/hvlinux-arm" # Destination partition where to install new Linux-HV system LFS_PARTITION="/dev/sda8" @@ -28,12 +28,13 @@ SWAP_PARTITION="/dev/sda2" # Define this when cross-compiling to the desired target # architecture. Default is x86 32-bits architecture (i686). +# arm926t - ARM 926T little endian # x86 (i686) # x86_64 (AMD Athlon 64) -HVL_TARGET="x86" +HVL_TARGET="arm926t" # Used for setting '-march=xxx' option in CFLAGS and CPPFLAGS -MACHINE_ARCHITECTURE="athlon-xp" +MACHINE_ARCHITECTURE="" DEFAULT_EDITOR="emacs" -- 2.20.1