Carsten, please see comments bellow.

On Thu, Jan 07, 2010 at 06:36:43PM +0100, carsten.schl...@gmx.net wrote:
> From: Carsten Schlote <c.schl...@konzeptpark.de>
> 
> Required for latest upstart 0.6.3
> 
> Signed-off-by: Carsten Schlote <c.schl...@konzeptpark.de>
> ---
>  patches/udev-147/autogen.sh             |   16 +++++++

Wouldn't be better to update directly to version 150?

>  patches/udev-147/fix-crosscompile.patch |   21 +++++++++
>  patches/udev-147/series                 |    1 +
>  rules/udev.in                           |   41 ++++++++++++++++-
>  rules/udev.make                         |   72 
> +++++++++++++++++++++++--------
>  5 files changed, 130 insertions(+), 21 deletions(-)
>  create mode 100644 patches/udev-147/autogen.sh
>  create mode 100644 patches/udev-147/fix-crosscompile.patch
>  create mode 100644 patches/udev-147/series
...
> diff --git a/rules/udev.in b/rules/udev.in
> index 58db642..e68a26a 100644
> --- a/rules/udev.in
> +++ b/rules/udev.in
> @@ -2,7 +2,13 @@
>  menuconfig UDEV
>       tristate
>       prompt "udev                          "
> +     select HOST_GPERF
>       select ROOTFS_DEV
> +     select ACL
> +     select USBUTILS
> +     select LIBUSB_COMPAT
> +     select PCIUTILS 

That seems to be overkill and should be probably mopre finegrained. This way
dependency list grow too much.

> +     #select GOBJECT_INTROSPECTION   # Broken in-trre build tools!
>       help
>         udev provides a dynamic device directory containing only the files for
>         actually present devices. It creates or removes device node files in 
> the
> @@ -98,6 +104,12 @@ menu "extras                        "
>                 udev callout to create a device path based unique name for a 
> device to
>                 implement the Linux Persistent Device Naming scheme
>  
> +     config UDEV__EXTRA_PCI_DB
> +             bool
> +             prompt "pci-db"
> +             help
> +               FIXME
> +
>       config UDEV__EXTRA_RULE_GENERATOR
>               bool
>               prompt "rule_generator"
> @@ -110,6 +122,18 @@ menu "extras                        "
>               help
>                 Used to build unique IDs for an SCSI media to identify it 
> again
>  
> +     config UDEV__EXTRA_UDEV_ACL
> +             bool
> +             prompt "udev-acl"
> +             help
> +               FIXME
> +
> +     config UDEV__EXTRA_USB_DB
> +             bool
> +             prompt "usb-db"
> +             help
> +               FIXME
> +
>       config UDEV__EXTRA_USB_ID
>               bool
>               prompt "usb_id"
> @@ -118,9 +142,9 @@ menu "extras                        "
>                   USB device. This is required to ensure the same hotplugged 
> device to
>                   appear always at the same device node (via link)
>  
> -     config UDEV__EXTRA_VOLUME_ID
> +     config UDEV__EXTRA_V4L_ID
>               bool
> -             prompt "volume_id"
> +             prompt "v4l_id"
>               help
>                 FIXME
>  
> @@ -148,7 +172,18 @@ menu "install options               "
>               prompt "install default udev rules"
>               help
>                 This will install the generic udev rules files from the udev 
> package
> -               under /lib/udev/rules.d/
> +               under /lib/udev/rules.d/, except of rules to automatically 
> load
> +               drivers modules.
> +
> +     config UDEV__DEFAULT_DRIVERS_RULES
> +             bool
> +             prompt "install default udev driver rules"
> +             help
> +               This will install the generic udev drivers rules files from 
> the udev package
> +               under /lib/udev/rules.d/,
> +               These rules are required to automatically load kernel modules 
> on
> +               udev start.
> +               If unsure say Y.
>  
>       config UDEV__COMMON_RULES
>               bool
> diff --git a/rules/udev.make b/rules/udev.make
> index 0cb15c2..65db800 100644
> --- a/rules/udev.make
> +++ b/rules/udev.make
> @@ -1,5 +1,3 @@
> -# -*-makefile-*-
> -# $Id: udev.make,v 1.15 2007/03/07 14:34:52 michl Exp $
>  #
>  # Copyright (C) 2005-2008 by Robert Schwebel
>  #
> @@ -17,7 +15,7 @@ PACKAGES-$(PTXCONF_UDEV) += udev
>  #
>  # Paths and names
>  #
> -UDEV_VERSION := 140
> +UDEV_VERSION := 147
>  UDEV         := udev-$(UDEV_VERSION)
>  UDEV_SUFFIX  := tar.bz2
>  UDEV_SOURCE  := $(SRCDIR)/$(UDEV).$(UDEV_SUFFIX)
> @@ -48,8 +46,18 @@ UDEV_ENV   := $(CROSS_ENV)
>  #
>  UDEV_AUTOCONF := \
>       $(CROSS_AUTOCONF_ROOT) \
> +     --libexecdir=/lib/udev \
> +     \
>       --disable-dependency-tracking \
> -     --enable-shared
> +     --enable-shared \
> +     --enable-extras \

