On Fri, Sep 10, 2010 at 10:47:48PM +0200, Robert Schwebel wrote: > Signed-off-by: Robert Schwebel <r.schwe...@pengutronix.de>
Any reason for not switching to 162? Michael > --- > patches/udev-160/autogen.sh | 1 - > patches/udev-160/remove-SOCK_CLOEXEC.diff | 30 --- > patches/udev-160/series | 5 - > patches/udev-160/udev-150-remove-le16toh.diff | 30 --- > patches/udev-160/udev-150-revert-SOCK_CLOEXEC.diff | 121 ---------- > .../udev-160/udev-150-revert-bsg_h-removal.diff | 125 ----------- > patches/udev-160/udev-150-split-extras.diff | 233 > -------------------- > patches/udev-161/autogen.sh | 9 + > patches/udev-161/remove-SOCK_CLOEXEC.diff | 30 +++ > patches/udev-161/series | 5 + > patches/udev-161/udev-150-remove-le16toh.diff | 30 +++ > patches/udev-161/udev-150-revert-SOCK_CLOEXEC.diff | 129 +++++++++++ > .../udev-161/udev-150-revert-bsg_h-removal.diff | 130 +++++++++++ > patches/udev-161/udev-150-split-extras.diff | 233 > ++++++++++++++++++++ > rules/udev.make | 2 +- > 15 files changed, 567 insertions(+), 546 deletions(-) > delete mode 120000 patches/udev-160/autogen.sh > delete mode 100644 patches/udev-160/remove-SOCK_CLOEXEC.diff > delete mode 100644 patches/udev-160/series > delete mode 100644 patches/udev-160/udev-150-remove-le16toh.diff > delete mode 100644 patches/udev-160/udev-150-revert-SOCK_CLOEXEC.diff > delete mode 100644 patches/udev-160/udev-150-revert-bsg_h-removal.diff > delete mode 100644 patches/udev-160/udev-150-split-extras.diff > create mode 100755 patches/udev-161/autogen.sh > create mode 100644 patches/udev-161/remove-SOCK_CLOEXEC.diff > create mode 100644 patches/udev-161/series > create mode 100644 patches/udev-161/udev-150-remove-le16toh.diff > create mode 100644 patches/udev-161/udev-150-revert-SOCK_CLOEXEC.diff > create mode 100644 patches/udev-161/udev-150-revert-bsg_h-removal.diff > create mode 100644 patches/udev-161/udev-150-split-extras.diff > > diff --git a/patches/udev-160/autogen.sh b/patches/udev-160/autogen.sh > deleted file mode 120000 > index 9f8a4cb..0000000 > --- a/patches/udev-160/autogen.sh > +++ /dev/null > @@ -1 +0,0 @@ > -../autogen.sh > \ No newline at end of file > diff --git a/patches/udev-160/remove-SOCK_CLOEXEC.diff > b/patches/udev-160/remove-SOCK_CLOEXEC.diff > deleted file mode 100644 > index d9cb3ef..0000000 > --- a/patches/udev-160/remove-SOCK_CLOEXEC.diff > +++ /dev/null > @@ -1,30 +0,0 @@ > -From: Michael Olbrich <m.olbr...@pengutronix.de> > -Subject: HACK: remove SOCK_CLOEXEC usage > - > -SOCK_CLOEXEC is not supported by OSELAS.Toolchain-1.99.3 > - > -Not for upstream. > - > -Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > - > ---- > - udev/udevd.c | 3 ++- > - 1 file changed, 2 insertions(+), 1 deletion(-) > - > -Index: b/udev/udevd.c > -=================================================================== > ---- a/udev/udevd.c > -+++ b/udev/udevd.c > -@@ -979,10 +979,11 @@ static int init_notify(const char *state > - goto finish; > - } > - > -- if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) { > -+ if ((fd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) { > - r = -errno; > - goto finish; > - } > -+ util_set_fd_cloexec(fd); > - > - memset(&sockaddr, 0, sizeof(sockaddr)); > - sockaddr.sa.sa_family = AF_UNIX; > diff --git a/patches/udev-160/series b/patches/udev-160/series > deleted file mode 100644 > index cbfcdab..0000000 > --- a/patches/udev-160/series > +++ /dev/null > @@ -1,5 +0,0 @@ > -udev-150-split-extras.diff > -udev-150-revert-SOCK_CLOEXEC.diff > -udev-150-revert-bsg_h-removal.diff > -udev-150-remove-le16toh.diff > -remove-SOCK_CLOEXEC.diff > diff --git a/patches/udev-160/udev-150-remove-le16toh.diff > b/patches/udev-160/udev-150-remove-le16toh.diff > deleted file mode 100644 > index 7794bcf..0000000 > --- a/patches/udev-160/udev-150-remove-le16toh.diff > +++ /dev/null > @@ -1,30 +0,0 @@ > -From: Michael Olbrich <m.olbr...@pengutronix.de> > -Subject: HACK: remove le16toh usage > - > -le16toh is not supported by OSELAS.Toolchain-1.99.3 > - > -Not for upstream. > - > -Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > - > ---- > - extras/ata_id/ata_id.c | 6 +++++- > - 1 file changed, 5 insertions(+), 1 deletion(-) > - > -Index: b/extras/ata_id/ata_id.c > -=================================================================== > ---- a/extras/ata_id/ata_id.c > -+++ b/extras/ata_id/ata_id.c > -@@ -168,7 +168,11 @@ static void disk_identify_fixup_uint16 ( > - uint16_t *p; > - > - p = (uint16_t *) identify; > -- p[offset_words] = le16toh (p[offset_words]); > -+#if __BYTE_ORDER == __LITTLE_ENDIAN > -+ p[offset_words] = p[offset_words]; > -+#else > -+ p[offset_words] = __bswap_16 (p[offset_words]); > -+#endif > - } > - > - /** > diff --git a/patches/udev-160/udev-150-revert-SOCK_CLOEXEC.diff > b/patches/udev-160/udev-150-revert-SOCK_CLOEXEC.diff > deleted file mode 100644 > index c3fa33c..0000000 > --- a/patches/udev-160/udev-150-revert-SOCK_CLOEXEC.diff > +++ /dev/null > @@ -1,121 +0,0 @@ > -From: Michael Olbrich <m.olbr...@pengutronix.de> > -Subject: HACK: revert 26347a4c5538008318188118872490128f43fcd3 (don't use > SOCK_CLOEXEC) > - > -SOCK_CLOEXEC is not defined by the glibc in OSELAS.Toolchain-1.99.3 > - > -Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > - > -diff --git a/libudev/libudev-monitor.c b/libudev/libudev-monitor.c > -index 96c153f..ee855af 100644 > ---- a/libudev/libudev-monitor.c > -+++ b/libudev/libudev-monitor.c > -@@ -139,12 +139,13 @@ struct udev_monitor > *udev_monitor_new_from_socket(struct udev *udev, const char > - util_strscpy(&udev_monitor->sun.sun_path[1], > sizeof(udev_monitor->sun.sun_path)-1, socket_path); > - udev_monitor->addrlen = offsetof(struct sockaddr_un, sun_path) > + strlen(socket_path)+1; > - } > -- udev_monitor->sock = socket(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0); > -+ udev_monitor->sock = socket(AF_LOCAL, SOCK_DGRAM, 0); > - if (udev_monitor->sock == -1) { > - err(udev, "error getting socket: %m\n"); > - free(udev_monitor); > - return NULL; > - } > -+ util_set_fd_cloexec(udev_monitor->sock); > - > - dbg(udev, "monitor %p created with '%s'\n", udev_monitor, socket_path); > - return udev_monitor; > -@@ -196,12 +197,13 @@ struct udev_monitor > *udev_monitor_new_from_netlink(struct udev *udev, const char > - if (udev_monitor == NULL) > - return NULL; > - > -- udev_monitor->sock = socket(PF_NETLINK, SOCK_DGRAM|SOCK_CLOEXEC, > NETLINK_KOBJECT_UEVENT); > -+ udev_monitor->sock = socket(PF_NETLINK, SOCK_DGRAM, > NETLINK_KOBJECT_UEVENT); > - if (udev_monitor->sock == -1) { > - err(udev, "error getting socket: %m\n"); > - free(udev_monitor); > - return NULL; > - } > -+ util_set_fd_cloexec(udev_monitor->sock); > - > - udev_monitor->snl.nl_family = AF_NETLINK; > - udev_monitor->snl.nl_groups = group; > -diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h > -index c2fff00..6738a9b 100644 > ---- a/libudev/libudev-private.h > -+++ b/libudev/libudev-private.h > -@@ -204,6 +204,7 @@ size_t util_strscpyl(char *dest, size_t size, const char > *src, ...) __attribute_ > - int udev_util_replace_whitespace(const char *str, char *to, size_t len); > - int udev_util_replace_chars(char *str, const char *white); > - int udev_util_encode_string(const char *str, char *str_enc, size_t len); > -+void util_set_fd_cloexec(int fd); > - unsigned int util_string_hash32(const char *key); > - uint64_t util_string_bloom64(const char *str); > - > -diff --git a/libudev/libudev-util.c b/libudev/libudev-util.c > -index c0209f9..9a656b5 100644 > ---- a/libudev/libudev-util.c > -+++ b/libudev/libudev-util.c > -@@ -481,6 +481,18 @@ err: > - return -1; > - } > - > -+void util_set_fd_cloexec(int fd) > -+{ > -+ int flags; > -+ > -+ flags = fcntl(fd, F_GETFD); > -+ if (flags < 0) > -+ flags = FD_CLOEXEC; > -+ else > -+ flags |= FD_CLOEXEC; > -+ fcntl(fd, F_SETFD, flags); > -+} > -+ > - unsigned int util_string_hash32(const char *str) > - { > - unsigned int hash = 0; > -diff --git a/udev/udev-watch.c b/udev/udev-watch.c > -index d67083b..102e16f 100644 > ---- a/udev/udev-watch.c > -+++ b/udev/udev-watch.c > -@@ -38,8 +38,10 @@ static int inotify_fd = -1; > - */ > - int udev_watch_init(struct udev *udev) > - { > -- inotify_fd = inotify_init1(IN_CLOEXEC); > -- if (inotify_fd < 0) > -+ inotify_fd = inotify_init(); > -+ if (inotify_fd >= 0) > -+ util_set_fd_cloexec(inotify_fd); > -+ else > - err(udev, "inotify_init failed: %m\n"); > - return inotify_fd; > - } > -diff --git a/udev/udevd.c b/udev/udevd.c > -index fe3352c..86936c7 100644 > ---- a/udev/udevd.c > -+++ b/udev/udevd.c > -@@ -223,6 +223,7 @@ static void worker_new(struct event *event) > - /* allow the main daemon netlink address to send devices to the worker > */ > - udev_monitor_allow_unicast_sender(worker_monitor, monitor); > - udev_monitor_enable_receiving(worker_monitor); > -+ util_set_fd_cloexec(udev_monitor_get_fd(worker_monitor)); > - > - worker = calloc(1, sizeof(struct worker)); > - if (worker == NULL) > -@@ -922,13 +923,14 @@ int main(int argc, char *argv[]) > - } > - > - /* unnamed socket from workers to the main daemon */ > -- if (socketpair(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0, worker_watch) < 0) > { > -+ if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, worker_watch) < 0) { > - fprintf(stderr, "error getting socketpair\n"); > - err(udev, "error getting socketpair\n"); > - rc = 6; > - goto exit; > - } > - pfd[FD_WORKER].fd = worker_watch[READ_END]; > -+ util_set_fd_cloexec(worker_watch[WRITE_END]); > - > - rules = udev_rules_new(udev, resolve_names); > - if (rules == NULL) { > diff --git a/patches/udev-160/udev-150-revert-bsg_h-removal.diff > b/patches/udev-160/udev-150-revert-bsg_h-removal.diff > deleted file mode 100644 > index f6e57a9..0000000 > --- a/patches/udev-160/udev-150-revert-bsg_h-removal.diff > +++ /dev/null > @@ -1,125 +0,0 @@ > -From: Michael Olbrich <m.olbr...@pengutronix.de> > -Subject: HACK: revert 24355313dc9686a14a618fcd9bbdedc29c57b651 (readd bsg.h) > - > -Readd bsg.h which is not part of the kernel headers in > OSELAS.Toolchain-1.99.3 > - > -Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > - > -diff --git a/Makefile.am b/Makefile.am > -index b7ced1d..67cff09 100644 > ---- a/Makefile.am > -+++ b/Makefile.am > -@@ -268,7 +268,8 @@ extras_scsi_id_scsi_id_SOURCES =\ > - extras/scsi_id/scsi_id.c \ > - extras/scsi_id/scsi_serial.c \ > - extras/scsi_id/scsi.h \ > -- extras/scsi_id/scsi_id.h > -+ extras/scsi_id/scsi_id.h \ > -+ extras/scsi_id/bsg.h > - extras_scsi_id_scsi_id_LDADD = libudev/libudev-private.la > - libexec_PROGRAMS += extras/scsi_id/scsi_id > - dist_man_MANS += extras/scsi_id/scsi_id.8 > -diff --git a/extras/scsi_id/bsg.h b/extras/scsi_id/bsg.h > -new file mode 100644 > -index 0000000..cf0303a > ---- /dev/null > -+++ b/extras/scsi_id/bsg.h > -@@ -0,0 +1,84 @@ > -+#ifndef BSG_H > -+#define BSG_H > -+ > -+#define BSG_PROTOCOL_SCSI 0 > -+ > -+#define BSG_SUB_PROTOCOL_SCSI_CMD 0 > -+#define BSG_SUB_PROTOCOL_SCSI_TMF 1 > -+#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 > -+ > -+struct sg_io_v4 { > -+ __s32 guard; /* [i] 'Q' to differentiate from v3 */ > -+ __u32 protocol; /* [i] 0 -> SCSI , .... */ > -+ __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task > -+ management function, .... */ > -+ > -+ __u32 request_len; /* [i] in bytes */ > -+ __u64 request; /* [i], [*i] {SCSI: cdb} */ > -+ __u64 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ > -+ __u32 request_attr; /* [i] {SCSI: task attribute} */ > -+ __u32 request_priority; /* [i] {SCSI: task priority} */ > -+ __u32 request_extra; /* [i] {spare, for padding} */ > -+ __u32 max_response_len; /* [i] in bytes */ > -+ __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ > -+ > -+ /* "dout_": data out (to device); "din_": data in (from device) */ > -+ __u32 dout_iovec_count; /* [i] 0 -> "flat" dout transfer else > -+ dout_xfer points to array of iovec */ > -+ __u32 dout_xfer_len; /* [i] bytes to be transferred to device */ > -+ __u32 din_iovec_count; /* [i] 0 -> "flat" din transfer */ > -+ __u32 din_xfer_len; /* [i] bytes to be transferred from device */ > -+ __u64 dout_xferp; /* [i], [*i] */ > -+ __u64 din_xferp; /* [i], [*o] */ > -+ > -+ __u32 timeout; /* [i] units: millisecond */ > -+ __u32 flags; /* [i] bit mask */ > -+ __u64 usr_ptr; /* [i->o] unused internally */ > -+ __u32 spare_in; /* [i] */ > -+ > -+ __u32 driver_status; /* [o] 0 -> ok */ > -+ __u32 transport_status; /* [o] 0 -> ok */ > -+ __u32 device_status; /* [o] {SCSI: command completion status} */ > -+ __u32 retry_delay; /* [o] {SCSI: status auxiliary information} */ > -+ __u32 info; /* [o] additional information */ > -+ __u32 duration; /* [o] time to complete, in milliseconds */ > -+ __u32 response_len; /* [o] bytes of response actually written */ > -+ __s32 din_resid; /* [o] din_xfer_len - actual_din_xfer_len */ > -+ __s32 dout_resid; /* [o] dout_xfer_len - actual_dout_xfer_len */ > -+ __u64 generated_tag; /* [o] {SCSI: transport generated task tag} */ > -+ __u32 spare_out; /* [o] */ > -+ > -+ __u32 padding; > -+}; > -+ > -+#ifdef __KERNEL__ > -+ > -+#if defined(CONFIG_BLK_DEV_BSG) > -+struct bsg_class_device { > -+ struct device *class_dev; > -+ struct device *parent; > -+ int minor; > -+ struct request_queue *queue; > -+ struct kref ref; > -+ void (*release)(struct device *); > -+}; > -+ > -+extern int bsg_register_queue(struct request_queue *q, > -+ struct device *parent, const char *name, > -+ void (*release)(struct device *)); > -+extern void bsg_unregister_queue(struct request_queue *); > -+#else > -+static inline int bsg_register_queue(struct request_queue *q, > -+ struct device *parent, const char *name, > -+ void (*release)(struct device *)) > -+{ > -+ return 0; > -+} > -+static inline void bsg_unregister_queue(struct request_queue *q) > -+{ > -+} > -+#endif > -+ > -+#endif /* __KERNEL__ */ > -+ > -+#endif > -diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c > -index 0c9d9c3..65b3de5 100644 > ---- a/extras/scsi_id/scsi_serial.c > -+++ b/extras/scsi_id/scsi_serial.c > -@@ -29,7 +29,8 @@ > - #include <scsi/scsi.h> > - #include <scsi/sg.h> > - #include <linux/types.h> > --#include <linux/bsg.h> > -+/* #include <linux/bsg.h> */ > -+#include "bsg.h" > - > - #include "libudev.h" > - #include "libudev-private.h" > diff --git a/patches/udev-160/udev-150-split-extras.diff > b/patches/udev-160/udev-150-split-extras.diff > deleted file mode 100644 > index 28350f5..0000000 > --- a/patches/udev-160/udev-150-split-extras.diff > +++ /dev/null > @@ -1,233 +0,0 @@ > -From: Michael Olbrich <m.olbr...@pengutronix.de> > -Subject: split enabling extras with dependencies > - > -This patch patch makes it possible to enable all extras with external > -dependencies individually. It replaces: > - --disable-extras > -with > - --disable-gudev > - --disable-bluetooth > - --disable-keymap > - --disable-acl > - --disable-usbdb > - --disable-pcidb > - --disable-modem-modeswitch > -as configure options > - > -Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > - > ---- > - Makefile.am | 25 +++++++++++++++++++++---- > - configure.ac | 59 > ++++++++++++++++++++++++++++++++++++++++++++++++++--------- > - 2 files changed, 71 insertions(+), 13 deletions(-) > - > -Index: b/Makefile.am > -=================================================================== > ---- a/Makefile.am > -+++ b/Makefile.am > -@@ -284,7 +284,8 @@ extras_v4l_id_v4l_id_LDADD = libudev/lib > - libexec_PROGRAMS += extras/v4l_id/v4l_id > - dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules > - > --if ENABLE_EXTRAS > -+if ENABLE_USBDB > -+if ENABLE_PCIDB > - # > ------------------------------------------------------------------------------ > - # conditional extras (need glib, libusb, libacl, ...) > - # > ------------------------------------------------------------------------------ > -@@ -292,7 +293,12 @@ dist_udevrules_DATA += \ > - rules/rules.d/75-net-description.rules \ > - rules/rules.d/75-tty-description.rules \ > - rules/rules.d/78-sound-card.rules > -+endif # ENABLE_PCIDB > -+endif # ENABLE_USBDB > - > -+BUILT_SOURCES = > -+ > -+if ENABLE_GUDEV > - # > ------------------------------------------------------------------------------ > - # GUdev - libudev gobject interface > - # > ------------------------------------------------------------------------------ > -@@ -330,7 +336,7 @@ dist_extras_gudev_libgudev_1_0_la_SOURCE > - extras/gudev/gudevmarshal.c \ > - extras/gudev/gudevenumtypes.h \ > - extras/gudev/gudevenumtypes.c > --BUILT_SOURCES = $(dist_extras_gudev_libgudev_1_0_la_SOURCES) > -+BUILT_SOURCES += $(dist_extras_gudev_libgudev_1_0_la_SOURCES) > - > - extras_gudev_libgudev_1_0_la_CPPFLAGS = \ > - $(AM_CPPFLAGS) \ > -@@ -407,7 +413,9 @@ typelibs_DATA = extras/gudev/GUdev-1.0.t > - > - CLEANFILES += $(gir_DATA) $(typelibs_DATA) > - endif # ENABLE_INTROSPECTION > -+endif # ENABLE_GUDEV > - > -+if ENABLE_BLUETOOTH > - # > ------------------------------------------------------------------------------ > - # Bluetooth HID devices with special magic to switch the device > - # > ------------------------------------------------------------------------------ > -@@ -416,7 +424,9 @@ extras_hid2hci_hid2hci_CPPFLAGS = $(AM_C > - extras_hid2hci_hid2hci_LDADD = libudev/libudev-private.la $(LIBUSB_LIBS) > - dist_udevrules_DATA += extras/hid2hci/70-hid2hci.rules > - libexec_PROGRAMS += extras/hid2hci/hid2hci > -+endif # ENABLE_BLUETOOTH > - > -+if ENABLE_ACL > - # > ------------------------------------------------------------------------------ > - # udev_acl - apply ACLs for users with local forground sessions > - # > ------------------------------------------------------------------------------ > -@@ -431,7 +441,9 @@ udevacl-install-hook: > - ln -sf $(libexecdir)/udev-acl > $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck > - > - INSTALL_EXEC_HOOKS += udevacl-install-hook > -+endif # ENABLE_ACL > - > -+if ENABLE_USBDB > - # > ------------------------------------------------------------------------------ > - # usb-db - read USB vendor/device string database > - # > ------------------------------------------------------------------------------ > -@@ -439,7 +451,9 @@ extras_usb_db_usb_db_SOURCES = extras/us > - extras_usb_db_usb_db_CPPFLAGS = $(AM_CPPFLAGS) > -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB > - extras_usb_db_usb_db_LDADD = libudev/libudev-private.la > - libexec_PROGRAMS += extras/usb-db/usb-db > -+endif # ENABLE_USBDB > - > -+if ENABLE_PCIDB > - # > ------------------------------------------------------------------------------ > - # pci-db - read PCI vendor/device string database > - # > ------------------------------------------------------------------------------ > -@@ -447,7 +461,9 @@ extras_usb_db_pci_db_SOURCES = extras/us > - extras_usb_db_pci_db_CPPFLAGS = $(AM_CPPFLAGS) > -DPCI_DATABASE=\"$(PCI_DATABASE)\" -DBUILD_FOR_PCI > - extras_usb_db_pci_db_LDADD = libudev/libudev-private.la > - libexec_PROGRAMS += extras/usb-db/pci-db > -+endif # ENABLE_PCIDB > - > -+if ENABLE_MOBILE_ACTION_MODESWITCH > - # > ------------------------------------------------------------------------------ > - # mobile-action-modeswitch - switch Mobile Action cables into serial mode > - # > ------------------------------------------------------------------------------ > -@@ -464,7 +480,9 @@ dist_udevrules_DATA += \ > - extras/mobile-action-modeswitch/61-mobile-action.rules > - > - libexec_PROGRAMS += extras/mobile-action-modeswitch/mobile-action-modeswitch > -+endif # ENABLE_MOBILE_ACTION_MODESWITCH > - > -+if ENABLE_KEYMAP > - # > ------------------------------------------------------------------------------ > - # mtd_probe - autoloads FTL module for mtd devices > - # > ------------------------------------------------------------------------------ > -@@ -574,8 +592,7 @@ extras/keymap/keys-to-name.h: extras/key > - keymaps-distcheck-hook: extras/keymap/keys.txt > - $(top_srcdir)/extras/keymap/check-keymaps.sh $(top_srcdir) $^ > - DISTCHECK_HOOKS = keymaps-distcheck-hook > -- > --endif # ENABLE_EXTRAS > -+endif # ENABLE_KEYMAP > - > - # > ------------------------------------------------------------------------------ > - # install, uninstall, clean hooks > -Index: b/configure.ac > -=================================================================== > ---- a/configure.ac > -+++ b/configure.ac > -@@ -64,29 +64,68 @@ done > - IFS=$OLD_IFS > - AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) > - > --AC_ARG_ENABLE([extras], > -- AS_HELP_STRING([--disable-extras], [disable extras with external > dependencies]), > -- [], [enable_extras=yes]) > --if test "x$enable_extras" = xyes; then > -+AC_ARG_ENABLE([gudev], > -+ AS_HELP_STRING([--disable-gudev], [disable libgudev - libudev gobject > interface]), > -+ [], [enable_gudev=yes]) > -+AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = xyes]) > -+AC_ARG_ENABLE([bluetooth], > -+ AS_HELP_STRING([--disable-bluetooth], [disable Bluetooth HID devices > with special magic to switch the device]), > -+ [], [enable_bluetooth=yes]) > -+AM_CONDITIONAL([ENABLE_BLUETOOTH], [test "x$enable_bluetooth" = xyes]) > -+AC_ARG_ENABLE([keymap], > -+ AS_HELP_STRING([--disable-keymap], [disable keymap - map custom > hardware's multimedia keys]), > -+ [], [enable_keymap=yes]) > -+AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = xyes]) > -+AC_ARG_ENABLE([acl], > -+ AS_HELP_STRING([--disable-acl], [disable udev_acl - apply ACLs for > users with local forground sessions]), > -+ [], [enable_acl=yes]) > -+AM_CONDITIONAL([ENABLE_ACL], [test "x$enable_acl" = xyes]) > -+AC_ARG_ENABLE([usbdb], > -+ AS_HELP_STRING([--disable-usbdb], [disable usb-db - read USB > vendor/device string database]), > -+ [], [enable_usbdb=yes]) > -+AM_CONDITIONAL([ENABLE_USBDB], [test "x$enable_usbdb" = xyes]) > -+AC_ARG_ENABLE([pcidb], > -+ AS_HELP_STRING([--disable-pcidb], [disable pci-db - read PCI > vendor/device string database]), > -+ [], [enable_pcidb=yes]) > -+AM_CONDITIONAL([ENABLE_PCIDB], [test "x$enable_pcidb" = xyes]) > -+AC_ARG_ENABLE([mobile-action-modeswitch], > -+ AS_HELP_STRING([--disable-mobile-action-modeswitch], [disable > mobile-action-modeswitch - switch Mobile Action cables into serial mode]), > -+ [], [enable_mobile_action_modeswitch=yes]) > -+AM_CONDITIONAL([ENABLE_MOBILE_ACTION_MODESWITCH], [test > "x$enable_mobile_action_modeswitch" = xyes]) > -+ > -+if test "x$enable_keymap" = xyes; then > - AC_PATH_PROG([GPERF], [gperf]) > - if test -z "$GPERF"; then > - AC_MSG_ERROR([gperf is needed]) > - fi > - > -+ AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not > found])) > -+ AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval > $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; > q}')]) > -+fi > -+ > -+if test "x$enable_gudev" = xyes -o "x$enable_acl" = xyes; then > - PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.7.0 gobject-2.0 >= 2.7.0]) > - AC_SUBST([GLIB_CFLAGS]) > - AC_SUBST([GLIB_LIBS]) > -+fi > - > -+if test "x$enable_acl" = xyes; then > - AC_CHECK_LIB([acl], [acl_init], [:], AC_MSG_ERROR([libacl not found])) > - AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not > found])) > -+fi > - > -+if test "x$enable_bluetooth" = xyes -o "x$enable_mobile_action_modeswitch" > = xyes; then > - PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12) > - AC_SUBST(LIBUSB_CFLAGS) > - AC_SUBST(LIBUSB_LIBS) > -+fi > - > -+if test "x$enable_usbdb" = xyes; then > - PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82) > - AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)]) > -+fi > - > -+if test "x$enable_pcidb" = xyes; then > - if test "x$cross_compiling" = "xno" ; then > - AC_CHECK_FILES([/usr/share/pci.ids], > [pciids=/usr/share/pci.ids]) > - AC_CHECK_FILES([/usr/share/hwdata/pci.ids], > [pciids=/usr/share/hwdata/pci.ids]) > -@@ -103,11 +142,9 @@ if test "x$enable_extras" = xyes; then > - AC_MSG_CHECKING([for PCI database location]) > - AC_MSG_RESULT([$PCI_DATABASE]) > - AC_SUBST(PCI_DATABASE) > -- > -- AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not > found])) > -- AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval > $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; > q}')]) > -+else > -+ PCI_DATABASE=no > - fi > --AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes]) > - > - AC_ARG_ENABLE([introspection], > - AS_HELP_STRING([--disable-introspection], [disable GObject > introspection]), > -@@ -161,7 +198,11 @@ AC_MSG_RESULT([ > - cflags: ${CFLAGS} > - ldflags: ${LDFLAGS} > - > -- extras: ${enable_extras} > -+ gudev: ${enable_gudev} > -+ bluetooth: ${enable_bluetooth} > -+ keymap: ${enable_keymap} > -+ acl: ${enable_acl} > -+ mobile-action-modeswitch: ${enable_mobile_action_modeswitch} > - gintrospection: ${enable_introspection} > - > - usb.ids: ${USB_DATABASE} > diff --git a/patches/udev-161/autogen.sh b/patches/udev-161/autogen.sh > new file mode 100755 > index 0000000..a14cd51 > --- /dev/null > +++ b/patches/udev-161/autogen.sh > @@ -0,0 +1,9 @@ > +#!/bin/bash > + > +autoreconf \ > + --force \ > + --install \ > + --warnings=syntax \ > + --warnings=obsolete \ > + --warnings=unsupported > + > diff --git a/patches/udev-161/remove-SOCK_CLOEXEC.diff > b/patches/udev-161/remove-SOCK_CLOEXEC.diff > new file mode 100644 > index 0000000..7314def > --- /dev/null > +++ b/patches/udev-161/remove-SOCK_CLOEXEC.diff > @@ -0,0 +1,30 @@ > +From: Michael Olbrich <m.olbr...@pengutronix.de> > +Subject: HACK: remove SOCK_CLOEXEC usage > + > +SOCK_CLOEXEC is not supported by OSELAS.Toolchain-1.99.3 > + > +Not for upstream. > + > +Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > + > +--- > + udev/udevd.c | 3 ++- > + 1 file changed, 2 insertions(+), 1 deletion(-) > + > +Index: udev-161/udev/udevd.c > +=================================================================== > +--- udev-161.orig/udev/udevd.c > ++++ udev-161/udev/udevd.c > +@@ -987,10 +987,11 @@ static int init_notify(const char *state > + goto finish; > + } > + > +- if ((fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0)) < 0) { > ++ if ((fd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) { > + r = -errno; > + goto finish; > + } > ++ util_set_fd_cloexec(fd); > + > + memset(&sockaddr, 0, sizeof(sockaddr)); > + sockaddr.sa.sa_family = AF_UNIX; > diff --git a/patches/udev-161/series b/patches/udev-161/series > new file mode 100644 > index 0000000..cbfcdab > --- /dev/null > +++ b/patches/udev-161/series > @@ -0,0 +1,5 @@ > +udev-150-split-extras.diff > +udev-150-revert-SOCK_CLOEXEC.diff > +udev-150-revert-bsg_h-removal.diff > +udev-150-remove-le16toh.diff > +remove-SOCK_CLOEXEC.diff > diff --git a/patches/udev-161/udev-150-remove-le16toh.diff > b/patches/udev-161/udev-150-remove-le16toh.diff > new file mode 100644 > index 0000000..c595651 > --- /dev/null > +++ b/patches/udev-161/udev-150-remove-le16toh.diff > @@ -0,0 +1,30 @@ > +From: Michael Olbrich <m.olbr...@pengutronix.de> > +Subject: HACK: remove le16toh usage > + > +le16toh is not supported by OSELAS.Toolchain-1.99.3 > + > +Not for upstream. > + > +Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > + > +--- > + extras/ata_id/ata_id.c | 6 +++++- > + 1 file changed, 5 insertions(+), 1 deletion(-) > + > +Index: udev-161/extras/ata_id/ata_id.c > +=================================================================== > +--- udev-161.orig/extras/ata_id/ata_id.c > ++++ udev-161/extras/ata_id/ata_id.c > +@@ -167,7 +167,11 @@ static void disk_identify_fixup_uint16 ( > + uint16_t *p; > + > + p = (uint16_t *) identify; > +- p[offset_words] = le16toh (p[offset_words]); > ++#if __BYTE_ORDER == __LITTLE_ENDIAN > ++ p[offset_words] = p[offset_words]; > ++#else > ++ p[offset_words] = __bswap_16 (p[offset_words]); > ++#endif > + } > + > + /** > diff --git a/patches/udev-161/udev-150-revert-SOCK_CLOEXEC.diff > b/patches/udev-161/udev-150-revert-SOCK_CLOEXEC.diff > new file mode 100644 > index 0000000..abcd51e > --- /dev/null > +++ b/patches/udev-161/udev-150-revert-SOCK_CLOEXEC.diff > @@ -0,0 +1,129 @@ > +From: Michael Olbrich <m.olbr...@pengutronix.de> > +Subject: HACK: revert 26347a4c5538008318188118872490128f43fcd3 (don't use > SOCK_CLOEXEC) > + > +SOCK_CLOEXEC is not defined by the glibc in OSELAS.Toolchain-1.99.3 > + > +Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > + > +--- > + libudev/libudev-monitor.c | 6 ++++-- > + libudev/libudev-private.h | 1 + > + libudev/libudev-util.c | 12 ++++++++++++ > + udev/udev-watch.c | 6 ++++-- > + udev/udevd.c | 4 +++- > + 5 files changed, 24 insertions(+), 5 deletions(-) > + > +Index: udev-161/libudev/libudev-monitor.c > +=================================================================== > +--- udev-161.orig/libudev/libudev-monitor.c > ++++ udev-161/libudev/libudev-monitor.c > +@@ -144,12 +144,13 @@ struct udev_monitor *udev_monitor_new_fr > + util_strscpy(&udev_monitor->sun.sun_path[1], > sizeof(udev_monitor->sun.sun_path)-1, socket_path); > + udev_monitor->addrlen = offsetof(struct sockaddr_un, sun_path) > + strlen(socket_path)+1; > + } > +- udev_monitor->sock = socket(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0); > ++ udev_monitor->sock = socket(AF_LOCAL, SOCK_DGRAM, 0); > + if (udev_monitor->sock == -1) { > + err(udev, "error getting socket: %m\n"); > + free(udev_monitor); > + return NULL; > + } > ++ util_set_fd_cloexec(udev_monitor->sock); > + > + dbg(udev, "monitor %p created with '%s'\n", udev_monitor, socket_path); > + return udev_monitor; > +@@ -201,12 +202,13 @@ struct udev_monitor *udev_monitor_new_fr > + if (udev_monitor == NULL) > + return NULL; > + > +- udev_monitor->sock = socket(PF_NETLINK, SOCK_DGRAM|SOCK_CLOEXEC, > NETLINK_KOBJECT_UEVENT); > ++ udev_monitor->sock = socket(PF_NETLINK, SOCK_DGRAM, > NETLINK_KOBJECT_UEVENT); > + if (udev_monitor->sock == -1) { > + err(udev, "error getting socket: %m\n"); > + free(udev_monitor); > + return NULL; > + } > ++ util_set_fd_cloexec(udev_monitor->sock); > + > + udev_monitor->snl.nl_family = AF_NETLINK; > + udev_monitor->snl.nl_groups = group; > +Index: udev-161/libudev/libudev-private.h > +=================================================================== > +--- udev-161.orig/libudev/libudev-private.h > ++++ udev-161/libudev/libudev-private.h > +@@ -205,6 +205,7 @@ size_t util_strscpyl(char *dest, size_t > + int udev_util_replace_whitespace(const char *str, char *to, size_t len); > + int udev_util_replace_chars(char *str, const char *white); > + int udev_util_encode_string(const char *str, char *str_enc, size_t len); > ++void util_set_fd_cloexec(int fd); > + unsigned int util_string_hash32(const char *key); > + uint64_t util_string_bloom64(const char *str); > + > +Index: udev-161/libudev/libudev-util.c > +=================================================================== > +--- udev-161.orig/libudev/libudev-util.c > ++++ udev-161/libudev/libudev-util.c > +@@ -535,6 +535,18 @@ static unsigned int murmur_hash2(const c > + return h; > + } > + > ++void util_set_fd_cloexec(int fd) > ++{ > ++ int flags; > ++ > ++ flags = fcntl(fd, F_GETFD); > ++ if (flags < 0) > ++ flags = FD_CLOEXEC; > ++ else > ++ flags |= FD_CLOEXEC; > ++ fcntl(fd, F_SETFD, flags); > ++} > ++ > + unsigned int util_string_hash32(const char *str) > + { > + return murmur_hash2(str, strlen(str), 0); > +Index: udev-161/udev/udev-watch.c > +=================================================================== > +--- udev-161.orig/udev/udev-watch.c > ++++ udev-161/udev/udev-watch.c > +@@ -38,8 +38,10 @@ static int inotify_fd = -1; > + */ > + int udev_watch_init(struct udev *udev) > + { > +- inotify_fd = inotify_init1(IN_CLOEXEC); > +- if (inotify_fd < 0) > ++ inotify_fd = inotify_init(); > ++ if (inotify_fd >= 0) > ++ util_set_fd_cloexec(inotify_fd); > ++ else > + err(udev, "inotify_init failed: %m\n"); > + return inotify_fd; > + } > +Index: udev-161/udev/udevd.c > +=================================================================== > +--- udev-161.orig/udev/udevd.c > ++++ udev-161/udev/udevd.c > +@@ -225,6 +225,7 @@ static void worker_new(struct event *eve > + /* allow the main daemon netlink address to send devices to the worker > */ > + udev_monitor_allow_unicast_sender(worker_monitor, monitor); > + udev_monitor_enable_receiving(worker_monitor); > ++ util_set_fd_cloexec(udev_monitor_get_fd(worker_monitor)); > + > + worker = calloc(1, sizeof(struct worker)); > + if (worker == NULL) { > +@@ -1244,13 +1245,14 @@ int main(int argc, char *argv[]) > + } > + > + /* unnamed socket from workers to the main daemon */ > +- if (socketpair(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0, worker_watch) < 0) > { > ++ if (socketpair(AF_LOCAL, SOCK_DGRAM, 0, worker_watch) < 0) { > + fprintf(stderr, "error getting socketpair\n"); > + err(udev, "error getting socketpair\n"); > + rc = 6; > + goto exit; > + } > + pfd[FD_WORKER].fd = worker_watch[READ_END]; > ++ util_set_fd_cloexec(worker_watch[WRITE_END]); > + > + rules = udev_rules_new(udev, resolve_names); > + if (rules == NULL) { > diff --git a/patches/udev-161/udev-150-revert-bsg_h-removal.diff > b/patches/udev-161/udev-150-revert-bsg_h-removal.diff > new file mode 100644 > index 0000000..2a15394 > --- /dev/null > +++ b/patches/udev-161/udev-150-revert-bsg_h-removal.diff > @@ -0,0 +1,130 @@ > +From: Michael Olbrich <m.olbr...@pengutronix.de> > +Subject: HACK: revert 24355313dc9686a14a618fcd9bbdedc29c57b651 (readd bsg.h) > + > +Readd bsg.h which is not part of the kernel headers in > OSELAS.Toolchain-1.99.3 > + > +Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > + > +--- > + Makefile.am | 3 + > + extras/scsi_id/bsg.h | 84 > +++++++++++++++++++++++++++++++++++++++++++ > + extras/scsi_id/scsi_serial.c | 3 + > + 3 files changed, 88 insertions(+), 2 deletions(-) > + > +Index: udev-161/Makefile.am > +=================================================================== > +--- udev-161.orig/Makefile.am > ++++ udev-161/Makefile.am > +@@ -272,7 +272,8 @@ extras_scsi_id_scsi_id_SOURCES =\ > + extras/scsi_id/scsi_id.c \ > + extras/scsi_id/scsi_serial.c \ > + extras/scsi_id/scsi.h \ > +- extras/scsi_id/scsi_id.h > ++ extras/scsi_id/scsi_id.h \ > ++ extras/scsi_id/bsg.h > + extras_scsi_id_scsi_id_LDADD = libudev/libudev-private.la > + libexec_PROGRAMS += extras/scsi_id/scsi_id > + dist_man_MANS += extras/scsi_id/scsi_id.8 > +Index: udev-161/extras/scsi_id/bsg.h > +=================================================================== > +--- /dev/null > ++++ udev-161/extras/scsi_id/bsg.h > +@@ -0,0 +1,84 @@ > ++#ifndef BSG_H > ++#define BSG_H > ++ > ++#define BSG_PROTOCOL_SCSI 0 > ++ > ++#define BSG_SUB_PROTOCOL_SCSI_CMD 0 > ++#define BSG_SUB_PROTOCOL_SCSI_TMF 1 > ++#define BSG_SUB_PROTOCOL_SCSI_TRANSPORT 2 > ++ > ++struct sg_io_v4 { > ++ __s32 guard; /* [i] 'Q' to differentiate from v3 */ > ++ __u32 protocol; /* [i] 0 -> SCSI , .... */ > ++ __u32 subprotocol; /* [i] 0 -> SCSI command, 1 -> SCSI task > ++ management function, .... */ > ++ > ++ __u32 request_len; /* [i] in bytes */ > ++ __u64 request; /* [i], [*i] {SCSI: cdb} */ > ++ __u64 request_tag; /* [i] {SCSI: task tag (only if flagged)} */ > ++ __u32 request_attr; /* [i] {SCSI: task attribute} */ > ++ __u32 request_priority; /* [i] {SCSI: task priority} */ > ++ __u32 request_extra; /* [i] {spare, for padding} */ > ++ __u32 max_response_len; /* [i] in bytes */ > ++ __u64 response; /* [i], [*o] {SCSI: (auto)sense data} */ > ++ > ++ /* "dout_": data out (to device); "din_": data in (from device) */ > ++ __u32 dout_iovec_count; /* [i] 0 -> "flat" dout transfer else > ++ dout_xfer points to array of iovec */ > ++ __u32 dout_xfer_len; /* [i] bytes to be transferred to device */ > ++ __u32 din_iovec_count; /* [i] 0 -> "flat" din transfer */ > ++ __u32 din_xfer_len; /* [i] bytes to be transferred from device */ > ++ __u64 dout_xferp; /* [i], [*i] */ > ++ __u64 din_xferp; /* [i], [*o] */ > ++ > ++ __u32 timeout; /* [i] units: millisecond */ > ++ __u32 flags; /* [i] bit mask */ > ++ __u64 usr_ptr; /* [i->o] unused internally */ > ++ __u32 spare_in; /* [i] */ > ++ > ++ __u32 driver_status; /* [o] 0 -> ok */ > ++ __u32 transport_status; /* [o] 0 -> ok */ > ++ __u32 device_status; /* [o] {SCSI: command completion status} */ > ++ __u32 retry_delay; /* [o] {SCSI: status auxiliary information} */ > ++ __u32 info; /* [o] additional information */ > ++ __u32 duration; /* [o] time to complete, in milliseconds */ > ++ __u32 response_len; /* [o] bytes of response actually written */ > ++ __s32 din_resid; /* [o] din_xfer_len - actual_din_xfer_len */ > ++ __s32 dout_resid; /* [o] dout_xfer_len - actual_dout_xfer_len */ > ++ __u64 generated_tag; /* [o] {SCSI: transport generated task tag} */ > ++ __u32 spare_out; /* [o] */ > ++ > ++ __u32 padding; > ++}; > ++ > ++#ifdef __KERNEL__ > ++ > ++#if defined(CONFIG_BLK_DEV_BSG) > ++struct bsg_class_device { > ++ struct device *class_dev; > ++ struct device *parent; > ++ int minor; > ++ struct request_queue *queue; > ++ struct kref ref; > ++ void (*release)(struct device *); > ++}; > ++ > ++extern int bsg_register_queue(struct request_queue *q, > ++ struct device *parent, const char *name, > ++ void (*release)(struct device *)); > ++extern void bsg_unregister_queue(struct request_queue *); > ++#else > ++static inline int bsg_register_queue(struct request_queue *q, > ++ struct device *parent, const char *name, > ++ void (*release)(struct device *)) > ++{ > ++ return 0; > ++} > ++static inline void bsg_unregister_queue(struct request_queue *q) > ++{ > ++} > ++#endif > ++ > ++#endif /* __KERNEL__ */ > ++ > ++#endif > +Index: udev-161/extras/scsi_id/scsi_serial.c > +=================================================================== > +--- udev-161.orig/extras/scsi_id/scsi_serial.c > ++++ udev-161/extras/scsi_id/scsi_serial.c > +@@ -32,7 +32,8 @@ > + #include <scsi/scsi.h> > + #include <scsi/sg.h> > + #include <linux/types.h> > +-#include <linux/bsg.h> > ++/* #include <linux/bsg.h> */ > ++#include "bsg.h" > + > + #include "libudev.h" > + #include "libudev-private.h" > diff --git a/patches/udev-161/udev-150-split-extras.diff > b/patches/udev-161/udev-150-split-extras.diff > new file mode 100644 > index 0000000..5702dcf > --- /dev/null > +++ b/patches/udev-161/udev-150-split-extras.diff > @@ -0,0 +1,233 @@ > +From: Michael Olbrich <m.olbr...@pengutronix.de> > +Subject: split enabling extras with dependencies > + > +This patch patch makes it possible to enable all extras with external > +dependencies individually. It replaces: > + --disable-extras > +with > + --disable-gudev > + --disable-bluetooth > + --disable-keymap > + --disable-acl > + --disable-usbdb > + --disable-pcidb > + --disable-modem-modeswitch > +as configure options > + > +Signed-off-by: Michael Olbrich <m.olbr...@pengutronix.de> > + > +--- > + Makefile.am | 25 +++++++++++++++++++++---- > + configure.ac | 59 > ++++++++++++++++++++++++++++++++++++++++++++++++++--------- > + 2 files changed, 71 insertions(+), 13 deletions(-) > + > +Index: udev-161/Makefile.am > +=================================================================== > +--- udev-161.orig/Makefile.am > ++++ udev-161/Makefile.am > +@@ -292,7 +292,8 @@ extras_v4l_id_v4l_id_LDADD = libudev/lib > + libexec_PROGRAMS += extras/v4l_id/v4l_id > + dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules > + > +-if ENABLE_EXTRAS > ++if ENABLE_USBDB > ++if ENABLE_PCIDB > + # > ------------------------------------------------------------------------------ > + # conditional extras (need glib, libusb, libacl, ...) > + # > ------------------------------------------------------------------------------ > +@@ -300,7 +301,12 @@ dist_udevrules_DATA += \ > + rules/rules.d/75-net-description.rules \ > + rules/rules.d/75-tty-description.rules \ > + rules/rules.d/78-sound-card.rules > ++endif # ENABLE_PCIDB > ++endif # ENABLE_USBDB > + > ++BUILT_SOURCES = > ++ > ++if ENABLE_GUDEV > + # > ------------------------------------------------------------------------------ > + # GUdev - libudev gobject interface > + # > ------------------------------------------------------------------------------ > +@@ -338,7 +344,7 @@ dist_extras_gudev_libgudev_1_0_la_SOURCE > + extras/gudev/gudevmarshal.c \ > + extras/gudev/gudevenumtypes.h \ > + extras/gudev/gudevenumtypes.c > +-BUILT_SOURCES = $(dist_extras_gudev_libgudev_1_0_la_SOURCES) > ++BUILT_SOURCES += $(dist_extras_gudev_libgudev_1_0_la_SOURCES) > + > + extras_gudev_libgudev_1_0_la_CPPFLAGS = \ > + $(AM_CPPFLAGS) \ > +@@ -415,7 +421,9 @@ typelibs_DATA = extras/gudev/GUdev-1.0.t > + > + CLEANFILES += $(gir_DATA) $(typelibs_DATA) > + endif # ENABLE_INTROSPECTION > ++endif # ENABLE_GUDEV > + > ++if ENABLE_BLUETOOTH > + # > ------------------------------------------------------------------------------ > + # Bluetooth HID devices with special magic to switch the device > + # > ------------------------------------------------------------------------------ > +@@ -424,7 +432,9 @@ extras_hid2hci_hid2hci_CPPFLAGS = $(AM_C > + extras_hid2hci_hid2hci_LDADD = libudev/libudev-private.la $(LIBUSB_LIBS) > + dist_udevrules_DATA += extras/hid2hci/70-hid2hci.rules > + libexec_PROGRAMS += extras/hid2hci/hid2hci > ++endif # ENABLE_BLUETOOTH > + > ++if ENABLE_ACL > + # > ------------------------------------------------------------------------------ > + # udev_acl - apply ACLs for users with local forground sessions > + # > ------------------------------------------------------------------------------ > +@@ -439,7 +449,9 @@ udevacl-install-hook: > + ln -sf $(libexecdir)/udev-acl > $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck > + > + INSTALL_EXEC_HOOKS += udevacl-install-hook > ++endif # ENABLE_ACL > + > ++if ENABLE_USBDB > + # > ------------------------------------------------------------------------------ > + # usb-db - read USB vendor/device string database > + # > ------------------------------------------------------------------------------ > +@@ -447,7 +459,9 @@ extras_usb_db_usb_db_SOURCES = extras/us > + extras_usb_db_usb_db_CPPFLAGS = $(AM_CPPFLAGS) > -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB > + extras_usb_db_usb_db_LDADD = libudev/libudev-private.la > + libexec_PROGRAMS += extras/usb-db/usb-db > ++endif # ENABLE_USBDB > + > ++if ENABLE_PCIDB > + # > ------------------------------------------------------------------------------ > + # pci-db - read PCI vendor/device string database > + # > ------------------------------------------------------------------------------ > +@@ -455,7 +469,9 @@ extras_usb_db_pci_db_SOURCES = extras/us > + extras_usb_db_pci_db_CPPFLAGS = $(AM_CPPFLAGS) > -DPCI_DATABASE=\"$(PCI_DATABASE)\" -DBUILD_FOR_PCI > + extras_usb_db_pci_db_LDADD = libudev/libudev-private.la > + libexec_PROGRAMS += extras/usb-db/pci-db > ++endif # ENABLE_PCIDB > + > ++if ENABLE_MOBILE_ACTION_MODESWITCH > + # > ------------------------------------------------------------------------------ > + # mobile-action-modeswitch - switch Mobile Action cables into serial mode > + # > ------------------------------------------------------------------------------ > +@@ -472,7 +488,9 @@ dist_udevrules_DATA += \ > + extras/mobile-action-modeswitch/61-mobile-action.rules > + > + libexec_PROGRAMS += extras/mobile-action-modeswitch/mobile-action-modeswitch > ++endif # ENABLE_MOBILE_ACTION_MODESWITCH > + > ++if ENABLE_KEYMAP > + # > ------------------------------------------------------------------------------ > + # mtd_probe - autoloads FTL module for mtd devices > + # > ------------------------------------------------------------------------------ > +@@ -584,8 +602,7 @@ extras/keymap/keys-to-name.h: extras/key > + keymaps-distcheck-hook: extras/keymap/keys.txt > + $(top_srcdir)/extras/keymap/check-keymaps.sh $(top_srcdir) $^ > + DISTCHECK_HOOKS = keymaps-distcheck-hook > +- > +-endif # ENABLE_EXTRAS > ++endif # ENABLE_KEYMAP > + > + # > ------------------------------------------------------------------------------ > + # install, uninstall, clean hooks > +Index: udev-161/configure.ac > +=================================================================== > +--- udev-161.orig/configure.ac > ++++ udev-161/configure.ac > +@@ -69,29 +69,68 @@ AC_ARG_WITH([systemdsystemunitdir], > + AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) > + AM_CONDITIONAL(WITH_SYSTEMD, [test -n "$with_systemdsystemunitdir"]) > + > +-AC_ARG_ENABLE([extras], > +- AS_HELP_STRING([--disable-extras], [disable extras with external > dependencies]), > +- [], [enable_extras=yes]) > +-if test "x$enable_extras" = xyes; then > ++AC_ARG_ENABLE([gudev], > ++ AS_HELP_STRING([--disable-gudev], [disable libgudev - libudev gobject > interface]), > ++ [], [enable_gudev=yes]) > ++AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = xyes]) > ++AC_ARG_ENABLE([bluetooth], > ++ AS_HELP_STRING([--disable-bluetooth], [disable Bluetooth HID devices > with special magic to switch the device]), > ++ [], [enable_bluetooth=yes]) > ++AM_CONDITIONAL([ENABLE_BLUETOOTH], [test "x$enable_bluetooth" = xyes]) > ++AC_ARG_ENABLE([keymap], > ++ AS_HELP_STRING([--disable-keymap], [disable keymap - map custom > hardware's multimedia keys]), > ++ [], [enable_keymap=yes]) > ++AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = xyes]) > ++AC_ARG_ENABLE([acl], > ++ AS_HELP_STRING([--disable-acl], [disable udev_acl - apply ACLs for > users with local forground sessions]), > ++ [], [enable_acl=yes]) > ++AM_CONDITIONAL([ENABLE_ACL], [test "x$enable_acl" = xyes]) > ++AC_ARG_ENABLE([usbdb], > ++ AS_HELP_STRING([--disable-usbdb], [disable usb-db - read USB > vendor/device string database]), > ++ [], [enable_usbdb=yes]) > ++AM_CONDITIONAL([ENABLE_USBDB], [test "x$enable_usbdb" = xyes]) > ++AC_ARG_ENABLE([pcidb], > ++ AS_HELP_STRING([--disable-pcidb], [disable pci-db - read PCI > vendor/device string database]), > ++ [], [enable_pcidb=yes]) > ++AM_CONDITIONAL([ENABLE_PCIDB], [test "x$enable_pcidb" = xyes]) > ++AC_ARG_ENABLE([mobile-action-modeswitch], > ++ AS_HELP_STRING([--disable-mobile-action-modeswitch], [disable > mobile-action-modeswitch - switch Mobile Action cables into serial mode]), > ++ [], [enable_mobile_action_modeswitch=yes]) > ++AM_CONDITIONAL([ENABLE_MOBILE_ACTION_MODESWITCH], [test > "x$enable_mobile_action_modeswitch" = xyes]) > ++ > ++if test "x$enable_keymap" = xyes; then > + AC_PATH_PROG([GPERF], [gperf]) > + if test -z "$GPERF"; then > + AC_MSG_ERROR([gperf is needed]) > + fi > + > ++ AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not > found])) > ++ AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval > $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; > q}')]) > ++fi > ++ > ++if test "x$enable_gudev" = xyes -o "x$enable_acl" = xyes; then > + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.7.0 gobject-2.0 >= 2.7.0]) > + AC_SUBST([GLIB_CFLAGS]) > + AC_SUBST([GLIB_LIBS]) > ++fi > + > ++if test "x$enable_acl" = xyes; then > + AC_CHECK_LIB([acl], [acl_init], [:], AC_MSG_ERROR([libacl not found])) > + AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not > found])) > ++fi > + > ++if test "x$enable_bluetooth" = xyes -o "x$enable_mobile_action_modeswitch" > = xyes; then > + PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12) > + AC_SUBST(LIBUSB_CFLAGS) > + AC_SUBST(LIBUSB_LIBS) > ++fi > + > ++if test "x$enable_usbdb" = xyes; then > + PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82) > + AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)]) > ++fi > + > ++if test "x$enable_pcidb" = xyes; then > + if test "x$cross_compiling" = "xno" ; then > + AC_CHECK_FILES([/usr/share/pci.ids], > [pciids=/usr/share/pci.ids]) > + AC_CHECK_FILES([/usr/share/hwdata/pci.ids], > [pciids=/usr/share/hwdata/pci.ids]) > +@@ -108,11 +147,9 @@ if test "x$enable_extras" = xyes; then > + AC_MSG_CHECKING([for PCI database location]) > + AC_MSG_RESULT([$PCI_DATABASE]) > + AC_SUBST(PCI_DATABASE) > +- > +- AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not > found])) > +- AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval > $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; > q}')]) > ++else > ++ PCI_DATABASE=no > + fi > +-AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes]) > + > + AC_ARG_ENABLE([introspection], > + AS_HELP_STRING([--disable-introspection], [disable GObject > introspection]), > +@@ -171,7 +208,11 @@ AC_MSG_RESULT([ > + cflags: ${CFLAGS} > + ldflags: ${LDFLAGS} > + > +- extras: ${enable_extras} > ++ gudev: ${enable_gudev} > ++ bluetooth: ${enable_bluetooth} > ++ keymap: ${enable_keymap} > ++ acl: ${enable_acl} > ++ mobile-action-modeswitch: ${enable_mobile_action_modeswitch} > + gintrospection: ${enable_introspection} > + > + usb.ids: ${USB_DATABASE} > diff --git a/rules/udev.make b/rules/udev.make > index b4834ca..7037a0e 100644 > --- a/rules/udev.make > +++ b/rules/udev.make > @@ -16,7 +16,7 @@ PACKAGES-$(PTXCONF_UDEV) += udev > # > # Paths and names > # > -UDEV_VERSION := 160 > +UDEV_VERSION := 161 > UDEV := udev-$(UDEV_VERSION) > UDEV_SUFFIX := tar.bz2 > UDEV_SOURCE := $(SRCDIR)/$(UDEV).$(UDEV_SUFFIX) > -- > 1.7.1 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de