add devfsd support

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@13 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Brad House 21 years ago
parent b2b2e3b343
commit 9a65ac4380

@ -240,8 +240,8 @@ compile_modutils() {
local ARGS local ARGS
if [ ! -f "${MODUTILS_BINCACHE}" ] if [ ! -f "${MODUTILS_BINCACHE}" ]
then then
[ ! -f "${MODUTILS_SRCTAR}" ] && gen_die "Could not find modutils source tarball: ${MODUTILS_BINCACHE}" [ ! -f "${MODUTILS_SRCTAR}" ] && gen_die "Could not find modutils source tarball: ${MODUTILS_SRCTAR}"
cd ${TEMP} cd "${TEMP}"
rm -rf "${MODUTILS_DIR}" rm -rf "${MODUTILS_DIR}"
tar -jxpf "${MODUTILS_SRCTAR}" tar -jxpf "${MODUTILS_SRCTAR}"
[ ! -d "${MODUTILS_DIR}" ] && gen_die "Modutils directory ${MODUTILS_DIR} invalid" [ ! -d "${MODUTILS_DIR}" ] && gen_die "Modutils directory ${MODUTILS_DIR} invalid"
@ -287,8 +287,8 @@ compile_module_init_tools() {
local ARGS local ARGS
if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ] if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ]
then then
[ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_BINCACHE}" [ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_SRCTAR}"
cd ${TEMP} cd "${TEMP}"
rm -rf "${MODULE_INIT_TOOLS_DIR}" rm -rf "${MODULE_INIT_TOOLS_DIR}"
tar -jxpf "${MODULE_INIT_TOOLS_SRCTAR}" tar -jxpf "${MODULE_INIT_TOOLS_SRCTAR}"
[ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} invalid" [ ! -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 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() { compile_dietlibc() {
local BUILD_DIETLIBC local BUILD_DIETLIBC
local ORIGTEMP local ORIGTEMP

@ -65,6 +65,8 @@ determine_real_args() {
MODUTILS_BINCACHE=`arch_replace "${MODUTILS_BINCACHE}"` MODUTILS_BINCACHE=`arch_replace "${MODUTILS_BINCACHE}"`
DIETLIBC_BINCACHE=`arch_replace "${DIETLIBC_BINCACHE}"` DIETLIBC_BINCACHE=`arch_replace "${DIETLIBC_BINCACHE}"`
DIETLIBC_BINCACHE_TEMP=`arch_replace "${DIETLIBC_BINCACHE_TEMP}"` 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} if isTrue ${BOOTSPLASH}
then then
BOOTSPLASH=1 BOOTSPLASH=1

@ -78,3 +78,9 @@ DIETLIBC_DIR="dietlibc-${DIETLIBC_VER}"
DIETLIBC_BINCACHE="${GK_SHARE}/pkg/%%ARCH%%/dietlibc-${DIETLIBC_VER}-%%ARCH%%.tar.bz2" DIETLIBC_BINCACHE="${GK_SHARE}/pkg/%%ARCH%%/dietlibc-${DIETLIBC_VER}-%%ARCH%%.tar.bz2"
DIETLIBC_BINCACHE_TEMP="${GK_SHARE}/pkg/%%ARCH%%/dietlibc-${DIETLIBC_VER}-%%ARCH%%-tempdir" 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"

@ -66,6 +66,8 @@ else
compile_modutils compile_modutils
fi fi
compile_devfsd
# Create initrd # Create initrd
create_initrd create_initrd

Loading…
Cancel
Save