Conditionally enable

> +     --disable-introspection \
> +
> +ifdef PTXCONF_PCIUTILS_COMPRESS
> +UDEV_AUTOCONF += --with-pci-ids-path=/usr/share/pci.ids.gz
> +else
> +UDEV_AUTOCONF += --with-pci-ids-path=/usr/share/pci.ids
> +endif
>  
>  ifdef PTXCONF_UDEV__DEBUG
>  UDEV_AUTOCONF        += --enable-debug
> @@ -99,6 +107,7 @@ endif
>  #    #
>  #    # default rules
>  #    #
> +
>  # install everything apart of drivers rule.
>  ifdef PTXCONF_UDEV__DEFAULT_RULES
>       @cd $(UDEV_DIR)/rules/rules.d; \
> @@ -109,13 +118,23 @@ ifdef PTXCONF_UDEV__DEFAULT_RULES
>       done
>  endif
>  
> +# install drivers rules.
> +ifdef PTXCONF_UDEV__DEFAULT_DRIVERS_RULES
> +     @cd $(UDEV_DIR)/rules/rules.d; \
> +     for file in `find . -type f -name "*drivers*"`; do \
> +             $(call install_copy, udev, 0, 0, 0644, \
> +                     $(UDEV_DIR)/rules/rules.d/$$file, \
> +                     /lib/udev/rules.d/$$file, n); \
> +     done
> +endif
> +
>  ifdef PTXCONF_UDEV__COMMON_RULES
>  #
>  # these rules are not installed by default
>  #
> -     @$(call install_copy, udev, 0, 0, 0644, \
> -             $(UDEV_DIR)/rules/packages/40-alsa.rules, \
> -             /lib/udev/rules.d/40-alsa.rules, n);
> +#    @$(call install_copy, udev, 0, 0, 0644, \
> +#            $(UDEV_DIR)/rules/packages/40-alsa.rules, \
> +#            /lib/udev/rules.d/40-alsa.rules, n);
>       @$(call install_copy, udev, 0, 0, 0644, \
>               $(UDEV_DIR)/rules/packages/40-isdn.rules, \
>               /lib/udev/rules.d/40-isdn.rules, n);
> @@ -145,12 +164,20 @@ endif
>  #    #
>  #    # startup script
>  #    #
> -ifdef PTXCONF_INITMETHOD_BBINIT
>  ifdef PTXCONF_UDEV_STARTSCRIPT
> +ifdef PTXCONF_INITMETHOD_BBINIT
>       @$(call install_alternative, udev, 0, 0, 0755, /etc/init.d/udev)
>  endif
> +ifdef PTXCONF_INITMETHOD_UPSTART
> +     #...@$(call install_alternative, udev, 0, 0, 0755, /etc/init.d/udev)
> +     @$(call install_alternative, udev, 0, 0, 0644, /etc/init/udev.conf)
> +     @$(call install_alternative, udev, 0, 0, 0644, 
> /etc/init/udevmonitor.conf)
> +     @$(call install_alternative, udev, 0, 0, 0644, 
> /etc/init/udevtrigger.conf)
> +     @$(call install_alternative, udev, 0, 0, 0644, 
> /etc/init/udev-finish.conf)
> +endif
>  endif
>  
> +
>  #    #
>  #    # Install a configuration on demand only
>  #    #
> @@ -198,32 +225,41 @@ ifdef PTXCONF_UDEV__EXTRA_PATH_ID
>       @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/path_id)
>  endif
>  
> +ifdef PTXCONF_UDEV__EXTRA_PCI_DB
> +     @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/pci-db)
> +endif
> +
>  ifdef PTXCONF_UDEV__EXTRA_RULE_GENERATOR
>       @$(call install_copy, udev, 0, 0, 0755, -, \
>               /lib/udev/rule_generator.functions)
>  endif
>  
>  ifdef PTXCONF_UDEV__EXTRA_SCSI_ID
> -     @$(call install_copy, udev, 0, 0, 0644, -, /etc/scsi_id.config)
> +#    @$(call install_copy, udev, 0, 0, 0644, -, /etc/scsi_id.config)
>       @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/scsi_id)
>  endif
>  
> +ifdef PTXCONF_UDEV__EXTRA_UDEV_ACL
> +     @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/udev-acl)
> +endif
> +
> +ifdef PTXCONF_UDEV__EXTRA_USB_DB
> +     @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/usb-db)
> +endif
> +
>  ifdef PTXCONF_UDEV__EXTRA_USB_ID
>       @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/usb_id)
>  endif
>  
> -ifdef PTXCONF_UDEV__EXTRA_VOLUME_ID
> -     @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/vol_id)
> -
> -     @$(call install_copy, udev, 0, 0, 0644, -, /lib/libvolume_id.so.1.1.0)
> -     @$(call install_link, udev, libvolume_id.so.1.1.0, 
> /lib/libvolume_id.so.1)
> -     @$(call install_link, udev, libvolume_id.so.1.1.0, /lib/libvolume_id.so)
> +ifdef PTXCONF_UDEV__EXTRA_V4L_ID
> +     @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/v4l_id)
>  endif
>  
> +
>  ifdef PTXCONF_UDEV__LIBUDEV
> -     @$(call install_copy, udev, 0, 0, 0644, -, /lib/libudev.so.0.1.0)
> -     @$(call install_link, udev, libudev.so.0.1.0, /lib/libudev.so.0)
> -     @$(call install_link, udev, libudev.so.0.1.0, /lib/libudev.so)
> +     @$(call install_copy, udev, 0, 0, 0644, -, /lib/libudev.so.0.5.1)
> +     @$(call install_link, udev, libudev.so.0.5.1, /lib/libudev.so.0)
> +     @$(call install_link, udev, libudev.so.0.5.1, /lib/libudev.so)
>  endif
>  
>       @$(call install_finish, udev)

