summaryrefslogtreecommitdiff
path: root/package/udev/udev.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/udev/udev.mk')
-rw-r--r--package/udev/udev.mk60
1 files changed, 45 insertions, 15 deletions
diff --git a/package/udev/udev.mk b/package/udev/udev.mk
index b13e59f14..3197f10a9 100644
--- a/package/udev/udev.mk
+++ b/package/udev/udev.mk
@@ -3,12 +3,12 @@
# udev
#
#############################################################
-UDEV_VERSION:=100
+UDEV_VERSION:=101
UDEV_SOURCE:=udev-$(UDEV_VERSION).tar.bz2
UDEV_SITE:=ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/
UDEV_CAT:=$(BZCAT)
UDEV_DIR:=$(BUILD_DIR)/udev-$(UDEV_VERSION)
-UDEV_TARGET_BINARY:=sbin/udev
+UDEV_TARGET_BINARY:=sbin/udevd
UDEV_BINARY:=udev
# 094 had _GNU_SOURCE set
@@ -41,30 +41,56 @@ $(UDEV_DIR)/$(UDEV_BINARY): $(UDEV_DIR)/.configured
udevdir=$(UDEV_ROOT) -C $(UDEV_DIR)
touch -c $(UDEV_DIR)/$(UDEV_BINARY)
-# UDEV_CONF overrides default policies for device access control and naming;
-# default access controls prevent non-root tasks from running. Many of the
-# rule files rely on PROGRAM invocations (e.g. extra /etc/udev/scripts);
-# for now we'll avoid having buildroot systems rely on them.
-UDEV_CONF:=etc/udev/frugalware/*
-
$(TARGET_DIR)/$(UDEV_TARGET_BINARY): $(UDEV_DIR)/$(UDEV_BINARY)
-mkdir $(TARGET_DIR)/sys
- -mkdir -p $(TARGET_DIR)/etc/udev/rules.d
- $(INSTALL) -D -m 0644 $(UDEV_DIR)/$(UDEV_CONF) \
- $(TARGET_DIR)/etc/udev/rules.d
- $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) CC=$(TARGET_CC) LD=$(TARGET_CC) \
- DESTDIR=$(TARGET_DIR) \
+ $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(TARGET_DIR) \
CFLAGS="$(BR2_UDEV_CFLAGS)" \
LDFLAGS="-warn-common" \
USE_LOG=false USE_SELINUX=false \
udevdir=$(UDEV_ROOT) -C $(UDEV_DIR) install
$(INSTALL) -m 0755 -D package/udev/init-udev $(TARGET_DIR)/etc/init.d/S10udev
- $(INSTALL) -m 0644 -D package/udev/udev.conf $(TARGET_DIR)/etc/udev
+ rm -rf $(TARGET_DIR)/usr/share/man
+ifneq ($(strip $(BR2_PACKAGE_UDEV_UTILS)),y)
+ rm -f $(TARGET_DIR)/usr/sbin/udevmonitor
+ rm -f $(TARGET_DIR)/usr/bin/udevinfo
+ rm -f $(TARGET_DIR)/usr/bin/udevtest
+endif
udev: uclibc $(TARGET_DIR)/$(UDEV_TARGET_BINARY)
+ifeq ($(strip $(BR2_PACKAGE_UDEV_VOLUME_ID)),y)
+$(STAGING_DIR)/usr/lib/libvolume_id.so.0.72.0:
+ $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
+ USE_LOG=false USE_SELINUX=false \
+ udevdir=$(UDEV_ROOT) EXTRAS="extras/volume_id" -C $(UDEV_DIR)
+ $(INSTALL) -m 0644 -D $(UDEV_DIR)/extras/volume_id/lib/libvolume_id.h $(STAGING_DIR)/include/libvolume_id.h
+ $(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/volume_id/lib/libvolume_id.so.0.72.0 $(STAGING_DIR)/usr/lib/libvolume_id.so.0.72.0
+ -ln -sf libvolume_id.so.0.72.0 $(STAGING_DIR)/usr/lib/libvolume_id.so.0
+ -ln -sf libvolume_id.so.0 $(STAGING_DIR)/usr/lib/libvolume_id.so
+
+$(TARGET_DIR)/lib/udev/vol_id: $(STAGING_DIR)/usr/lib/libvolume_id.so.0.72.0
+ $(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/volume_id/vol_id $(TARGET_DIR)/lib/udev/vol_id
+ $(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/volume_id/lib/libvolume_id.so.0.72.0 $(TARGET_DIR)/usr/lib/libvolume_id.so.0.72.0
+ -ln -sf libvolume_id.so.0.72.0 $(TARGET_DIR)/usr/lib/libvolume_id.so.0
+ $(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libvolume_id.so.0.72.0
+
+udev-volume_id: udev $(TARGET_DIR)/lib/udev/vol_id
+
+udev-volume_id-clean:
+ rm -f $(STAGING_DIR)/include/libvolume_id.h
+ rm -f $(STAGING_DIR)/usr/lib/libvolume_id.so*
+ rm -f $(TARGET_DIR)/usr/lib/libvolume_id.so.0*
+ rm -f $(TARGET_DIR)/lib/udev/vol_id
+ rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/lib/udev
+
+udev-volume_id-dirclean:
+ -$(MAKE) EXTRAS="extras/volume_id" -C $(UDEV_DIR) clean
+endif
+
udev-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(UDEV_DIR) uninstall
+ rm -f $(TARGET_DIR)/etc/init.d/S10udev $(TARGET_DIR)/sbin/udev*
+ rm -f $(TARGET_DIR)/usr/sbin/udevmonitor $(TARGET_DIR)/usr/bin/udev*
+ rmdir $(TARGET_DIR)/sys
-$(MAKE) -C $(UDEV_DIR) clean
udev-dirclean:
@@ -78,3 +104,7 @@ udev-dirclean:
ifeq ($(strip $(BR2_PACKAGE_UDEV)),y)
TARGETS+=udev
endif
+
+ifeq ($(strip $(BR2_PACKAGE_UDEV_VOLUME_ID)),y)
+TARGETS+=udev-volume_id
+endif