CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
New port eudev 1.8
authorVictor Martinez <pitillo@ono.com>
Wed, 1 Oct 2014 09:42:22 +0000 (09:42 +0000)
committerVictor Martinez <pitillo@ono.com>
Wed, 1 Oct 2014 09:42:22 +0000 (09:42 +0000)
eudev/.footprint [new file with mode: 0644]
eudev/.md5sum [new file with mode: 0644]
eudev/81-crux.rules [new file with mode: 0644]
eudev/Pkgfile [new file with mode: 0644]
eudev/start_udev [new file with mode: 0644]

diff --git a/eudev/.footprint b/eudev/.footprint
new file mode 100644 (file)
index 0000000..0cfff02
--- /dev/null
@@ -0,0 +1,69 @@
+drwxr-xr-x     root/root       etc/
+drwxr-xr-x     root/root       etc/udev/
+-r--r--r--     root/root       etc/udev/hwdb.bin
+drwxr-xr-x     root/root       etc/udev/hwdb.d/
+-rw-r--r--     root/root       etc/udev/hwdb.d/20-OUI.hwdb
+-rw-r--r--     root/root       etc/udev/hwdb.d/20-acpi-vendor.hwdb
+-rw-r--r--     root/root       etc/udev/hwdb.d/20-bluetooth-vendor-product.hwdb
+-rw-r--r--     root/root       etc/udev/hwdb.d/20-pci-classes.hwdb
+-rw-r--r--     root/root       etc/udev/hwdb.d/20-pci-vendor-model.hwdb
+-rw-r--r--     root/root       etc/udev/hwdb.d/20-sdio-classes.hwdb
+-rw-r--r--     root/root       etc/udev/hwdb.d/20-sdio-vendor-model.hwdb
+-rw-r--r--     root/root       etc/udev/hwdb.d/20-usb-classes.hwdb
+-rw-r--r--     root/root       etc/udev/hwdb.d/20-usb-vendor-model.hwdb
+drwxr-xr-x     root/root       etc/udev/rules.d/
+-rw-r--r--     root/root       etc/udev/udev.conf
+drwxr-xr-x     root/root       lib/
+drwxr-xr-x     root/root       lib/firmware/
+lrwxrwxrwx     root/root       lib/libudev.so.1 -> libudev.so.1.4.1
+-rwxr-xr-x     root/root       lib/libudev.so.1.4.1
+drwxr-xr-x     root/root       lib/udev/
+-rwxr-xr-x     root/root       lib/udev/accelerometer
+-rwxr-xr-x     root/root       lib/udev/ata_id
+-rwxr-xr-x     root/root       lib/udev/cdrom_id
+-rwxr-xr-x     root/root       lib/udev/collect
+drwxr-xr-x     root/root       lib/udev/devices/
+drwxr-xr-x     root/root       lib/udev/devices/pts/
+drwxr-xr-x     root/root       lib/udev/devices/shm/
+-rwxr-xr-x     root/root       lib/udev/mtd_probe
+drwxr-xr-x     root/root       lib/udev/rules.d/
+-rw-r--r--     root/root       lib/udev/rules.d/42-usb-hid-pm.rules
+-rw-r--r--     root/root       lib/udev/rules.d/50-udev-default.rules
+-rw-r--r--     root/root       lib/udev/rules.d/60-cdrom_id.rules
+-rw-r--r--     root/root       lib/udev/rules.d/60-drm.rules
+-rw-r--r--     root/root       lib/udev/rules.d/60-persistent-alsa.rules
+-rw-r--r--     root/root       lib/udev/rules.d/60-persistent-input.rules
+-rw-r--r--     root/root       lib/udev/rules.d/60-persistent-serial.rules
+-rw-r--r--     root/root       lib/udev/rules.d/60-persistent-storage-tape.rules
+-rw-r--r--     root/root       lib/udev/rules.d/60-persistent-storage.rules
+-rw-r--r--     root/root       lib/udev/rules.d/60-persistent-v4l.rules
+-rw-r--r--     root/root       lib/udev/rules.d/61-accelerometer.rules
+-rw-r--r--     root/root       lib/udev/rules.d/64-btrfs.rules
+-rw-r--r--     root/root       lib/udev/rules.d/75-net-description.rules
+-rw-r--r--     root/root       lib/udev/rules.d/75-probe_mtd.rules
+-rw-r--r--     root/root       lib/udev/rules.d/75-tty-description.rules
+-rw-r--r--     root/root       lib/udev/rules.d/78-sound-card.rules
+-rw-r--r--     root/root       lib/udev/rules.d/80-drivers.rules
+-rw-r--r--     root/root       lib/udev/rules.d/80-net-name-slot.rules
+-rw-r--r--     root/root       lib/udev/rules.d/81-crux.rules
+-rw-r--r--     root/root       lib/udev/rules.d/95-udev-late.rules
+-rwxr-xr-x     root/root       lib/udev/scsi_id
+-rwxr-xr-x     root/root       lib/udev/v4l_id
+drwxr-xr-x     root/root       run/
+drwxr-xr-x     root/root       sbin/
+-rwxr-xr-x     root/root       sbin/start_udev
+-rwxr-xr-x     root/root       sbin/udevadm
+-rwxr-xr-x     root/root       sbin/udevd
+drwxr-xr-x     root/root       usr/
+drwxr-xr-x     root/root       usr/include/
+-rw-r--r--     root/root       usr/include/libudev.h
+-rw-r--r--     root/root       usr/include/udev.h
+drwxr-xr-x     root/root       usr/lib/
+-rw-r--r--     root/root       usr/lib/libudev.a
+-rwxr-xr-x     root/root       usr/lib/libudev.la
+lrwxrwxrwx     root/root       usr/lib/libudev.so -> ../../lib/libudev.so.1.4.1
+drwxr-xr-x     root/root       usr/lib/pkgconfig/
+-rw-r--r--     root/root       usr/lib/pkgconfig/libudev.pc
+drwxr-xr-x     root/root       usr/share/
+drwxr-xr-x     root/root       usr/share/pkgconfig/
+-rw-r--r--     root/root       usr/share/pkgconfig/udev.pc
diff --git a/eudev/.md5sum b/eudev/.md5sum
new file mode 100644 (file)
index 0000000..93fefea
--- /dev/null
@@ -0,0 +1,3 @@
+192ea585fd7a61b3dfbdf0e1f97fc0fa  81-crux.rules
+4520cf7ba2ec4be1bd0ac5ff75c8b315  eudev-1.8.tar.gz
+b8eaab326b0328afc4a19db88d8e6bec  start_udev
diff --git a/eudev/81-crux.rules b/eudev/81-crux.rules
new file mode 100644 (file)
index 0000000..ad1e687
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# 81-crux.rules
+# 
+
+KERNEL=="fuse", ACTION=="add", RUN+="/bin/mount -t fusectl fusectl /sys/fs/fuse/connections"
diff --git a/eudev/Pkgfile b/eudev/Pkgfile
new file mode 100644 (file)
index 0000000..117e816
--- /dev/null
@@ -0,0 +1,74 @@
+# Description: Userspace device management daemon
+# URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
+# Maintainer: CRUX System Team, core-ports at crux dot nu
+# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
+
+name=eudev
+version=1.8
+release=1
+source=(http://dev.gentoo.org/~blueness/$name/$name-$version.tar.gz
+        81-crux.rules start_udev)
+
+build () {
+  # backup for next build of udevadm on host and use it to gnerate hwdb
+  cp -r $name-$version $name-$version-host
+
+  cd $name-$version
+  sed -i '/^Libs:/s/-ludev/-ludev -lrt/' src/libudev/libudev.pc.in
+
+  # Forcing libtool to prioritize our sysroot
+  sed "s|lt_sysroot=|lt_sysroot=$CLFS|g" -i m4/libtool.m4
+
+  ./configure --build=$CHOST \
+              --host=$CTARGET \
+              --prefix=/usr \
+              --sbindir=/sbin --bindir=/sbin \
+              --sysconfdir=/etc \
+              --with-rootprefix= \
+              --with-rootlibdir=/lib \
+              --libexecdir=/lib \
+              --disable-introspection \
+              --disable-gudev \
+              --disable-manpages \
+              --disable-keymap \
+              --enable-split-usr \
+              --enable-modules \
+              --enable-libkmod
+    
+  make CFLAGS="$CFLAGS -D_GNU_SOURCE"
+  make install DESTDIR=$PKG
+  
+  # udevadm build to use it later on host to generate hwdb
+  pushd $SRC/$name-$version-host
+  unset CC CXX AR AS RANLIB LD CFLAGS CXXFLAGS LDFLAGS
+
+  ./configure --prefix=/usr \
+              --sbindir=/sbin --bindir=/sbin \
+              --sysconfdir=/etc \
+              --with-rootprefix= \
+              --with-rootlibdir=/lib \
+              --libexecdir=/lib \
+              --disable-introspection \
+              --disable-gudev \
+              --disable-manpages \
+              --disable-keymap \
+              --enable-split-usr \
+              --enable-modules \
+              --enable-libkmod
+
+  make CFLAGS="-L/usr/lib -I/usr/include -D_GNU_SOURCE"
+  cp src/udev/udevadm $WORK/
+  popd
+    
+  # create binary hwdb
+  LD_LIBRARY_PATH=$PKG/lib \
+  $WORK/udevadm hwdb --update --root=$PKG
+
+  # Devices
+  mkdir -p $PKG/lib/{firmware,udev/devices/{pts,shm}}
+  mkdir -p $PKG/{lib,sbin,run}
+
+  # Add CRUX items
+  install -m 0755 $SRC/start_udev $PKG/sbin
+  install -m 0644 $SRC/81-crux.rules $PKG/lib/udev/rules.d
+}
diff --git a/eudev/start_udev b/eudev/start_udev
new file mode 100644 (file)
index 0000000..0339184
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# - if /dev is not mounted - mount as a devtmpfs (CONFIG_DEVTMPFS=y)
+# - if /dev is mounted (e.g. due to handover from initramfs or
+#   CONFIG_DEVTMPFS_MOUNT=y), remount with specific options
+# - some video drivers require exec access in /dev, thus it's set here
+# - for completness, we add few sanity limits (2k non-empty files, 16k inodes)
+
+UDEVOPTS="exec,nosuid,noatime,mode=0755,nr_blocks=2048,nr_inodes=16384"
+if /bin/mountpoint -q /dev ; then
+    /bin/mount -n -o remount,${UDEVOPTS} dev /dev
+else
+    /bin/mount -n -t devtmpfs -o ${UDEVOPTS} dev /dev
+fi
+
+# mount /run directory
+/bin/mount -n -t tmpfs -o mode=0755,nosuid,nodev,exec tmpfs /run
+
+# make sure hotplugger is not set
+echo > /proc/sys/kernel/hotplug
+
+# copy devcies from /lib/udev/devices
+cp -ar /lib/udev/devices/* /dev
+
+# launch udev daemon, make sure it's not running first
+test -z "$(/bin/pidof -s udevd)" && /sbin/udevd --daemon
+
+# coldplug devices and wait for the queue to be processed
+/sbin/udevadm trigger --type=subsystems --action=add
+/sbin/udevadm trigger --type=devices --action=add
+/sbin/udevadm settle