aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/udev
diff options
context:
space:
mode:
authorStanislav Brabec <sbrabec@suse.cz>2010-07-24 15:35:55 +0200
committerStanislav Brabec <sbrabec@suse.cz>2010-07-24 15:35:55 +0200
commite5dd04945be46561a37f9c4401f4169cb63a7598 (patch)
tree4b6920f69b6a53bf0485c3a57fdec9f7514e38f0 /recipes/udev
parentec82ad4a6850d84c394c5db78d7f14eef652f1f0 (diff)
downloadopenembedded-e5dd04945be46561a37f9c4401f4169cb63a7598.tar.gz
udev-compat141: Added compatibility udev package for old kernels.
* http://lists.linuxtogo.org/pipermail/openembedded-devel/2010-July/021661.html Signed-off-by: Stanislav Brabec <utx@penguin.cz> Acked-by: Andrea Adami <andrea.adami@gmail.com> Acked-by: Koen Kooi <koen@openembedded.org>
Diffstat (limited to 'recipes/udev')
-rw-r--r--recipes/udev/udev-compat141_141.bb32
-rw-r--r--recipes/udev/udev.inc2
-rw-r--r--recipes/udev/udev_141.bb4
-rw-r--r--recipes/udev/udev_151.bb2
-rw-r--r--recipes/udev/udev_154.bb2
5 files changed, 37 insertions, 5 deletions
diff --git a/recipes/udev/udev-compat141_141.bb b/recipes/udev/udev-compat141_141.bb
new file mode 100644
index 0000000000..3eb99e8a9a
--- /dev/null
+++ b/recipes/udev/udev-compat141_141.bb
@@ -0,0 +1,32 @@
+# To use this package, you need:
+# - udev main package with init scrit that supports udev-compat-wrapper (enable per-platform in the udev.inc and udev*.bb files)
+# - this package must be embedded into the image (otherwise system will refuse to boot)
+# - only one compat package is supported (pick the newest udev that supports your oldest kernel)
+#
+FILESPATHPKG =. "udev-${PV}:udev:"
+require udev_141.bb
+S = "${WORKDIR}/udev-${PV}"
+DESCRIPTION = "udev compatibility helper package for systems that run old kernels"
+PACKAGES = "${PN} ${PN}-dbg"
+
+# Need udev with udev-compat-wrapper support.
+RDEPENDS_${PN} += "udev-compat-wrapper"
+# Remove hotplug RPROVIDES
+RPROVIDES_${PN} = ""
+
+# We cannot use newer library: udev_monitor_new_from_netlink_compat() will fail.
+# We cannot use older udev_monitor_new_from_netlink_compat(): Structures are incompatible.
+# That is why we link udev statically with the old library.
+export enable_shared = "no"
+EXTRA_OECONF += "--enable-static"
+
+# Remove everything except udevd and udevadm and rename these two.
+do_install_append () {
+ mv ${D}${base_sbindir}/udevd ${D}${base_sbindir}/udevd-compat
+ mv ${D}${base_sbindir}/udevadm ${D}${base_sbindir}/udevadm-compat
+ rm -r ${D}${datadir} ${D}${base_libdir} ${D}${libdir} ${D}${includedir} ${D}${sysconfdir}
+ rmdir ${D}${prefix} 2>/dev/null || true
+}
+
+# Remove udev init script installation
+INITSCRIPT_PACKAGES = ""
diff --git a/recipes/udev/udev.inc b/recipes/udev/udev.inc
index 1fb75fe1b0..c79da97074 100644
--- a/recipes/udev/udev.inc
+++ b/recipes/udev/udev.inc
@@ -63,7 +63,7 @@ do_install () {
install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
install -m 0644 ${S}/extras/volume_id/lib/libvolume_id.h ${D}${includedir}
- oe_libinstall -C extras/volume_id/lib -so libvolume_id ${D}${libdir}
+ oe_libinstall -C extras/volume_id/lib libvolume_id ${D}${libdir}
}
PACKAGES =+ "udev-utils libvolume-id libvolume-id-dev"
diff --git a/recipes/udev/udev_141.bb b/recipes/udev/udev_141.bb
index 27055beac9..3ef9f7d660 100644
--- a/recipes/udev/udev_141.bb
+++ b/recipes/udev/udev_141.bb
@@ -79,7 +79,7 @@ do_install () {
install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
- oe_libinstall -C udev/lib -so libudev ${D}${libdir}
+ oe_libinstall -C udev/lib libudev ${D}${libdir}
install ${S}/udev/lib/libudev.h ${D}${includedir}
}
@@ -99,7 +99,7 @@ do_install_append_hipox() {
}
# Create the cache after checkroot has run
-pkg_postinst_${PN}_append() {
+pkg_postinst_udev_append() {
update-rc.d $OPT udev-cache start 12 S .
if [ -d $D/lib/udev/rules.d ] ; then
diff --git a/recipes/udev/udev_151.bb b/recipes/udev/udev_151.bb
index 13f3a02a0a..7be56d29cb 100644
--- a/recipes/udev/udev_151.bb
+++ b/recipes/udev/udev_151.bb
@@ -119,7 +119,7 @@ do_install_append_bug() {
}
# Create the cache after checkroot has run
-pkg_postinst_${PN}_append() {
+pkg_postinst_udev_append() {
update-rc.d $OPT udev-cache start 12 S .
}
diff --git a/recipes/udev/udev_154.bb b/recipes/udev/udev_154.bb
index cd370e801b..5e90e88f58 100644
--- a/recipes/udev/udev_154.bb
+++ b/recipes/udev/udev_154.bb
@@ -120,6 +120,6 @@ do_install_append_bug() {
}
# Create the cache after checkroot has run
-pkg_postinst_${PN}_append() {
+pkg_postinst_udev_append() {
update-rc.d $OPT udev-cache start 12 S .
}