Upgrade from udev to eudev
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 17 Sep 2013 00:36:03 +0000 (20:36 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Thu, 31 Jul 2014 02:15:25 +0000 (22:15 -0400)
Remove null and console static devices creation, they are provided by the
kernel devtmpfs.

Move other static devices creation to eudev post-install script.

config/packages-list
stage1/bootscripts/udev
stage1/hv-install-2
stage1/packages-update
stage1/pkg/eudev [new file with mode: 0644]
stage1/pkg/udev [deleted file]
stage1/post-install

index 480b466..f7f1c00 100644 (file)
@@ -403,7 +403,7 @@ TK="tk8.5.9-src"
 TRANSMISSION="transmission-2.60"
 TUNCTL="tunctl-1.5"
 
-UDEV="udev-182"
+EUDEV="eudev-1.2"
 UNRAR="unrar-4.2.4"
 UNZIP="unzip-6.0"
 UPSTART="upstart-0.6.3"
index 34e1ce1..12527a5 100644 (file)
@@ -3,7 +3,7 @@
 # udev
 # Udev cold-plugging script
 
-DAEMON=/lib/udev/udevd
+DAEMON=/sbin/udevd
 DAEMON_DESC=UDEV
 DAEMON_OPTS="--daemon"
 
@@ -18,11 +18,11 @@ udev_coldplug()
     mkdir -p /dev/udev/queue &&
 
     # Configure all devices
-    /bin/udevadm trigger --action=add --type=subsystems &&
-    /bin/udevadm trigger --action=add --type=devices &&
+    /sbin/udevadm trigger --action=add --type=subsystems &&
+    /sbin/udevadm trigger --action=add --type=devices &&
 
     # Now wait for udevd to process the uevents we triggered
-    /bin/udevadm settle
+    /sbin/udevadm settle
 }
 
 udev_start()
index 8a4da91..79be861 100755 (executable)
@@ -70,7 +70,9 @@ ipkg ${SHADOW} "\
 ipkg ${E2FSPROGS}
 ipkg -m noac ${SYSVINIT}
 ipkg ${KMOD}
-ipkg ${UDEV}
+
+LDFLAGS="-Wl,-rpath,/tools/lib:/lib" \
+    ipkg ${EUDEV}
 ipkg -c -m noac ${KERNEL}
 
 rscr once "Creating default users" create-users
index 7ac3ba4..1401ed5 100755 (executable)
@@ -56,6 +56,6 @@ fpkg -m sf ${E2FSPROGS}
 fpkg ${SYSVINIT} "http://download.savannah.gnu.org/releases/sysvinit"
 fpkg -e "tar.xz" -s "linux/utils/kernel/kmod" ${KMOD} ${KERNEL_URL}
 
-fpkg -s "linux/utils/kernel/hotplug" ${UDEV} ${KERNEL_URL}
+fpkg ${EUDEV} "ftp://mirror.ovh.net/gentoo-distfiles/distfiles"
 
 exit $?
