diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-01-31 00:34:01 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-07 16:42:47 +0100 |
commit | b4bc0a7f1b90a51e26d6ab74d964ff81cfe05904 (patch) | |
tree | 1d35b1b012dbee2f8b0873dcf069a81badf8dc62 /meta/recipes-kernel/kmod | |
parent | 7903a285eefaa9e62bbe9e399233627b330dc9bb (diff) | |
download | poky-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')
-rw-r--r-- | meta/recipes-kernel/kmod/kmod-native_git.bb | 14 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod.inc | 31 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod/depmod-search.conf | 6 | ||||
-rw-r--r-- | meta/recipes-kernel/kmod/kmod_git.bb | 62 |
4 files changed, 113 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb new file mode 100644 index 0000000000..96de8b8ef4 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod-native_git.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | # Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | require kmod.inc | ||
5 | inherit native | ||
6 | |||
7 | PR = "${INC_PR}.0" | ||
8 | |||
9 | do_install_append (){ | ||
10 | for tool in depmod insmod lsmod modinfo modprobe rmmod | ||
11 | do | ||
12 | ln -s kmod ${D}${bindir}/$tool | ||
13 | done | ||
14 | } | ||
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc new file mode 100644 index 0000000000..940a3177c7 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod.inc | |||
@@ -0,0 +1,31 @@ | |||
1 | # Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ | ||
5 | insert, remove, list, check properties, resolve dependencies and aliases." | ||
6 | HOMEPAGE = "http://packages.profusion.mobi/kmod/" | ||
7 | LICENSE = "GPL-2.0+ & LGPL-2.1+" | ||
8 | LICENSE_libkmod = "LGPL-2.1+" | ||
9 | SECTION = "base" | ||
10 | PV = "7+git${SRCREV}" | ||
11 | INC_PR = "r0" | ||
12 | DEPENDS += "gnome-doc-utils-native" | ||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
14 | file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ | ||
15 | " | ||
16 | inherit autotools | ||
17 | |||
18 | SRC_URI = "git://git.profusion.mobi/kmod.git;protocol=git;branch=master \ | ||
19 | file://depmod-search.conf \ | ||
20 | " | ||
21 | |||
22 | SRCREV = "02629fa02e96763db7460a930239cc93649a52f8" | ||
23 | |||
24 | S = "${WORKDIR}/git" | ||
25 | |||
26 | EXTRA_AUTORECONF += "--install --symlink" | ||
27 | EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools" | ||
28 | |||
29 | do_configure_prepend () { | ||
30 | gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make | ||
31 | } | ||
diff --git a/meta/recipes-kernel/kmod/kmod/depmod-search.conf b/meta/recipes-kernel/kmod/kmod/depmod-search.conf new file mode 100644 index 0000000000..527c0bb6ee --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/depmod-search.conf | |||
@@ -0,0 +1,6 @@ | |||
1 | # | ||
2 | # /etc/depmod.d/depmod.conf | ||
3 | # | ||
4 | |||
5 | search updates extramodules built-in | ||
6 | |||
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 | |||
4 | require kmod.inc | ||
5 | |||
6 | PR = "${INC_PR}.0" | ||
7 | |||
8 | PROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" | ||
9 | RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" | ||
10 | CONFLICTS_${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 | ||
13 | bindir = "${base_bindir}" | ||
14 | sbindir = "${base_sbindir}" | ||
15 | # libdir = "${base_libdir}" | ||
16 | |||
17 | SRC_URI += " \ | ||
18 | file://depmod-search.conf \ | ||
19 | " | ||
20 | |||
21 | do_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 | |||
39 | pkg_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 | |||
49 | pkg_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 | |||
59 | PACKAGES =+ "libkmod" | ||
60 | |||
61 | FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS}" | ||
62 | FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d" | ||