add devfsd support
authorBrad House <brad_mssw@gentoo.org>
Tue, 9 Dec 2003 19:17:59 +0000 (19:17 +0000)
committerBrad House <brad_mssw@gentoo.org>
Tue, 9 Dec 2003 19:17:59 +0000 (19:17 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@13 67a159dc-881f-0410-a524-ba9dfbe2cb84

gen_compile.sh
gen_determineargs.sh
genkernel.conf
genkernel.sh

index 7ce7a6550b1255ea35fcb2d216b041d6f75d5789..744b10b7f88006f861c249cd0e8c3cd8796f6b03 100644 (file)
@@ -240,8 +240,8 @@ compile_modutils() {
        local ARGS
        if [ ! -f "${MODUTILS_BINCACHE}" ]
        then
-               [ ! -f "${MODUTILS_SRCTAR}" ] && gen_die "Could not find modutils source tarball: ${MODUTILS_BINCACHE}"
-               cd ${TEMP}
+               [ ! -f "${MODUTILS_SRCTAR}" ] && gen_die "Could not find modutils source tarball: ${MODUTILS_SRCTAR}"
+               cd "${TEMP}"
                rm -rf "${MODUTILS_DIR}"
                tar -jxpf "${MODUTILS_SRCTAR}"
                [ ! -d "${MODUTILS_DIR}" ] && gen_die "Modutils directory ${MODUTILS_DIR} invalid"
@@ -287,8 +287,8 @@ compile_module_init_tools() {
        local ARGS
        if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ]
        then
-               [ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_BINCACHE}"
-               cd ${TEMP}
+               [ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_SRCTAR}"
+               cd "${TEMP}"
                rm -rf "${MODULE_INIT_TOOLS_DIR}"
                tar -jxpf "${MODULE_INIT_TOOLS_SRCTAR}"
                [ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} invalid"
@@ -329,6 +329,59 @@ compile_module_init_tools() {
        fi
 }
 
+compile_devfsd() {
+       local ARGS
+       if [ ! -f "${DEVFSD_BINCACHE}" -o ! -f "${DEVFSD_CONF_BINCACHE}" ]
+       then
+               [ ! -f "${DEVFSD_SRCTAR}" ] && gen_die "Could not find devfsd source tarball: ${DEVFSD_SRCTAR}"
+               cd "${TEMP}"
+               rm -rf "${DEVFSD_DIR}"
+               tar -jxpf "${DEVFSD_SRCTAR}"
+               [ ! -d "${DEVFSD_DIR}" ] && gen_die "Devfsd directory ${DEVFSD_DIR} invalid"
+               cd "${DEVFSD_DIR}"
+
+               if [ "${USE_DIETLIBC}" -eq "1" ]
+               then
+                       extract_dietlibc_bincache
+                       OLD_CC="${UTILS_CC}"
+                       UTILS_CC="${TEMP}/diet/bin/diet ${UTILS_CC}"
+               fi
+
+               print_info 1 "devfsd: make all"
+
+               if [ "${USE_DIETLIBC}" -eq "1" ]
+               then
+                       compile_generic "has_dlopen=0 has_rpcsvc=0" utils
+               else
+                       compile_generic "LDFLAGS=-static" utils
+               fi
+
+               if [ "${USE_DIETLIBC}" -eq "1" ]
+               then
+                       clean_dietlibc_bincache
+                       UTILS_CC="${OLD_CC}"
+               fi
+
+               print_info 1 "devfsd: copying to bincache"
+               [ ! -f "${TEMP}/${DEVFSD_DIR}/devfsd" ] && gen_die "devfsd executable does not exist after compilation of devfsd"
+               strip "${TEMP}/${DEVFSD_DIR}/devfsd" || gen_die "could not strip devfsd"
+               bzip2 "${TEMP}/${DEVFSD_DIR}/devfsd" || gen_die "compression of devfsd failed"
+               [ ! -f "${TEMP}/${DEVFSD_DIR}/devfsd.bz2" ] && gen_die "could not find compressed devfsd.bz2 binary"
+               mv "${TEMP}/${DEVFSD_DIR}/devfsd.bz2" "${DEVFSD_BINCACHE}" || gen_die "could not move compressed binary to bincache"
+
+               [ ! -f "${TEMP}/${DEVFSD_DIR}/devfsd.conf" ] && gen_die "devfsd.conf does not exist after compilation of devfsd"
+               bzip2 "${TEMP}/${DEVFSD_DIR}/devfsd.conf" || gen_die "compression of devfsd.conf failed"
+               [ ! -f "${TEMP}/${DEVFSD_DIR}/devfsd.conf.bz2" ] && gen_die "could not find compressed devfsd.conf.bz2 binary"
+               mv "${TEMP}/${DEVFSD_DIR}/devfsd.conf.bz2" "${DEVFSD_CONF_BINCACHE}" || gen_die "could not move compressed binary to bincache"
+
+               print_info 1 "devfsd: cleaning up"
+               cd "${TEMP}"
+               rm -rf "${DEVFSD_DIR}" > /dev/null
+       else
+               print_info 1 "devfsd: Found bincache at ${DEVFSD_BINCACHE} and ${DEVFSD_CONF_BINCACHE}"
+       fi
+}
+
 compile_dietlibc() {
        local BUILD_DIETLIBC
        local ORIGTEMP
index b89c6c09cd9b75428133699f3b20abdf0cf1b1dd..42df2585b9db7d931f4c96d3870010ee6b788807 100644 (file)
@@ -65,6 +65,8 @@ determine_real_args() {
        MODUTILS_BINCACHE=`arch_replace "${MODUTILS_BINCACHE}"`
        DIETLIBC_BINCACHE=`arch_replace "${DIETLIBC_BINCACHE}"`
        DIETLIBC_BINCACHE_TEMP=`arch_replace "${DIETLIBC_BINCACHE_TEMP}"`
+       DEVFSD_BINCACHE=`arch_replace "${DEVFSD_BINCACHE}"`
+       DEVFSD_CONF_BINCACHE=`arch_replace "${DEVFSD_CONF_BINCACHE}"`
        if isTrue ${BOOTSPLASH}
        then
                BOOTSPLASH=1
index 5087a0f9cebd9e06512ca16caef0664b1458b127..91114388e8249f9545e9f576e3a09a1a20e05f20 100755 (executable)
@@ -78,3 +78,9 @@ DIETLIBC_DIR="dietlibc-${DIETLIBC_VER}"
 DIETLIBC_BINCACHE="${GK_SHARE}/pkg/%%ARCH%%/dietlibc-${DIETLIBC_VER}-%%ARCH%%.tar.bz2"
 DIETLIBC_BINCACHE_TEMP="${GK_SHARE}/pkg/%%ARCH%%/dietlibc-${DIETLIBC_VER}-%%ARCH%%-tempdir"
 
+DEVFSD_VER="1.3.25-dietlibc-kernel25"
+DEVFSD_SRCTAR="${GK_SHARE}/pkg/devfsd-${DEVFSD_VER}.tar.bz2"
+DEVFSD_DIR="devfsd"
+DEVFSD_BINCACHE="${GK_SHARE}/pkg/%%ARCH%%/devfsd-${DEVFSD_VER}-%%ARCH%%.bz2"
+DEVFSD_CONF_BINCACHE="${GK_SHARE}/pkg/%%ARCH%%/devfsd-conf-${DIETLIBC_VER}-%%ARCH%%.bz2"
+
index bde9083c11bd0369f51a711fcdb672253e3281d1..6491f7b8bfe6101ad167a1ba1b05b8f16d10ac8a 100755 (executable)
@@ -66,6 +66,8 @@ else
        compile_modutils
 fi
 
+compile_devfsd
+
 # Create initrd
 create_initrd