diff --git a/stage1/pkg/eudev b/stage1/pkg/eudev
new file mode 100644 (file)
index 0000000..b36838f
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+hvconfig_pre()
+{
+    export BLKID_CFLAGS="-I/tools/include"
+    export BLKID_LIBS="-L/tools/lib -lblkid"
+    export KMOD_CFLAGS="-I/tools/include/"
+    export KMOD_LIBS="-L/tools/lib -lkmod"
+
+    CONFIGURE_OPTS="\
+        --prefix=/usr \
+        --build=${CLFS_HOST} \
+        --host=${CLFS_TARGET} \
+        --with-rootprefix= \
+        --enable-split-usr \
+        --sysconfdir=/etc \
+        --libexecdir=/lib \
+        --bindir=/sbin \
+        --sbindir=/sbin \
+        --libdir=/lib \
+        --disable-introspection \
+        --disable-gtk-doc-html \
+        --disable-gudev \
+        --disable-keymap \
+        --with-firmware-path=/lib/firmware \
+        --enable-libkmod"
+
+    cd ${LFS_TMP}/${PACKAGE}
+
+}
+
+hvbuild()
+{
+    make
+    make DESTDIR=${LFS} install
+}
+
+hvbuild_post()
+{
+    install -dv ${LFS}/lib/{firmware,udev/devices}
+
+    # Static UDEV devices
+    if [ ! -c ${LFS}/lib/udev/devices/kmsg ]; then
+        mknod -m0666 ${LFS}/lib/udev/devices/kmsg c 1 11
+    fi
+
+    if [ ! -h ${LFS}/lib/udev/devices/fd ]; then
+        ln -sfv /proc/self/fd ${LFS}/lib/udev/devices/fd
+    fi
+
+    if [ ! -h ${LFS}/lib/udev/devices/stdin ]; then
+        ln -sfv /proc/self/fd/0 ${LFS}/lib/udev/devices/stdin
+    fi
+
+    if [ ! -h ${LFS}/lib/udev/devices/stdout ]; then
+        ln -sfv /proc/self/fd/1 ${LFS}/lib/udev/devices/stdout
+    fi
+
+    if [ ! -h ${LFS}/lib/udev/devices/stderr ]; then
+        ln -sfv /proc/self/fd/2 ${LFS}/lib/udev/devices/stderr
+    fi
+
+    if [ ! -h ${LFS}/lib/udev/devices/core ]; then
+        ln -sfv /proc/kcore ${LFS}/lib/udev/devices/core
+    fi
+}
diff --git a/stage1/pkg/udev b/stage1/pkg/udev
deleted file mode 100644 (file)
index 4333579..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-hvconfig_pre()
-{
-    export LIBS="-lpthread"
-    export BLKID_CFLAGS="-I/tools/include/blkid"
-    export BLKID_LIBS="-L/tools/lib64 -lblkid"
-    export KMOD_CFLAGS="-I/tools/include"
-    export KMOD_LIBS="-L${CLFS}/lib64 -lkmod"
-
-    CONFIGURE_OPTS="\
-        --prefix=/usr \
-        --build=${CLFS_HOST} \
-        --host=${CLFS_TARGET} \
-        --exec-prefix="" \
-        --with-rootprefix=${LFS}
-        --sysconfdir=/etc \
-        --libexecdir=/lib \
-        --disable-introspection \
-        --with-usb-ids-path=no \
-        --with-pci-ids-path=no \
-        --disable-gtk-doc-html \
-        --disable-gudev \
-        --disable-keymap \
-        --disable-logging"
-
-    cd ${LFS_TMP}/${PACKAGE}
-    install -dv ${LFS}/lib/{firmware,udev/devices/{pts,shm}}
-}
-
-hvbuild()
-{
-    make
-    make DESTDIR=${LFS} install
-}
index e9c8eaa..22624cb 100755 (executable)
@@ -2,46 +2,6 @@
 
 source ../functions/main
 
-# We need /dev/null and /dev/console before udev is started.
-mkdir -pv ${LFS}/dev
-
-if [ ! -c ${LFS}/dev/console ]; then
-    mknod -m 0600 ${LFS}/dev/console c 5 1
-fi
-
-if [ ! -c ${LFS}/dev/null ]; then
-    mknod -m 0666 ${LFS}/dev/null c 1 3
-fi
-
-# Static UDEV devices
-if [ ! -c ${LFS}/lib/udev/devices/null ]; then
-    mknod -m0666 ${LFS}/lib/udev/devices/null c 1 3
-fi
-
-if [ ! -c ${LFS}/lib/udev/devices/kmsg ]; then
-    mknod -m0666 ${LFS}/lib/udev/devices/kmsg c 1 11
-fi
-
-if [ ! -h ${LFS}/lib/udev/devices/fd ]; then
-    ln -sfv /proc/self/fd ${LFS}/lib/udev/devices/fd
-fi
-
-if [ ! -h ${LFS}/lib/udev/devices/stdin ]; then
-    ln -sfv /proc/self/fd/0 ${LFS}/lib/udev/devices/stdin
-fi
-
-if [ ! -h ${LFS}/lib/udev/devices/stdout ]; then
-    ln -sfv /proc/self/fd/1 ${LFS}/lib/udev/devices/stdout
-fi
-
-if [ ! -h ${LFS}/lib/udev/devices/stderr ]; then
-    ln -sfv /proc/self/fd/2 ${LFS}/lib/udev/devices/stderr
-fi
-
-if [ ! -h ${LFS}/lib/udev/devices/core ]; then
-    ln -sfv /proc/kcore ${LFS}/lib/udev/devices/core
-fi
-
 # Change the ownership for ${LFS} and its subdirectories
 chown -Rv root:root ${LFS}