Bump version.
[genkernel.git] / gen_compile.sh
index 646e0efd21dccb936aeaa8e252a528b013847bfd..ccc8b8d58e7d04a1de2b3cbf813a66459fe5883d 100755 (executable)
@@ -25,6 +25,10 @@ compile_kernel_args() {
                then
                        ARGS="${ARGS} ARCH=\"${KERNEL_ARCH}\""
                fi
+               if [ -n "${KERNEL_OUTPUTDIR}" -a "${KERNEL_OUTPUTDIR}" != "${KERNEL_DIR}" ]
+               then
+                       ARGS="${ARGS} O=\"${KERNEL_OUTPUTDIR}\""
+               fi
        fi
        echo -n "${ARGS}"
 }
@@ -297,6 +301,13 @@ compile_modules() {
        export UNAME_MACHINE="${ARCH}"
        [ "${INSTALL_MOD_PATH}" != '' ] && export INSTALL_MOD_PATH
        MAKEOPTS="${MAKEOPTS} -j1" compile_generic "modules_install" kernel
+       print_info 1 "        >> Generating module dependency data..."
+       if [ "${INSTALL_MOD_PATH}" != '' ]
+       then
+               depmod -a -e -F "${KERNEL_OUTPUTDIR}"/System.map -b "${INSTALL_MOD_PATH}" ${KV}
+       else
+               depmod -a -e -F "${KERNEL_OUTPUTDIR}"/System.map ${KV}
+       fi
        unset UNAME_MACHINE
 }
 
@@ -316,7 +327,7 @@ compile_kernel() {
                compile_generic "${KERNEL_MAKE_DIRECTIVE_2}" kernel
        fi
 
-       local firmware_in_kernel_line=`fgrep CONFIG_FIRMWARE_IN_KERNEL "${KERNEL_DIR}"/.config`
+       local firmware_in_kernel_line=`fgrep CONFIG_FIRMWARE_IN_KERNEL "${KERNEL_OUTPUTDIR}"/.config`
        if [ -n "${firmware_in_kernel_line}" -a "${firmware_in_kernel_line}" != CONFIG_FIRMWARE_IN_KERNEL=y ]
        then
                print_info 1 "        >> Installing firmware ('make firmware_install') due to CONFIG_FIRMWARE_IN_KERNEL != y..."
@@ -565,40 +576,6 @@ compile_device_mapper() {
        compile_lvm
 }
 
-compile_e2fsprogs() {
-       if [ -f "${BLKID_BINCACHE}" ]
-       then
-               print_info 1 "blkid: >> Using cache"
-       else
-               [ ! -f "${E2FSPROGS_SRCTAR}" ] &&
-                       gen_die "Could not find e2fsprogs source tarball: ${E2FSPROGS_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
-               cd "${TEMP}"
-               rm -rf "${E2FSPROGS_DIR}"
-               tar -zxpf "${E2FSPROGS_SRCTAR}"
-               [ ! -d "${E2FSPROGS_DIR}" ] &&
-                       gen_die "e2fsprogs directory ${E2FSPROGS_DIR} invalid"
-               cd "${E2FSPROGS_DIR}"
-               apply_patches e2fsprogs ${E2FSPROGS_VER}
-               print_info 1 'e2fsprogs: >> Configuring...'
-               LDFLAGS=-static ./configure >> ${LOGFILE} 2>&1 ||
-                       gen_die 'Configuring e2fsprogs failed!'
-               print_info 1 'e2fsprogs: >> Compiling...'
-               MAKE=${UTILS_MAKE} MAKEOPTS="${MAKEOPTS} -j1" compile_generic "" ""
-               print_info 1 'blkid: >> Copying to cache...'
-               [ -f "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ] ||
-                       gen_die 'Blkid executable does not exist!'
-               ${UTILS_CROSS_COMPILE}strip "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ||
-                       gen_die 'Could not strip blkid binary!'
-               bzip2 "${TEMP}/${E2FSPROGS_DIR}/misc/blkid" ||
-                       gen_die 'bzip2 compression of blkid failed!'
-               mv "${TEMP}/${E2FSPROGS_DIR}/misc/blkid.bz2" "${BLKID_BINCACHE}" ||
-                       gen_die 'Could not copy the blkid binary to the package directory, does the directory exist?'
-
-               cd "${TEMP}"
-               rm -rf "${E2FSPROGS_DIR}" > /dev/null
-       fi
-}
-
 compile_fuse() {
        if [ ! -f "${FUSE_BINCACHE}" ]
        then
@@ -612,7 +589,7 @@ compile_fuse() {
                cd "${FUSE_DIR}"
                apply_patches fuse ${FUSE_VER}
                print_info 1 'fuse: >> Configuring...'
-               ./configure  --disable-kernel-module --disable-example >> ${LOGFILE} 2>&1 ||
+               ./configure --disable-example >> ${LOGFILE} 2>&1 ||
                        gen_die 'Configuring fuse failed!'
                print_info 1 'fuse: >> Compiling...'
                MAKE=${UTILS_MAKE} compile_generic "" ""
@@ -650,7 +627,7 @@ compile_unionfs_fuse() {
                apply_patches unionfs-fuse ${UNIONFS_FUSE_VER}
                print_info 1 'unionfs-fuse: >> Compiling...'
                sed -i "/^\(CFLAGS\|CPPFLAGS\)/s:^\\(.*\\)$:\\1 -static -I${TEMP}/${FUSE_DIR}/include -L${TEMP}/${FUSE_DIR}/lib/.libs:" Makefile src/Makefile
-               sed -i "/^LIB = /s:^LIB = \(.*\)$:LIB = -static -L${TEMP}/${FUSE_DIR}/lib/.libs \1 -ldl -lrt:" Makefile src/Makefile
+               sed -i "/^LIB = /s:^LIB = \(.*\)$:LIB = -static -L${TEMP}/${FUSE_DIR}/lib/.libs \1 -ldl -lpthread -lrt:" Makefile src/Makefile
                MAKE=${UTILS_MAKE} compile_generic "" ""
                print_info 1 'unionfs-fuse: >> Copying to cache...'
                [ -f "${TEMP}/${UNIONFS_FUSE_DIR}/src/unionfs" ] ||