Add option to disable glibc and kernel headers installation
authorHugo Villeneuve <hugo@hugovil.com>
Wed, 24 Sep 2014 01:21:41 +0000 (21:21 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Fri, 5 Dec 2014 04:44:19 +0000 (23:44 -0500)
functions/main
stage0/hv-install-2
stage0/packages-update
targets/default

index 9e4fc4d..7c167e5 100644 (file)
@@ -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/")"
index 8e3bf20..ef76fbd 100755 (executable)
@@ -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 $?
index edef445..f3d668d 100755 (executable)
@@ -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 $?
index a2be344..e1f52f1 100644 (file)
@@ -1,5 +1,6 @@
 #!/bin/bash
 
+INSTALL_GLIBC=1
 CLFS_BUILDFLAGS=""
 CLFS_ARCH=${HVL_TARGET}
 CLFS_OS="linux"