Patch bellow (based on your patch) is incomplete due to lack of time.
I'll possibly finish it later and knowing dependency for various extras
would help a lot.

diff --git a/rules/udev.in b/rules/udev.in
index 58db642..cb61c2c 100644
--- a/rules/udev.in
+++ b/rules/udev.in
@@ -2,7 +2,14 @@
 menuconfig UDEV
        tristate
        prompt "udev                          "
+       select HOST_GPERF
        select ROOTFS_DEV
+       select GLIB             if UDEV__EXTRAS
+#      select ACL              if
+#      select USBUTILS         if
+#      select LIBUSB_COMPAT    if
+#      select PCIUTILS         if
+       #select GOBJECT_INTROSPECTION   # Broken in-tree build tools!
        help
          udev provides a dynamic device directory containing only the files for
          actually present devices. It creates or removes device node files in 
the
@@ -47,7 +54,72 @@ menu "build options                 "
 
 endmenu
 
-menu "extras                        "
+menu "install options               "
+
+       config UDEV__INSTALL_TEST_UDEV
+               bool
+               prompt "install test-udev"
+               help
+                 FIXME
+
+       config UDEV__ETC_CONF
+               bool
+               default y
+               prompt "install udev.conf"
+               help
+                 Installs /etc/udev/udev.conf. If you don't wish to install the
+                 generic udev.conf, just put a copy of your own udev.conf file 
into
+                 your own projectroot/etc/udev/ 
+
+       config UDEV__DEFAULT_RULES
+               bool
+               prompt "install default udev rules"
+               help
+                 This will install the generic udev rules files from the udev 
package
+                 under /lib/udev/rules.d/, except of rules to automatically 
load
+                 drivers modules.
+
+       config UDEV__DEFAULT_DRIVERS_RULES
+               bool
+               prompt "install default udev driver rules"
+               help
+                 This will install the generic udev drivers rules files from 
the udev package
+                 under /lib/udev/rules.d/,
+                 These rules are required to automatically load kernel modules 
on
+                 udev start.
+                 If unsure say Y.
+
+       config UDEV__COMMON_RULES
+               bool
+               prompt "install common udev rules"
+               help
+                 This will install some of the common rules shipped by udev, 
including
+                 rules for sound, isdn, md and device mapper.
+
+       config UDEV__CUST_RULES
+               bool
+               prompt "install customized udev rules"
+               help
+                 This will install the customized udev rules files from
+                 projectroot/lib/udev/rules.d into /lib/udev/rules.d
+
+       config UDEV__LIBUDEV
+               bool
+               prompt "install libudev"
+               help
+                 Install libudev.so on the target.
+
+       config UDEV_STARTSCRIPT
+               bool
+               default y
+               prompt "install /etc/init.d/udev"
+
+endmenu
+
+menuconfig UDEV__EXTRAS
+       bool "extras                        "
+
+if UDEV__EXTRAS
 
        config UDEV__EXTRA_ATA_ID
                bool
