diff options
-rw-r--r-- | Makefile.am | 16 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | rules/50-firmware.rules | 3 | ||||
-rw-r--r-- | rules/50-udev-default.rules | 1 | ||||
-rw-r--r-- | shell-completion/bash/udevadm | 2 | ||||
-rw-r--r-- | src/udev/udev-builtin.c | 2 | ||||
-rw-r--r-- | src/udev/udev.h | 4 |
7 files changed, 26 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am index 7e9cdfdb26..37eeb01d58 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1352,12 +1352,10 @@ rootlibexec_PROGRAMS += \ nodist_systemunit_DATA += \ units/systemd-modules-load.service + SYSINIT_TARGET_WANTS += \ systemd-modules-load.service -dist_udevrules_DATA += \ - rules/80-drivers.rules - endif EXTRA_DIST += \ @@ -1809,7 +1807,6 @@ libudev_core_la_SOURCES = \ src/udev/udev-ctrl.c \ src/udev/udev-builtin.c \ src/udev/udev-builtin-btrfs.c \ - src/udev/udev-builtin-firmware.c \ src/udev/udev-builtin-hwdb.c \ src/udev/udev-builtin-input_id.c \ src/udev/udev-builtin-net_id.c \ @@ -1833,9 +1830,20 @@ libudev_core_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ -DFIRMWARE_PATH="$(FIRMWARE_PATH)" +if ENABLE_FIRMWARE +libudev_core_la_SOURCES += \ + src/udev/udev-builtin-firmware.c + +dist_udevrules_DATA += \ + rules/50-firmware.rules +endif + if HAVE_KMOD libudev_core_la_SOURCES += \ src/udev/udev-builtin-kmod.c + +dist_udevrules_DATA += \ + rules/80-drivers.rules endif if HAVE_BLKID diff --git a/configure.ac b/configure.ac index 28d7286c83..14411e3601 100644 --- a/configure.ac +++ b/configure.ac @@ -705,8 +705,8 @@ AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"]) # ------------------------------------------------------------------------------ AC_ARG_WITH(firmware-path, AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], - [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]), - [], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"]) + [Firmware search path (default="")]), + [], [with_firmware_path=""]) OLD_IFS=$IFS IFS=: for i in $with_firmware_path; do @@ -717,7 +717,8 @@ for i in $with_firmware_path; do fi done IFS=$OLD_IFS -AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) +AC_SUBST(FIRMWARE_PATH) +AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"]) # ------------------------------------------------------------------------------ AC_ARG_ENABLE([gudev], diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules new file mode 100644 index 0000000000..f0ae684518 --- /dev/null +++ b/rules/50-firmware.rules @@ -0,0 +1,3 @@ +# do not edit this file, it will be overwritten on update + +SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware" diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules index 5d8bde53c1..9d17cf71ab 100644 --- a/rules/50-udev-default.rules +++ b/rules/50-udev-default.rules @@ -64,5 +64,4 @@ SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio- SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id" -SUBSYSTEM=="firmware", ACTION=="add", IMPORT{builtin}="firmware" ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}" diff --git a/shell-completion/bash/udevadm b/shell-completion/bash/udevadm index a31d465d35..123fb51633 100644 --- a/shell-completion/bash/udevadm +++ b/shell-completion/bash/udevadm @@ -93,7 +93,7 @@ _udevadm() { fi elif __contains_word "$verb" ${VERBS[TESTBUILTIN]}; then - comps='blkid btrfs firmware hwdb input_id kmod net_id path_id usb_id uaccess' + comps='blkid btrfs hwdb input_id kmod net_id path_id usb_id uaccess' fi COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c index 57d75a13e4..13922d3ce3 100644 --- a/src/udev/udev-builtin.c +++ b/src/udev/udev-builtin.c @@ -34,7 +34,9 @@ static const struct udev_builtin *builtins[] = { [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid, #endif [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs, +#ifdef ENABLE_FIRMWARE [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware, +#endif [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb, [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id, #ifdef HAVE_KMOD diff --git a/src/udev/udev.h b/src/udev/udev.h index b54cb58fc3..aa2edbef6e 100644 --- a/src/udev/udev.h +++ b/src/udev/udev.h @@ -140,7 +140,9 @@ enum udev_builtin_cmd { UDEV_BUILTIN_BLKID, #endif UDEV_BUILTIN_BTRFS, +#ifdef ENABLE_FIRMWARE UDEV_BUILTIN_FIRMWARE, +#endif UDEV_BUILTIN_HWDB, UDEV_BUILTIN_INPUT_ID, #ifdef HAVE_KMOD @@ -167,7 +169,9 @@ struct udev_builtin { extern const struct udev_builtin udev_builtin_blkid; #endif extern const struct udev_builtin udev_builtin_btrfs; +#ifdef ENABLE_FIRMWARE extern const struct udev_builtin udev_builtin_firmware; +#endif extern const struct udev_builtin udev_builtin_hwdb; extern const struct udev_builtin udev_builtin_input_id; #ifdef HAVE_KMOD |