summaryrefslogtreecommitdiff
path: root/recipes/nonworking/unionfs/unionfs-modules.inc
blob: 5e87288e487b1fc9c8cd7943baa3abf61d265423 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
unionutils = "unionctl uniondbg"

include unionfs.inc
inherit module

SECTION = "kernel/modules"

EXTRA_OEMAKE = "'CC=${KERNEL_CC}' 'LD=${KERNEL_LD}' \
		'KERNELVER=${KERNEL_VERSION}' \
		'LINUXSRC=${STAGING_KERNEL_DIR}' \
		'CROSS_COMPILE=${TARGET_PREFIX}' \
		'OS=${TARGET_OS}' \
		${@get_flags(d, bb)}"

KCFLAGS = "-D__KERNEL__ -DMODULE -DFISTGEN \
	   -DUNIONFS_UNSUPPORTED -DNODEBUG \
	   -I. -I${STAGING_KERNEL_DIR}/include \
           -DUNIONFS_VERSION=\"${PV}\" \
	   ${CFLAGS}"

def get_flags(d, bb):
	ret = ""
	if bb.data.getVar('KERNEL_OBJECT_SUFFIX', d, 1) == '.ko':
		return "'EXTRA_CFLAGS=%s'" % bb.data.getVar('KCFLAGS', d, 1)
	return "'CFLAGS=%s'" % bb.data.getVar('KCFLAGS', d, 1)

do_compile () {
	unset LDFLAGS
	oe_runmake unionfs${KERNEL_OBJECT_SUFFIX}
}

do_install () {
	install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/fs
	install -m 0644 unionfs${KERNEL_OBJECT_SUFFIX} ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/fs/

	install -d ${D}${mandir}/man4
	install -m 0644 man/unionfs.4 ${D}${mandir}/man4/
}