@@ -98,6 +170,12 @@ menu "extras                        "
                  udev callout to create a device path based unique name for a 
device to
                  implement the Linux Persistent Device Naming scheme
 
+       config UDEV__EXTRA_PCI_DB
+               bool
+               prompt "pci-db"
+               help
+                 FIXME
+
        config UDEV__EXTRA_RULE_GENERATOR
                bool
                prompt "rule_generator"
@@ -110,72 +188,33 @@ menu "extras                        "
                help
                  Used to build unique IDs for an SCSI media to identify it 
again
 
-       config UDEV__EXTRA_USB_ID
-               bool
-               prompt "usb_id"
-               help
-                   This is a helper to generate unique information about some 
kind of
-                   USB device. This is required to ensure the same hotplugged 
device to
-                   appear always at the same device node (via link)
-
-       config UDEV__EXTRA_VOLUME_ID
+       config UDEV__EXTRA_UDEV_ACL
                bool
-               prompt "volume_id"
+               prompt "udev-acl"
                help
                  FIXME
 
-endmenu
-
-menu "install options               "
-
-       config UDEV__INSTALL_TEST_UDEV
+       config UDEV__EXTRA_USB_DB
                bool
-               prompt "install test-udev"
+               prompt "usb-db"
                help
                  FIXME
 
-       config UDEV__ETC_CONF
-               bool
-               default y
-               prompt "install udev.conf"
-               help
-                 Installs /etc/udev/udev.conf. If you don't wish to install the
-                 generic udev.conf, just put a copy of your own udev.conf file 
into
-                 your own projectroot/etc/udev/ 
-
-       config UDEV__DEFAULT_RULES
-               bool
-               prompt "install default udev rules"
-               help
-                 This will install the generic udev rules files from the udev 
package
-                 under /lib/udev/rules.d/
-
-       config UDEV__COMMON_RULES
-               bool
-               prompt "install common udev rules"
-               help
-                 This will install some of the common rules shipped by udev, 
including
-                 rules for sound, isdn, md and device mapper.
-
-       config UDEV__CUST_RULES
+       config UDEV__EXTRA_USB_ID
                bool
-               prompt "install customized udev rules"
+               prompt "usb_id"
                help
