From: Hugo Villeneuve Date: Wed, 24 Sep 2014 01:21:41 +0000 (-0400) Subject: Add option to disable glibc and kernel headers installation X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=b86e920731c7960bdae1088efcab2577a00b6548;p=hvlinux.git Add option to disable glibc and kernel headers installation --- diff --git a/functions/main b/functions/main index 9e4fc4d..7c167e5 100644 --- a/functions/main +++ b/functions/main @@ -102,7 +102,11 @@ if [ -f ../targets/${HVL_TARGET} ]; then source ../targets/${HVL_TARGET} fi -CLFS_TARGET="${CLFS_ARCH}-${CLFS_OS}-${CLFS_ABI}" +# When CLFS_OS is defined, define target as the standard triplet: +CLFS_TARGET="${CLFS_ARCH}" +if [ x"${CLFS_OS}" != x ]; then + CLFS_TARGET+="-${CLFS_OS}-${CLFS_ABI}" +fi CLFS_HOST="$(echo $MACHTYPE | \ sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")" diff --git a/stage0/hv-install-2 b/stage0/hv-install-2 index 8e3bf20..ef76fbd 100755 --- a/stage0/hv-install-2 +++ b/stage0/hv-install-2 @@ -1,12 +1,13 @@ #!/bin/bash source ~/.bashrc - source ../functions/main init_log_file -ipkg -m noac ${KERNEL} +if [ x"${INSTALL_GLIBC}" == x"1" ]; then + ipkg -m noac ${KERNEL} +fi case "${HVL_TARGET}" in x86*) @@ -42,7 +43,10 @@ LDFLAGS="" ipkg ${BINUTILS} ipkg -l "${GCC}-pass1" ${GCC} -ipkg ${GLIBC} -ipkg -l "${GCC}-pass2" ${GCC} + +if [ x"${INSTALL_GLIBC}" == x"1" ]; then + ipkg ${GLIBC} + ipkg -l "${GCC}-pass2" ${GCC} +fi exit $? diff --git a/stage0/packages-update b/stage0/packages-update index edef445..f3d668d 100755 --- a/stage0/packages-update +++ b/stage0/packages-update @@ -8,11 +8,14 @@ source ../functions/main update_packages_init ${*} -if [ "x${KERNEL}" = "x${NOUVEAU_NVIDIA_KERNEL}" ]; then +if [ x"${INSTALL_GLIBC}" == x"1" ]; then + if [ "x${KERNEL}" = "x${NOUVEAU_NVIDIA_KERNEL}" ]; then # Special case - fpkg -m hv ${KERNEL} -else - fpkg -s "linux/kernel/v$(get_pkg_ver1 ${KERNEL}).0" ${KERNEL} ${KERNEL_URL} + fpkg -m hv ${KERNEL} + else + fpkg -s "linux/kernel/v$(get_pkg_ver1 ${KERNEL}).0" ${KERNEL} \ + ${KERNEL_URL} + fi fi fpkg -e "tar.gz" ${FILE_PKG} "ftp://ftp.astron.com/pub/file" @@ -23,6 +26,9 @@ fpkg -e "tar.gz" ${MPC} "http://www.multiprecision.org/mpc/download" fpkg -e "tar.gz" ${CLOOG} "http://www.bastoul.net/cloog/pages/download" fpkg -e "tar.bz2" -m gnu ${BINUTILS} fpkg -m gnu -s "gcc/${GCC}" ${GCC} -fpkg -m gnu ${GLIBC} + +if [ x"${INSTALL_GLIBC}" == x1 ]; then + fpkg -m gnu ${GLIBC} +fi exit $? diff --git a/targets/default b/targets/default index a2be344..e1f52f1 100644 --- a/targets/default +++ b/targets/default @@ -1,5 +1,6 @@ #!/bin/bash +INSTALL_GLIBC=1 CLFS_BUILDFLAGS="" CLFS_ARCH=${HVL_TARGET} CLFS_OS="linux"