linux-kexecboot_git: update Zaurus defconfigs for 2.6.38-rc2
[openembedded.git] / recipes / char-driver / char-driver.bb
blob2d7993a343da8ea7ff6f19a544dc621760c6c86e
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"
5 PRIORITY = "optional"
6 SECTION = "base"
7 LICENSE = "GPL"
8 RDEPENDS_${PN} = "kernel-${KERNEL_VERSION}"
9 DEPENDS = "virtual/kernel"
11 PR = "r4"
13 SRC_URI = "http://www.davehylands.com/gumstix-wiki/char-driver/char-driver-2.6.21.tar.gz \
14 file://makefile.patch \
15 # file://sysctl.patch \
18 S = "${WORKDIR}/char-driver"
20 inherit module-base
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}" \
27 CC="${CC}" \
30 PARALLEL_MAKE = ""
32 do_builddir () {
33 mkdir -p ${S}
36 do_movesrc () {
37 cd ${WORKDIR}
38 mv char-driver*.c sample.c char-driver*.h Makefile ${S}
41 do_configure () {
42 echo "Nothing to configure for char-driver"
45 do_compile () {
46 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
47 cd ${S}
48 oe_runmake
51 do_install () {
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/
62 PACKAGES = "${PN}"
63 FILES_${PN} = "${bindir}/sample"
64 FILES_${PN} += "${base_libdir}/modules/${KERNEL_VERSION}/extra/char-driver.ko"
67 SRC_URI[md5sum] = "70113b86db5dea86c282053e15f36cb7"
68 SRC_URI[sha256sum] = "9a87282052a8c0807bbcb46367102f97896a1cf4fcc0d35cfe34b2e5a1456a31"