1 # FIXME, consider using kernel staging directory instead of KERNEL_SOURCE which is
2 # located in the work directory. see module.bbclass
4 DESCRIPTION = "char-driver and userspace program"
8 RDEPENDS = "kernel (${KERNEL_VERSION})"
9 DEPENDS = "virtual/kernel"
13 SRC_URI = "http://www.davehylands.com/gumstix-wiki/char-driver/char-driver-2.6.21.tar.gz \
14 file://makefile.patch;patch=1 \
15 # file://sysctl.patch;patch=1 \
18 S = "${WORKDIR}/char-driver"
22 addtask builddir after do_fetch before do_unpack
23 addtask movesrc after do_unpack before do_patch
25 EXTRA_OEMAKE = 'CROSS_COMPILE="${CROSS_COMPILE}" \
26 KERNELDIR="${KERNEL_SOURCE}" \
38 mv char-driver*.c sample.c char-driver*.h Makefile ${S}
42 echo "Nothing to configure for char-driver"
46 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
52 # install programs to bindir
53 install -m 0755 -d ${D}${bindir}
54 install -m 0755 ${S}/sample ${D}${bindir}
56 # kernel module installs with other modules
57 install -m 0755 -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra/
58 # use cp instead of install so the driver doesn't get stripped
59 cp ${S}/char-driver.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra/
63 FILES_${PN} = "${bindir}/sample"
64 FILES_${PN} += "${base_libdir}/modules/${KERNEL_VERSION}/extra/char-driver.ko"