View | Details | Raw Unified
Collapse All | Expand All

(-) kernel-mod.eclass.bak (-1 / +54 lines)
 Lines 16-21    Link Here 
SRC_URI="${SRC_URI:-unknown - please fix me!!}"
SRC_URI="${SRC_URI:-unknown - please fix me!!}"
KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}"
KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}"
# KERNEL_MOD_SOURCES is used if you don't want to unpack just ${A}
if [ -z "${KERNEL_MOD_SOURCES}" ]
then
	KERNEL_MOD_SOURCES=${A}
fi
kernel-mod_getmakefilevar ()
kernel-mod_getmakefilevar ()
{
{
	grep $1 $2 | head -n 1 | cut -d = -f 2- | awk '{ print $1 }'
	grep $1 $2 | head -n 1 | cut -d = -f 2- | awk '{ print $1 }'
 Lines 61-66    Link Here 
	KV_MK_VERSION_FULL="$KV_MK_MAJOR.$KV_MK_MINOR.$KV_MK_PATCH$KV_MK_TYPE"
	KV_MK_VERSION_FULL="$KV_MK_MAJOR.$KV_MK_MINOR.$KV_MK_PATCH$KV_MK_TYPE"
	KV_MK_OUTPUT="`kernel-mod_getmakefilevar KBUILD_OUTPUT $KV_MK_FILE`"
	if [ "$KV_MK_VERSION_FULL" != "$KV_DIR_VERSION_FULL" ]; then
	if [ "$KV_MK_VERSION_FULL" != "$KV_DIR_VERSION_FULL" ]; then
		ewarn
		ewarn
		ewarn "The kernel Makefile says that this is a $KV_MK_VERSION_FULL kernel"
		ewarn "The kernel Makefile says that this is a $KV_MK_VERSION_FULL kernel"
 Lines 82-88    Link Here 
	KV_PATCH="$KV_MK_PATCH"
	KV_PATCH="$KV_MK_PATCH"
	KV_TYPE="$KV_MK_TYPE"
	KV_TYPE="$KV_MK_TYPE"
	# if we found an output location, use that. otherwise use KERNEL_DIR.
	if [ ! -z "${KV_MK_OUTPUT}" ]
	then
		KV_OUTPUT="$KV_MK_OUTPUT"
	else
		KV_OUTPUT="$KERNEL_DIR"
	fi
	if [ "${KV_MINOR}" -gt "4" ]
	then
		KV_OBJ="ko"
	else
		KV_OBJ="o"
	fi
	einfo "Building for Linux ${KV_VERSION_FULL} found in ${KERNEL_DIR}"
	einfo "Building for Linux ${KV_VERSION_FULL} found in ${KERNEL_DIR}"
	if [ "${KV_MINOR}" -gt "4" ]
	then
		einfo "which outputs to ${KV_OUTPUT}"
		# Warn them if they aren't using a different output directory
		if [ "${KV_OUTPUT}" = "/usr/src/linux" ]; then
			ewarn "By not using the kernel's ability to output to an alternative"
			ewarn "directory, most external module builds will not build."
			ewarn "See <insert link to user doc here>"
		fi
	fi
}
}
kernel-mod_checkzlibinflate_configured ()
kernel-mod_checkzlibinflate_configured ()
 Lines 151-161    Link Here 
	die "Kernel doesn't include zlib support"
	die "Kernel doesn't include zlib support"
}
}
kernel-mod_src_unpack ()
{
	check_KV
	kernel-mod_getversion
	unpack ${KERNEL_MOD_SOURCES}
	if [ -n "${KERNEL_MOD_KOUTPUT_PATCH}" ]
	then
		cd ${S}
		einfo "Patching to enable koutput compatibility"
		epatch ${KERNEL_MOD_KOUTPUT_PATCH}
	fi
}
kernel-mod_src_compile ()
kernel-mod_src_compile ()
{
{
	emake KERNEL_DIR=${KERNEL_DIR} || die
	emake KERNEL_DIR=${KERNEL_DIR} || die
}
}
kernel-mod_pkg_postinst()
{
	depmod -a
}
kernel-mod_is_2_4_kernel() {
kernel-mod_is_2_4_kernel() {
	kernel-mod_getversion
	kernel-mod_getversion
 Lines 189-192    Link Here 
    fi
    fi
}
}
EXPORT_FUNCTIONS src_compile
EXPORT_FUNCTIONS src_unpack src_compile pkg_postinst