-                 This will install the customized udev rules files from
-                 projectroot/lib/udev/rules.d into /lib/udev/rules.d
+                   This is a helper to generate unique information about some 
kind of
+                   USB device. This is required to ensure the same hotplugged 
device to
+                   appear always at the same device node (via link)
 
-       config UDEV__LIBUDEV
+       config UDEV__EXTRA_V4L_ID
                bool
-               prompt "install libudev"
+               prompt "v4l_id"
                help
-                 Install libudev.so on the target.
-
-       config UDEV_STARTSCRIPT
-               bool
-               default y
-               prompt "install /etc/init.d/udev"
+                 FIXME
 
-       endmenu
+endif
 
 endif
 
diff --git a/rules/udev.make b/rules/udev.make
index 0cb15c2..c473b5b 100644
--- a/rules/udev.make
+++ b/rules/udev.make
@@ -1,5 +1,3 @@
-# -*-makefile-*-
-# $Id: udev.make,v 1.15 2007/03/07 14:34:52 michl Exp $
 #
 # Copyright (C) 2005-2008 by Robert Schwebel
 #
@@ -17,7 +15,7 @@ PACKAGES-$(PTXCONF_UDEV) += udev
 #
 # Paths and names
 #
-UDEV_VERSION   := 140
+UDEV_VERSION   := 150
 UDEV           := udev-$(UDEV_VERSION)
 UDEV_SUFFIX    := tar.bz2
 UDEV_SOURCE    := $(SRCDIR)/$(UDEV).$(UDEV_SUFFIX)
@@ -48,15 +46,30 @@ UDEV_ENV    := $(CROSS_ENV)
 #
 UDEV_AUTOCONF := \
        $(CROSS_AUTOCONF_ROOT) \
+       --libexecdir=/lib/udev \
+       \
        --disable-dependency-tracking \
+       --disable-introspection \
        --enable-shared
 
+ifdef PTXCONF_PCIUTILS_COMPRESS
+UDEV_AUTOCONF += --with-pci-ids-path=/usr/share/pci.ids.gz
+else
+UDEV_AUTOCONF += --with-pci-ids-path=/usr/share/pci.ids
+endif
+
 ifdef PTXCONF_UDEV__DEBUG
 UDEV_AUTOCONF  += --enable-debug
 else
 UDEV_AUTOCONF  += --disable-debug
 endif
 
+ifdef PTXCONF_UDEV__EXTRAS
+UDEV_AUTOCONF  += --enable-extras
+else
+UDEV_AUTOCONF  += --disable-extras
+endif
+
 ifdef PTXCONF_UDEV__SELINUX
 UDEV_AUTOCONF  += --with-selinux
 else
@@ -99,6 +112,7 @@ endif
 #      #
 #      # default rules
 #      #
+
 # install everything apart of drivers rule.
 ifdef PTXCONF_UDEV__DEFAULT_RULES
        @cd $(UDEV_DIR)/rules/rules.d; \
@@ -109,17 +123,30 @@ ifdef PTXCONF_UDEV__DEFAULT_RULES
        done
 endif
 
