summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--meta/recipes-kernel/kmod/kmod-native_git.bb14
-rw-r--r--meta/recipes-kernel/kmod/kmod.inc31
-rw-r--r--meta/recipes-kernel/kmod/kmod/depmod-search.conf6
-rw-r--r--meta/recipes-kernel/kmod/kmod_git.bb62
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
4require kmod.inc
5inherit native
6
7PR = "${INC_PR}.0"
8
9do_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
4DESCRIPTION = "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."
6HOMEPAGE = "http://packages.profusion.mobi/kmod/"
7LICENSE = "GPL-2.0+ & LGPL-2.1+"
8LICENSE_libkmod = "LGPL-2.1+"
9SECTION = "base"
10PV = "7+git${SRCREV}"
11INC_PR = "r0"
12DEPENDS += "gnome-doc-utils-native"
13LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
14 file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
15 "
16inherit autotools
17
18SRC_URI = "git://git.profusion.mobi/kmod.git;protocol=git;branch=master \
19 file://depmod-search.conf \
20 "
21
22SRCREV = "02629fa02e96763db7460a930239cc93649a52f8"
23
24S = "${WORKDIR}/git"
25
26EXTRA_AUTORECONF += "--install --symlink"
27EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools"
28
29do_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
5search 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
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"