summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-04-08 14:23:39 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-08 18:02:47 +0100
commit44b4eeffae87b5361590caec1a5a6ee5d2c2d4b6 (patch)
tree067e091526fceb035169617bb7c13237c882e592 /meta/recipes-core
parent9dccc97bfcc237198e14985d49805890062e7c3a (diff)
downloadpoky-44b4eeffae87b5361590caec1a5a6ee5d2c2d4b6.tar.gz
systemd: Set the default firmware path to enable firmware loading in udev
After some breakage in udev the kernel gained direct firmware loading. For older kernels (e.g. 3.2 in my case) udev still needs to load the firmware. Firmware loading is enabled once a default firmware path is set. Apply a compile fix from the upstream project. (From OE-Core rev: 2009c6899d7d4ddd71350b1026a27336dc3a94b8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/systemd/systemd/199-firmware.patch98
-rw-r--r--meta/recipes-core/systemd/systemd_199.bb3
2 files changed, 101 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/199-firmware.patch b/meta/recipes-core/systemd/systemd/199-firmware.patch
new file mode 100644
index 0000000000..aaab59b03b
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/199-firmware.patch
@@ -0,0 +1,98 @@
1Upstream-Status: Backport
2http://cgit.freedesktop.org/systemd/systemd/patch/?id=d8d4bee76cf3b40ea923bc57d44aa0815ca9b5ff
3
4From d8d4bee76cf3b40ea923bc57d44aa0815ca9b5ff Mon Sep 17 00:00:00 2001
5From: Kay Sievers <kay@vrfy.org>
6Date: Thu, 28 Mar 2013 14:28:10 +0000
7Subject: build-sys: fix HAVE/ENABLE_FIRMWARE
8
9https://bugs.freedesktop.org/show_bug.cgi?id=62864
10---
11diff --git a/configure.ac b/configure.ac
12index 5b88bcf..e73cd5c 100644
13--- a/configure.ac
14+++ b/configure.ac
15@@ -728,6 +728,7 @@ for i in $with_firmware_path; do
16 done
17 IFS=$OLD_IFS
18 AC_SUBST(FIRMWARE_PATH)
19+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
20 AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
21
22 # ------------------------------------------------------------------------------
23@@ -736,7 +737,6 @@ AC_ARG_ENABLE([gudev],
24 [], [enable_gudev=yes])
25 AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0]) ])
26 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
27-
28 AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
29
30 # ------------------------------------------------------------------------------
31diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
32index 13922d3..c7d4319 100644
33--- a/src/udev/udev-builtin.c
34+++ b/src/udev/udev-builtin.c
35@@ -34,7 +34,7 @@ static const struct udev_builtin *builtins[] = {
36 [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
37 #endif
38 [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
39-#ifdef ENABLE_FIRMWARE
40+#ifdef HAVE_FIRMWARE
41 [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
42 #endif
43 [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
44diff --git a/src/udev/udev.h b/src/udev/udev.h
45index aa2edbe..906dfba 100644
46--- a/src/udev/udev.h
47+++ b/src/udev/udev.h
48@@ -140,7 +140,7 @@ enum udev_builtin_cmd {
49 UDEV_BUILTIN_BLKID,
50 #endif
51 UDEV_BUILTIN_BTRFS,
52-#ifdef ENABLE_FIRMWARE
53+#ifdef HAVE_FIRMWARE
54 UDEV_BUILTIN_FIRMWARE,
55 #endif
56 UDEV_BUILTIN_HWDB,
57@@ -169,7 +169,7 @@ struct udev_builtin {
58 extern const struct udev_builtin udev_builtin_blkid;
59 #endif
60 extern const struct udev_builtin udev_builtin_btrfs;
61-#ifdef ENABLE_FIRMWARE
62+#ifdef HAVE_FIRMWARE
63 extern const struct udev_builtin udev_builtin_firmware;
64 #endif
65 extern const struct udev_builtin udev_builtin_hwdb;
66diff --git a/src/udev/udevd.c b/src/udev/udevd.c
67index b30bedf..2ad7388 100644
68--- a/src/udev/udevd.c
69+++ b/src/udev/udevd.c
70@@ -98,7 +98,7 @@ struct event {
71 dev_t devnum;
72 int ifindex;
73 bool is_block;
74-#ifdef ENABLE_FIRMWARE
75+#ifdef HAVE_FIRMWARE
76 bool nodelay;
77 #endif
78 };
79@@ -444,7 +444,7 @@ static int event_queue_insert(struct udev_device *dev)
80 event->devnum = udev_device_get_devnum(dev);
81 event->is_block = streq("block", udev_device_get_subsystem(dev));
82 event->ifindex = udev_device_get_ifindex(dev);
83-#ifdef ENABLE_FIRMWARE
84+#ifdef HAVE_FIRMWARE
85 if (streq(udev_device_get_subsystem(dev), "firmware"))
86 event->nodelay = true;
87 #endif
88@@ -527,7 +527,7 @@ static bool is_devpath_busy(struct event *event)
89 return true;
90 }
91
92-#ifdef ENABLE_FIRMWARE
93+#ifdef HAVE_FIRMWARE
94 /* allow to bypass the dependency tracking */
95 if (event->nodelay)
96 continue;
97--
98cgit v0.9.0.2-2-gbebe
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
index e5745483dc..2464b83e1f 100644
--- a/meta/recipes-core/systemd/systemd_199.bb
+++ b/meta/recipes-core/systemd/systemd_199.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
9PROVIDES = "udev" 9PROVIDES = "udev"
10 10
11PE = "1" 11PE = "1"
12PR = "r2"
12 13
13DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0" 14DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
14DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" 15DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
@@ -26,6 +27,7 @@ SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
26 file://0002-readahead-chunk-on-spinning-media.patch \ 27 file://0002-readahead-chunk-on-spinning-media.patch \
27 file://0003-readahead-cleanups.patch \ 28 file://0003-readahead-cleanups.patch \
28 file://0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch \ 29 file://0013-systemd-sysctl-Handle-missing-etc-sysctl.conf-proper.patch \
30 file://199-firmware.patch \
29 file://init \ 31 file://init \
30 " 32 "
31SRC_URI[md5sum] = "4bb13f84ce211e93f0141774a90a2322" 33SRC_URI[md5sum] = "4bb13f84ce211e93f0141774a90a2322"
@@ -67,6 +69,7 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
67 --disable-microhttpd \ 69 --disable-microhttpd \
68 --without-python \ 70 --without-python \
69 --with-sysvrcnd-path=${sysconfdir} \ 71 --with-sysvrcnd-path=${sysconfdir} \
72 --with-firmware-path=/lib/firmware \
70 ac_cv_path_KILL=${base_bindir}/kill \ 73 ac_cv_path_KILL=${base_bindir}/kill \
71 " 74 "
72# uclibc does not have NSS 75# uclibc does not have NSS