+# install drivers rules.
+ifdef PTXCONF_UDEV__DEFAULT_DRIVERS_RULES
+       @cd $(UDEV_DIR)/rules/rules.d; \
+       for file in `find . -type f -name "*drivers*"`; do \
+               $(call install_copy, udev, 0, 0, 0644, \
+                       $(UDEV_DIR)/rules/rules.d/$$file, \
+                       /lib/udev/rules.d/$$file, n); \
+       done
+endif
+
 ifdef PTXCONF_UDEV__COMMON_RULES
 #
 # these rules are not installed by default
 #
        @$(call install_copy, udev, 0, 0, 0644, \
-               $(UDEV_DIR)/rules/packages/40-alsa.rules, \
-               /lib/udev/rules.d/40-alsa.rules, n);
+               $(UDEV_DIR)/rules/packages/40-infiniband.rules, \
+               /lib/udev/rules.d/40-infiniband.rules, n);
        @$(call install_copy, udev, 0, 0, 0644, \
                $(UDEV_DIR)/rules/packages/40-isdn.rules, \
                /lib/udev/rules.d/40-isdn.rules, n);
        @$(call install_copy, udev, 0, 0, 0644, \
+               $(UDEV_DIR)/rules/packages/40-pilot-links.rules, \
+               /lib/udev/rules.d/40-pilot-links.rules, n);
+       @$(call install_copy, udev, 0, 0, 0644, \
                $(UDEV_DIR)/rules/packages/64-device-mapper.rules, \
                /lib/udev/rules.d/64-device-mapper.rules, n);
        @$(call install_copy, udev, 0, 0, 0644, \
@@ -145,12 +172,20 @@ endif
 #      #
 #      # startup script
 #      #
-ifdef PTXCONF_INITMETHOD_BBINIT
 ifdef PTXCONF_UDEV_STARTSCRIPT
+ifdef PTXCONF_INITMETHOD_BBINIT
        @$(call install_alternative, udev, 0, 0, 0755, /etc/init.d/udev)
 endif
+ifdef PTXCONF_INITMETHOD_UPSTART
+       #...@$(call install_alternative, udev, 0, 0, 0755, /etc/init.d/udev)
+       @$(call install_alternative, udev, 0, 0, 0644, /etc/init/udev.conf)
+       @$(call install_alternative, udev, 0, 0, 0644, 
/etc/init/udevmonitor.conf)
+       @$(call install_alternative, udev, 0, 0, 0644, 
/etc/init/udevtrigger.conf)
+       @$(call install_alternative, udev, 0, 0, 0644, 
/etc/init/udev-finish.conf)
+endif
 endif
 
+
 #      #
 #      # Install a configuration on demand only
 #      #
@@ -198,32 +233,41 @@ ifdef PTXCONF_UDEV__EXTRA_PATH_ID
        @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/path_id)
 endif
 
+ifdef PTXCONF_UDEV__EXTRA_PCI_DB
+       @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/pci-db)
+endif
+
 ifdef PTXCONF_UDEV__EXTRA_RULE_GENERATOR
        @$(call install_copy, udev, 0, 0, 0755, -, \
                /lib/udev/rule_generator.functions)
 endif
 
 ifdef PTXCONF_UDEV__EXTRA_SCSI_ID
-       @$(call install_copy, udev, 0, 0, 0644, -, /etc/scsi_id.config)
+#      @$(call install_copy, udev, 0, 0, 0644, -, /etc/scsi_id.config)
        @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/scsi_id)
 endif
 
+ifdef PTXCONF_UDEV__EXTRA_UDEV_ACL
+       @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/udev-acl)
+endif
+
+ifdef PTXCONF_UDEV__EXTRA_USB_DB
+       @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/usb-db)
+endif
+
 ifdef PTXCONF_UDEV__EXTRA_USB_ID
        @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/usb_id)
 endif
 
-ifdef PTXCONF_UDEV__EXTRA_VOLUME_ID
-       @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/vol_id)
-
-       @$(call install_copy, udev, 0, 0, 0644, -, /lib/libvolume_id.so.1.1.0)
-       @$(call install_link, udev, libvolume_id.so.1.1.0, 
/lib/libvolume_id.so.1)
-       @$(call install_link, udev, libvolume_id.so.1.1.0, /lib/libvolume_id.so)
+ifdef PTXCONF_UDEV__EXTRA_V4L_ID
+       @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/v4l_id)
 endif
 
+
 ifdef PTXCONF_UDEV__LIBUDEV
-       @$(call install_copy, udev, 0, 0, 0644, -, /lib/libudev.so.0.1.0)
-       @$(call install_link, udev, libudev.so.0.1.0, /lib/libudev.so.0)
-       @$(call install_link, udev, libudev.so.0.1.0, /lib/libudev.so)
+       @$(call install_copy, udev, 0, 0, 0644, -, /lib/libudev.so.0.6.0)
+       @$(call install_link, udev, libudev.so.0.6.0, /lib/libudev.so.0)
+       @$(call install_link, udev, libudev.so.0.6.0, /lib/libudev.so)
 endif
 
        @$(call install_finish, udev)

--
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to