summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kmod/kmod_git.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-01-31 00:34:01 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-07 16:42:47 +0100
commitb4bc0a7f1b90a51e26d6ab74d964ff81cfe05904 (patch)
tree1d35b1b012dbee2f8b0873dcf069a81badf8dc62 /meta/recipes-kernel/kmod/kmod_git.bb
parent7903a285eefaa9e62bbe9e399233627b330dc9bb (diff)
downloadpoky-b4bc0a7f1b90a51e26d6ab74d964ff81cfe05904.tar.gz
kmod: Add recipes
kmod is replacement for module-init-tools (From OE-Core rev: 716606f5446534e48b45fcc017e8bbdfe7f15e26) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/kmod/kmod_git.bb')
-rw-r--r--meta/recipes-kernel/kmod/kmod_git.bb62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb
new file mode 100644
index 0000000000..928fa88c7b
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod_git.bb
@@ -0,0 +1,62 @@
1# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4require kmod.inc
5
6PR = "${INC_PR}.0"
7
8PROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
9RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
10CONFLICTS_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools"
11
12# autotools set prefix to /usr, however we want them in /bin and /sbin
13bindir = "${base_bindir}"
14sbindir = "${base_sbindir}"
15# libdir = "${base_libdir}"
16
17SRC_URI += " \
18 file://depmod-search.conf \
19 "
20
21do_install_append () {
22 install -dm755 ${D}${base_bindir}
23 install -dm755 ${D}${base_sbindir}
24 # add symlinks to kmod
25 ln -s ..${base_bindir}/kmod ${D}${base_bindir}/lsmod.kmod
26 for tool in {ins,rm,dep}mod mod{info,probe}; do
27 ln -s ..${base_bindir}/kmod ${D}${base_sbindir}/${tool}.kmod
28 done
29 # configuration directories
30 install -dm755 ${D}${base_libdir}/depmod.d
31 install -dm755 ${D}${base_libdir}/modprobe.d
32 install -dm755 ${D}${sysconfdir}/depmod.d
33 install -dm755 ${D}${sysconfdir}/modprobe.d
34
35 # install depmod.d file for search/ dir
36 install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf"
37}
38
39pkg_postinst_kmod() {
40 for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do
41 bn=`basename $f`
42 update-alternatives --install /$f $bn /$f.kmod 60
43 done
44 update-alternatives --install /bin/lsmod bin-lsmod /bin/lsmod.kmod 60
45 update-alternatives --install /sbin/lsmod lsmod /bin/lsmod.kmod 60
46 update-alternatives --install /sbin/depmod depmod /sbin/depmod.kmod 60
47}
48
49pkg_prerm_kmod() {
50 for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do
51 bn=`basename $f`
52 update-alternatives --remove $bn /$f.kmod
53 done
54 update-alternatives --remove bin-lsmod /bin/lsmod.kmod
55 update-alternatives --remove lsmod /bin/lsmod.kmod
56 update-alternatives --remove depmod /sbin/depmod.kmod
57}
58
59PACKAGES =+ "libkmod"
60
61FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS}"
62FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d"