From: Carsten Schlote <c.schl...@konzeptpark.de> Updated to 150 as proposed on ptxdist mailinglist. Compiles and works (tested with upstart initmethod).
Added new config options for all files installed in package dir. Added 'install_copy' lines for all files found in package dir and as well some more obscure ones not installed by default. Added comments and reviews Crosscompile Patches: - commented out checks for pci.ids and provide link to file directly. Signed-off-by: Carsten Schlote <c.schl...@konzeptpark.de> --- patches/udev-150/autogen.sh | 1 + patches/udev-150/fix-crosscompile.patch | 29 +++++ patches/udev-150/series | 1 + rules/udev.in | 203 +++++++++++++++++++++++-------- rules/udev.make | 160 ++++++++++++++++++++++--- 5 files changed, 329 insertions(+), 65 deletions(-) create mode 120000 patches/udev-150/autogen.sh create mode 100644 patches/udev-150/fix-crosscompile.patch create mode 100644 patches/udev-150/series diff --git a/patches/udev-150/autogen.sh b/patches/udev-150/autogen.sh new file mode 120000 index 0000000..9f8a4cb --- /dev/null +++ b/patches/udev-150/autogen.sh @@ -0,0 +1 @@ +../autogen.sh \ No newline at end of file diff --git a/patches/udev-150/fix-crosscompile.patch b/patches/udev-150/fix-crosscompile.patch new file mode 100644 index 0000000..5a811eb --- /dev/null +++ b/patches/udev-150/fix-crosscompile.patch @@ -0,0 +1,29 @@ +From: Carsten Schlote <c.schl...@konzeptpark.de> +Subject: Remove checks for pci.ids to allow cross-compilation. + +These checks for pci.ids seem to fail. So commented out and +path to pci.ids is provided with by commandline option on +configure. + +Signed-off-by: Carsten Schlote <c.schl...@konzeptpark.de> +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Index: udev-146/configure.ac +=================================================================== +--- udev-146.orig/configure.ac 2009-08-10 03:37:42.000000000 +0200 ++++ udev-146/configure.ac 2009-12-09 10:11:53.000000000 +0100 +@@ -69,9 +69,9 @@ + PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82) + AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)]) + +- 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]) +- AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids]) ++# 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]) ++# AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids]) + AC_ARG_WITH(pci-ids-path, + AS_HELP_STRING([--pci-ids-path=DIR], [Path to pci.ids file]), + [PCI_DATABASE=${withval}], diff --git a/patches/udev-150/series b/patches/udev-150/series new file mode 100644 index 0000000..1752ae8 --- /dev/null +++ b/patches/udev-150/series @@ -0,0 +1 @@ +fix-crosscompile.patch diff --git a/rules/udev.in b/rules/udev.in index 58db642..5e56a29 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 GLIB if UDEV__EXTRAS + select ACL if UDEV__EXTRAS + select USBUTILS if UDEV__EXTRAS + select LIBUSB_COMPAT if UDEV__EXTRAS + select PCIUTILS if UDEV__EXTRAS 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 +53,87 @@ 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__DEFAULT_KEYMAPS + bool + prompt "install default keymaps" + help + This will install some of the common keymaps shipped by udev. + + 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__LIBGUDEV + bool + prompt "install libgudev" + help + Install libgudev.so on the target. + + config UDEV_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/udev or /etc/init/udev.conf" + help + Install the startup magic for either bbinit or upstart. + Select Y here, as this is what you usually want. + +endmenu + +menuconfig UDEV__EXTRAS + bool "extras " + +if UDEV__EXTRAS config UDEV__EXTRA_ATA_ID bool @@ -71,17 +157,23 @@ menu "extras " bool prompt "edd_id" help - FIXME + Tool to get EDD ID + + config UDEV__EXTRA_FINDKEYBOARDS + bool + prompt "findkeyboards" + help + Tool to find attached keyboards config UDEV__EXTRA_FIRMWARE bool prompt "firmware" help - This is a small helper script to load some kind of firmware on demand + This is a small helper binary to load some kind of firmware on demand config UDEV__EXTRA_FLOPPY bool - prompt "floppy" + prompt "create_floppy_devices" help FIXME @@ -91,91 +183,102 @@ menu "extras " help Find matching entry in fstab and export it - config UDEV__EXTRA_PATH_ID + config UDEV__EXTRA_HID2HCI bool - prompt "path_id" + prompt "hid2hci" help - udev callout to create a device path based unique name for a device to - implement the Linux Persistent Device Naming scheme + Convert HID to HCI IDs - config UDEV__EXTRA_RULE_GENERATOR + config UDEV__EXTRA_INPUT_ID bool - prompt "rule_generator" + prompt "input_id" help FIXME - config UDEV__EXTRA_SCSI_ID + config UDEV__EXTRA_KEYBOARD_FORCE_RELEASE bool - prompt "scsi_id" + prompt "keyboard-force-release.sh" help - Used to build unique IDs for an SCSI media to identify it again + Keyboard support - config UDEV__EXTRA_USB_ID + config UDEV__EXTRA_KEYMAP bool - prompt "usb_id" + prompt "keymap" 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) + Keymap support - config UDEV__EXTRA_VOLUME_ID + config UDEV__EXTRA_MODEM_MODESWITCH bool - prompt "volume_id" + prompt "modem-modeswitch" help - FIXME + Option UMTS Modem support -endmenu + config UDEV__EXTRA_PATH_ID + bool + prompt "path_id" + help + udev callout to create a device path based unique name for a device to + implement the Linux Persistent Device Naming scheme -menu "install options " + config UDEV__EXTRA_PCI_DB + bool + prompt "pci-db" + help + Name resolution for PCI IDs - config UDEV__INSTALL_TEST_UDEV + config UDEV__EXTRA_RULE_GENERATOR bool - prompt "install test-udev" + prompt "rule_generator" help FIXME - config UDEV__ETC_CONF + config UDEV__EXTRA_SCSI_ID bool - default y - prompt "install udev.conf" + prompt "scsi_id" 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/ + Used to build unique IDs for an SCSI media to identify it again - config UDEV__DEFAULT_RULES + config UDEV__EXTRA_UDEV_ACL bool - prompt "install default udev rules" + prompt "udev-acl" help - This will install the generic udev rules files from the udev package - under /lib/udev/rules.d/ + FIXME - config UDEV__COMMON_RULES + config UDEV__EXTRA_USB_DB bool - prompt "install common udev rules" + prompt "usb-db" help - This will install some of the common rules shipped by udev, including - rules for sound, isdn, md and device mapper. + Name resolution for USB IDs - 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. + FIXME - config UDEV_STARTSCRIPT + config UDEV__EXTRA_WRITE_CD_RULES bool - default y - prompt "install /etc/init.d/udev" + prompt "write_cd_rules" + help + This will generate udev-based persistent naming rules for your CD/DVD media + + config UDEV__EXTRA_WRITE_NET_RULES + bool + prompt "write_net_rules" + help + This will generate udev-based persistent naming rules for your network devices - endmenu +endif endif + + diff --git a/rules/udev.make b/rules/udev.make index 64f2007..a6dfe6f 100644 --- a/rules/udev.make +++ b/rules/udev.make @@ -16,7 +16,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) @@ -47,15 +47,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 @@ -98,6 +113,7 @@ endif # # # # default rules # # + # install everything apart of drivers rule. ifdef PTXCONF_UDEV__DEFAULT_RULES @cd $(UDEV_DIR)/rules/rules.d; \ @@ -108,17 +124,52 @@ 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 + +# install default keymaps. +ifdef PTXCONF_UDEV__DEFAULT_KEYMAPS + @cd $(UDEV_PKGDIR)/lib/udev/keymaps; \ + for file in `find . -type f`; do \ + $(call install_copy, udev, 0, 0, 0644, \ + $(UDEV_PKGDIR)/lib/udev/keymaps/$$file, \ + /lib/udev/keymaps/$$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-isdn.rules, \ /lib/udev/rules.d/40-isdn.rules, n); @$(call install_copy, udev, 0, 0, 0644, \ + $(UDEV_DIR)/rules/packages/40-zaptel.rules, \ + /lib/udev/rules.d/40-zaptel.rules, n); + @$(call install_copy, udev, 0, 0, 0644, \ + $(UDEV_DIR)/rules/packages/40-s390.rules, \ + /lib/udev/rules.d/40-s390.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/40-ppc.rules, \ + /lib/udev/rules.d/40-ppc.rules, n); + @$(call install_copy, udev, 0, 0, 0644, \ + $(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-ia64.rules, \ + /lib/udev/rules.d/40-ia64.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, \ @@ -144,11 +195,18 @@ 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, 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 @@ -166,6 +224,10 @@ endif ifdef PTXCONF_UDEV__EXTRA_CDROM_ID @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/cdrom_id) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/60-cdrom_id.rules,n) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/75-cd-aliases-generator.rules,n) endif ifdef PTXCONF_UDEV__EXTRA_COLLECT @@ -174,10 +236,16 @@ endif ifdef PTXCONF_UDEV__EXTRA_EDD_ID @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/edd_id) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/61-persistent-storage-edd.rules,n) +endif + +ifdef PTXCONF_UDEV__EXTRA_FINDKEYBOARDS + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/findkeyboards) endif ifdef PTXCONF_UDEV__EXTRA_FIRMWARE - @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/firmware.sh, n) + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/firmware) @$(call install_copy, udev, 0, 0, 0644, -, \ /lib/udev/rules.d/50-firmware.rules,n) endif @@ -185,6 +253,8 @@ endif ifdef PTXCONF_UDEV__EXTRA_FLOPPY @$(call install_copy, udev, 0, 0, 0755, -, \ /lib/udev/create_floppy_devices) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/60-floppy.rules) endif ifdef PTXCONF_UDEV__EXTRA_FSTAB_IMPORT @@ -193,36 +263,96 @@ ifdef PTXCONF_UDEV__EXTRA_FSTAB_IMPORT /lib/udev/rules.d/79-fstab_import.rules) endif +ifdef PTXCONF_UDEV__EXTRA_HID2HCI + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/hid2hci) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/70-hid2hci.rules,n) +endif + +ifdef PTXCONF_UDEV__EXTRA_INPUT_ID + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/input_id) +endif + +ifdef PTXCONF_UDEV__EXTRA_KEYBOARD_FORCE_RELEASE + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/keyboard-force-release.sh, n) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/95-keyboard-force-release.rules,n) +endif + +ifdef PTXCONF_UDEV__EXTRA_KEYMAP + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/keymap) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/95-keymap.rules,n) +endif + +ifdef PTXCONF_UDEV__EXTRA_MODEM_MODESWITCH + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/modem-modeswitch) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/61-option-modem-modeswitch.rules,n) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/61-mobile-action.rules,n) +endif + 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, 0755, -, /lib/udev/scsi_id) endif +ifdef PTXCONF_UDEV__EXTRA_UDEV_ACL + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/udev-acl) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/70-acl.rules,n) + @$(call install_copy, udev, 0, 0, 0755, -, /lib/ConsoleKit/run-seat.d/udev-acl.ck, n) +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) +ifdef PTXCONF_UDEV__EXTRA_V4L_ID + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/v4l_id) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/60-persistent-v4l.rules,n) +endif + +ifdef PTXCONF_UDEV__EXTRA_WRITE_CD_RULES + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev//write_cd_rules) +endif - @$(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_WRITE_NET_RULES + @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev//write_net_rules) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/75-net-description.rules,n) + @$(call install_copy, udev, 0, 0, 0644, -, \ + /lib/udev/rules.d/75-persistent-net-generator.rules,n) 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 + +ifdef PTXCONF_UDEV__LIBGUDEV + @$(call install_copy, udev, 0, 0, 0644, -, /lib/libgudev-1.0.so.0.0.1) + @$(call install_link, udev, libgudev-1.0.so.0.0.1, /lib/libgudev-1.0.so.0) + @$(call install_link, udev, libgudev-1.0.so.0.0.1, /lib/libgudev-1.0.so) endif @$(call install_finish, udev) -- 1.6.5.6.gb3118 -- ptxdist mailing list ptxdist@pengutronix.de