bump udev and clean up
cover bump udev and clean up
Following patches update udev to 172 and handle its dependencies.
Udev changed much compared with the current version in BR. Except eliminating obsolete patches, the startup script was also changed. There is no udevstart executable any more, udevadm manages communication with udevd instead. /dev/null is created either via devtmpfs of via device file, so no need to do it in the startup script.
usbmount 0.0.14.1 used vol_id executable, that was part of older udev version. vol_id was replaced by blkid, that is part of util-linux. So util-linux was also updated and usbmount selects both util-linux and blkid. blkid provided by BusyBox's blkid delivers not enough info about the block device, so util-linux is a must.
Futher usbmount issues were addressed:
1. recent blkid show not only file system type, but also partition type:
/dev/sdb1: VERSION="0.0" TYPE="ext2" USAGE="filesystem" PART_ENTRY_SCHEME="dos" PART_ENTRY_TYPE="0xc" PART_ENTRY_FLAGS="0x80" PART_ENTRY_NUMBER="1"
in this case parsing script took the value of partition type instead of file system type. Parsing was changed to search for " TYPE". It were very helpful, ff some one could provide better regular expression for this case.
2. udev rules for usbmount should react at "usb" subsystem, however it is reported as "block", so rules were also patched.
looking at device '/block/sdb/sdb1':
KERNEL=="sdb1"
SUBSYSTEM=="block"
DRIVER==""
ATTR{partition}=="1"
ATTR{start}=="32"
ATTR{size}=="31457248"
ATTR{ro}=="0"
ATTR{alignment_offset}=="0"
ATTR{discard_alignment}=="0"
ATTR{stat}==" 403 235 3184 470 1 0 2
0 0 450 460"
ATTR{inflight}==" 0 0" Yegor
PATCH 1/3 bump udev and clean up
--- package/udev/Config.in | 43 +++-------- package/udev/S10udev | 6 - package/udev/libvolume_id.la.tmpl | 35 --------- package/udev/udev.mk | 144 ++++++-------------------------------- 4 files changed, 36 insertions(+), 192 deletions(-) delete mode 100644 package/udev/libvolume_id.la.tmpl
package/udev/Config.in +12 -31
@@ -5,37 +5,18 @@ ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ -config BR2_PACKAGE_UDEV_UTILS - bool "udev-utils" +config BR2_PACKAGE_UDEV_ALL_EXTRAS + bool "enable all extras" depends on BR2_PACKAGE_UDEV + select BR2_PACKAGE_ACL + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + select BR2_PACKAGE_USBUTILS + select BR2_PACKAGE_HWDATA + select BR2_PACKAGE_LIBGLIB2 help - Adds the udevmonitor, udevinfo, and udevtest binaries - to your filesystem. + Enable all extras with external dependencies like + libacl, libusb, libusb-compat, usbutils, hwdata -menu "Extra udev tools" - depends on BR2_PACKAGE_UDEV - -config BR2_PACKAGE_UDEV_VOLUME_ID - bool "udev-libvolume_id" - depends on BR2_PACKAGE_UDEV - help - Build and install volume identification library. - -config BR2_PACKAGE_UDEV_SCSI_ID - bool "udev-scsi_id" - depends on BR2_PACKAGE_UDEV_VOLUME_ID - help - Build and install SCSI disk identification library. - -config BR2_PACKAGE_UDEV_PATH_ID - bool "udev-path_id" - depends on BR2_PACKAGE_UDEV_VOLUME_ID - help - Install udev's unique device path generation program path_id. - -config BR2_PACKAGE_UDEV_FIRMWARE_SH - bool "udev-firmware_sh" - depends on BR2_PACKAGE_UDEV_VOLUME_ID - help - Install udev's firmware loading script firmware.sh. -endmenu +comment "extras requires a toolchain with LARGEFILE + WCHAR support" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
package/udev/libvolume_id.la.tmpl deleted +0 -35
@@ -1,35 +0,0 @@ -# libvolume_id.la - a libtool library file -# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libvolume_id.so.REPLACE_CURRENT' - -# Names of this library. -library_names='libvolume_id.so.REPLACE_CURRENT.REPLACE_AGE.REPLACE_REVISION libvolume_id.so.REPLACE_CURRENT libvolume_id.so' - -# The name of the static archive. -old_library='libvolume_id.a' - -# Libraries that this one depends upon. -dependency_libs=' -lc' - -# Version information for libvolume_id. -current=REPLACE_CURRENT -age=REPLACE_AGE -revision=REPLACE_REVISION - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='REPLACE_LIB_DIR'
package/udev/udev.mk +23 -121
155 lines not on this page · raw message
package/udev/S10udev +1 -5
@@ -19,8 +19,6 @@ # Check for missing binaries UDEV_BIN=/sbin/udevd test -x $UDEV_BIN || exit 5 -UDEVSTART_BIN=/sbin/udevstart -test -x $UDEVSTART_BIN || exit 5 # Check for config file and read it UDEV_CONFIG=/etc/udev/udev.conf
@@ -29,16 +27,14 @@ case "$1" in start) - mknod -m 0666 /dev/null c 1 3 echo -n "Populating $udev_root using udev: " echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug $UDEV_BIN -d || (echo "FAIL" && exit 1) - $UDEVSTART_BIN || (echo "FAIL" && exit 1) echo "done" ;; stop) # Stop execution of events - udevcontrol stop_exec_queue + udevadm control --stop_exec_queue killall udevd ;; *)
PATCH 2/3 util-linux: convert to autotarget and bump to 2.19.1
--- package/util-linux/Config.in | 113 ++ package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch | 41 package/util-linux/util-linux-no-nls-fix.patch | 25 package/util-linux/util-linux-susv3-legacy.patch | 429 ---------- package/util-linux/util-linux-uclibc-build-fix.patch | 16 package/util-linux/util-linux-umount2-fix.patch | 20 package/util-linux/util-linux.mk | 180 ++-- 7 files changed, 230 insertions(+), 594 deletions(-)
package/util-linux/Config.in +112 -1
@@ -1,4 +1,4 @@ -config BR2_PACKAGE_UTIL-LINUX +config BR2_PACKAGE_UTIL_LINUX bool "util-linux" select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
@@ -12,3 +12,114 @@ comment "util-linux requires a toolchain with RPC support" depends on !BR2_INET_RPC + +menu "util-linux tool support" + depends on BR2_PACKAGE_UTIL_LINUX + +############################################ +# default enabled and should be disabled by +# --disable-foo +# + +config BR2_PACKAGE_UTIL_LINUX_MOUNT + bool "build mount utilties" + default y + +config BR2_PACKAGE_UTIL_LINUX_FSCK + bool "build \"fsck\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_LIBUUID + bool "build libuuid and uuid utilities" + default y + +config BR2_PACKAGE_UTIL_LINUX_UUIDD + bool "build \"uuidd\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_LIBBLKID + bool "build libblkid and blkid utilities" + default y + +config BR2_PACKAGE_UTIL_LINUX_AGETTY + bool "build \"agetty\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_CRAMFS + bool "build \"fsck.cramfs, mkfs.cramfs\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT + bool "build \"switch_root\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT + bool "build \"pivot_root\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_FALLOCATE + bool "build \"fallocate\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_UNSHARE + bool "build \"unshare\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_RENAME + bool "build \"rename\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS + bool "build \"chrt, ionice, teskset\"" + default y + +config BR2_PACKAGE_UTIL_LINUX_WALL + bool "build \"wall\"" + default y + + +############################################ +# default disabled and should be enabled by +# --enable-foo +# +config BR2_PACKAGE_UTIL_LINUX_ARCH + bool "build \"arch\"" + default n + +config BR2_PACKAGE_UTIL_LINUX_INIT + bool "build \"simpleinit, shutdown, initctl\"" + default n + +config BR2_PACKAGE_UTIL_LINUX_KILL + bool "build \"kill\"" + default n + +config BR2_PACKAGE_UTIL_LINUX_LAST + bool "build \"last\"" + default n + +config BR2_PACKAGE_UTIL_LINUX_MESG + bool "build \"kill\"" + default n + +config BR2_PACKAGE_UTIL_LINUX_PARTX + bool "build \"addpart, delpart, partx\"" + default n + +config BR2_PACKAGE_UTIL_LINUX_RAW + bool "build \"raw\"" + default n + +config BR2_PACKAGE_UTIL_LINUX_RESET + bool "build \"reset\"" + default n + +config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "build \"chfn, chsh, login, newgrp, vipw\"" + default n + +config BR2_PACKAGE_UTIL_LINUX_WRITE + bool "build \"addpart, delpart, partx\"" + default n + +endmenu
package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch deleted +0 -41
41 lines not on this page · raw message
package/util-linux/util-linux-no-nls-fix.patch deleted +0 -25
@@ -1,25 +0,0 @@ -[PATCH]: fix util-linux build without NLS support - -util-linux partly supports builds without NLS support, but it forgets to -provide a dummy setlocale() macro. - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - include/nls.h | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: util-linux-2.13-pre7/include/nls.h -=================================================================== ---- util-linux-2.13-pre7.orig/include/nls.h -+++ util-linux-2.13-pre7/include/nls.h -@@ -19,6 +19,10 @@ - # define textdomain(Domain) /* empty */ - # define _(Text) (Text) - # define N_(Text) (Text) -+# undef LC_ALL -+# define LC_ALL 0 -+# undef setlocale -+# define setlocale(category, locale) - #endif - -
package/util-linux/util-linux-susv3-legacy.patch deleted +0 -429
429 lines not on this page · raw message
package/util-linux/util-linux-umount2-fix.patch deleted +0 -20
@@ -1,20 +0,0 @@ -[PATCH] fix multiple definitions of umount2 issue - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - mount/umount.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: util-linux-2.13-pre7/mount/umount.c -=================================================================== ---- util-linux-2.13-pre7.orig/mount/umount.c -+++ util-linux-2.13-pre7/mount/umount.c -@@ -29,7 +29,7 @@ - #include "nfsmount.h" - #include <arpa/inet.h> - --#if defined(MNT_FORCE) && !defined(__sparc__) && !defined(__arm__) -+#if 1 - /* Interesting ... it seems libc knows about MNT_FORCE and presumably - about umount2 as well -- need not do anything */ - #else /* MNT_FORCE */
package/util-linux/util-linux.mk +102 -78
202 lines not on this page · raw message
package/util-linux/util-linux-uclibc-build-fix.patch new file +16 -0
@@ -0,0 +1,16 @@ +Signed-off-by: Khem Raj <[email protected]> + +Index: util-linux-2.19.1/configure.ac +=================================================================== +--- util-linux-2.19.1.orig/configure.ac ++++ util-linux-2.19.1/configure.ac +@@ -250,7 +250,7 @@ esac + + + AC_MSG_CHECKING(whether program_invocation_short_name is defined) +-AC_TRY_COMPILE([#include <argp.h>], ++AC_TRY_COMPILE([#include <errno.h>], + [program_invocation_short_name = "test";], + AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1, + [Define if program_invocation_short_name is defined]) +
PATCH 3/3 usbmount fixes
- create mounting points
- fix dependencies
- fix udev rules
- fix fs type detection
--- package/usbmount/Config.in | 2 + package/usbmount/usbmount-fstype-detection-fix.patch | 25 +++++++++++++++++++ package/usbmount/usbmount-rules-fix.patch | 19 ++++++++++++++ package/usbmount/usbmount.mk | 24 +++++++++++++++--- 4 files changed, 66 insertions(+), 4 deletions(-)
package/usbmount/Config.in +2 -0
@@ -2,6 +2,8 @@ bool "usbmount" select BR2_PACKAGE_UDEV select BR2_PACKAGE_LOCKFILE_PROGS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID help The usbmount package automatically mounts USB mass storage devices when they are plugged in, and unmounts them when they are removed.
package/usbmount/usbmount-fstype-detection-fix.patch new file +25 -0
@@ -0,0 +1,25 @@ +newer blkid version shows two parameter with TYPE within: + +/dev/sda1: VERSION="0.0" TYPE="ext2" USAGE="filesystem" PART_ENTRY_SCHEME="dos" +PART_ENTRY_TYPE="0xc" PART_ENTRY_FLAGS="0x80" PART_ENTRY_NUMBER="1" + +change regular expression to take " TYPE" only + +Signed-off-by: Yegor Yefremov <[email protected]> +--- + usbmount | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: b/usbmount +=================================================================== +--- a/usbmount ++++ b/usbmount +@@ -88,7 +88,7 @@ + # FIXME: improvement: implement mounting by label (notice that labels + # can contain spaces, which makes things a little bit less comfortable). + DEVINFO=$(/sbin/blkid -p $DEVNAME) +- FSTYPE=$(echo "$DEVINFO" | sed 's/.*TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') ++ FSTYPE=$(echo "$DEVINFO" | sed 's/.* TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') + UUID=$(echo "$DEVINFO" | sed 's/.*UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') + USAGE=$(echo "$DEVINFO" | sed 's/.*USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +
package/usbmount/usbmount.mk +20 -4
@@ -6,20 +6,36 @@ USBMOUNT_VERSION = 0.0.21 USBMOUNT_SOURCE = usbmount_$(USBMOUNT_VERSION).tar.gz USBMOUNT_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/u/usbmount -USBMOUNT_DEPENDENCIES = udev lockfile-progs +USBMOUNT_DEPENDENCIES = udev lockfile-progs util-linux define USBMOUNT_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 -D $(@D)/usbmount $(TARGET_DIR)/usr/share/usbmount/usbmount + + $(INSTALL) -m 0755 -D $(@D)/00_create_model_symlink \ + $(TARGET_DIR)/etc/usbmount/usbmount.d/00_create_model_symlink + $(INSTALL) -m 0755 -D $(@D)/00_remove_model_symlink \ + $(TARGET_DIR)/etc/usbmount/usbmount.d/00_remove_model_symlink + $(INSTALL) -m 0644 -D $(@D)/usbmount.rules $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules @if [ ! -f $(TARGET_DIR)/etc/usbmount/usbmount.conf ]; then \ $(INSTALL) -m 0644 -D $(@D)/usbmount.conf $(TARGET_DIR)/etc/usbmount/usbmount.conf; \ fi + + mkdir -p $(TARGET_DIR)/media + mkdir -p $(TARGET_DIR)/media/usb0 + mkdir -p $(TARGET_DIR)/media/usb1 + mkdir -p $(TARGET_DIR)/media/usb2 + mkdir -p $(TARGET_DIR)/media/usb3 + mkdir -p $(TARGET_DIR)/media/usb4 + mkdir -p $(TARGET_DIR)/media/usb5 + mkdir -p $(TARGET_DIR)/media/usb6 endef define USBMOUNT_UNINSTALL_TARGET_CMDS - rm -rf $(TARGET_DIR)/etc/usbmount \ - $(TARGET_DIR)/usr/share/usbmount/usbmount \ - $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules + rm -rf $(TARGET_DIR)/etc/usbmount \ + $(TARGET_DIR)/usr/share/usbmount/usbmount \ + $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules \ + $(TARGET_DIR)/media endef $(eval $(call GENTARGETS,package,usbmount))
package/usbmount/usbmount-rules-fix.patch new file +19 -0
@@ -0,0 +1,19 @@ +Signed-off-by: Yegor Yefremov <[email protected]> +--- + usbmount.rules | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: b/usbmount.rules +=================================================================== +--- a/usbmount.rules ++++ b/usbmount.rules +@@ -1,7 +1,7 @@ + # Rules for USBmount -*- conf -*- + + KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" +-KERNEL=="sd*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" +-KERNEL=="ub*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" ++KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" ++KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" + KERNEL=="sd*", ACTION=="remove", RUN+="/usr/share/usbmount/usbmount remove" + KERNEL=="ub*", ACTION=="remove", RUN+="/usr/share/usbmount/usbmount remove"
PATCH 3/3 usbmount fixes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yegor" == Yegor Yefremov <[email protected]> writes:
Yegor> - create mounting points
Yegor> - fix dependencies
Yegor> - fix udev rules
Yegor> - fix fs type detection
Yegor> +++ b/package/usbmount/usbmount-rules-fix.patch Yegor> @@ -0,0 +1,19 @@
Yegor> +Signed-off-by: Yegor Yefremov <[email protected]> Yegor> +---
Yegor> + usbmount.rules | 4 ++--
Yegor> + 1 file changed, 2 insertions(+), 2 deletions(-)
Yegor> +
Yegor> +Index: b/usbmount.rules
Yegor> +=================================================================== Yegor> +--- a/usbmount.rules
Yegor> ++++ b/usbmount.rules
Yegor> +@@ -1,7 +1,7 @@
Yegor> + # Rules for USBmount -*- conf -*-
Yegor> +
Yegor> + KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
Yegor> +-KERNEL=="sd*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
Yegor> +-KERNEL=="ub*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
Yegor> ++KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
Yegor> ++KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add"
Why? Is this udev and/or kernel version dependent? Have you submitted it upstream?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 3/3 usbmount fixes
Quoted 27 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yegor" == Yegor Yefremov <[email protected]> writes:
?Yegor> - create mounting points
?Yegor> - fix dependencies
?Yegor> - fix udev rules
?Yegor> - fix fs type detection?Yegor> +++
b/package/usbmount/usbmount-rules-fix.patch
?Yegor> @@ -0,0 +1,19 @@
?Yegor> +Signed-off-by: Yegor Yefremov <[email protected]>
?Yegor> +---
?Yegor> + usbmount.rules | ? ?4 ++--
?Yegor> + 1 file changed, 2 insertions(+), 2 deletions(-)
?Yegor> +
?Yegor> +Index: b/usbmount.rules
?Yegor> +===================================================================
?Yegor> +--- a/usbmount.rules
?Yegor> ++++ b/usbmount.rules
?Yegor> +@@ -1,7 +1,7 @@
?Yegor> + # Rules for USBmount -*- conf -*-
?Yegor> +
?Yegor> + KERNEL=="sd*", DRIVERS=="sbp2", ? ? ? ? ? ? ? ACTION=="add", ?RUN+="/usr/share/usbmount/usbmount add" ?Yegor> +-KERNEL=="sd*", SUBSYSTEMS=="usb", ? ? ACTION=="add", ?RUN+="/usr/share/usbmount/usbmount add" ?Yegor> +-KERNEL=="ub*", SUBSYSTEMS=="usb", ? ? ACTION=="add", ?RUN+="/usr/share/usbmount/usbmount add" ?Yegor> ++KERNEL=="sd*", SUBSYSTEM=="block", ? ?ACTION=="add", ?RUN+="/usr/share/usbmount/usbmount add" ?Yegor> ++KERNEL=="ub*", SUBSYSTEM=="block", ? ?ACTION=="add", ?RUN+="/usr/share/usbmount/usbmount add"
Quoted 2 lines
Why? Is this udev and/or kernel version dependent? Have you submitted it upstream?
I'm negotiating with Rog?rio Brito and I'll let you know of the progress. At least I sent the patch fixing FSTYPE detection. SUBSYSTEM=="block" was already mentioned here in this mailingslist, when discussing usbmount failure.
Yegor
PATCH 3/3 usbmount fixes
In reply to Yegor YefremovQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yegor" == Yegor Yefremov <[email protected]> writes:
Yegor> - create mounting points
Yegor> - fix dependencies
Yegor> - fix udev rules
Yegor> - fix fs type detection
Thanks, committed with some fixes (see below).
Yegor> Index: b/package/usbmount/Config.in
Yegor> =================================================================== Yegor> --- a/package/usbmount/Config.in
Yegor> +++ b/package/usbmount/Config.in
Yegor> @@ -2,6 +2,8 @@
Yegor> bool "usbmount" Yegor> select BR2_PACKAGE_UDEV Yegor> select BR2_PACKAGE_LOCKFILE_PROGS
Yegor> + select BR2_PACKAGE_UTIL_LINUX
Yegor> + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
util-linux needs wchar + largefile, and is only visible if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS, so those needs to be selected (and a comment shown if wchar/largefile isn't available).
Yegor> +++ b/package/usbmount/usbmount.mk
Yegor> @@ -6,20 +6,36 @@
Yegor> USBMOUNT_VERSION = 0.0.21 Yegor> USBMOUNT_SOURCE = usbmount_$(USBMOUNT_VERSION).tar.gz Yegor> USBMOUNT_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/u/usbmount
Yegor> -USBMOUNT_DEPENDENCIES = udev lockfile-progs Yegor> +USBMOUNT_DEPENDENCIES = udev lockfile-progs util-linux
Yegor> define USBMOUNT_INSTALL_TARGET_CMDS
Yegor> $(INSTALL) -m 0755 -D $(@D)/usbmount $(TARGET_DIR)/usr/share/usbmount/usbmount
Yegor> +
Yegor> + $(INSTALL) -m 0755 -D $(@D)/00_create_model_symlink \
Yegor> + $(TARGET_DIR)/etc/usbmount/usbmount.d/00_create_model_symlink
Yegor> + $(INSTALL) -m 0755 -D $(@D)/00_remove_model_symlink \
Yegor> + $(TARGET_DIR)/etc/usbmount/usbmount.d/00_remove_model_symlink
Yegor> +
Yegor> $(INSTALL) -m 0644 -D $(@D)/usbmount.rules $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules Yegor> @if [ ! -f $(TARGET_DIR)/etc/usbmount/usbmount.conf ]; then \ Yegor> $(INSTALL) -m 0644 -D $(@D)/usbmount.conf $(TARGET_DIR)/etc/usbmount/usbmount.conf; \ Yegor> fi
Yegor> +
Yegor> + mkdir -p $(TARGET_DIR)/media
Yegor> + mkdir -p $(TARGET_DIR)/media/usb0
Yegor> + mkdir -p $(TARGET_DIR)/media/usb1
Yegor> + mkdir -p $(TARGET_DIR)/media/usb2
Yegor> + mkdir -p $(TARGET_DIR)/media/usb3
Yegor> + mkdir -p $(TARGET_DIR)/media/usb4
Yegor> + mkdir -p $(TARGET_DIR)/media/usb5
Yegor> + mkdir -p $(TARGET_DIR)/media/usb6
usbmount handles /media/usb[0-7], so you forgot usb7.
Yegor> Index: b/package/usbmount/usbmount-rules-fix.patch Yegor> =================================================================== Yegor> --- /dev/null
Yegor> +++ b/package/usbmount/usbmount-rules-fix.patch
Yegor> @@ -0,0 +1,19 @@
Yegor> +Signed-off-by: Yegor Yefremov <[email protected]>
Please provide a proper description of what patches do in the future.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 3/3 usbmount fixes
Quoted 8 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yegor" == Yegor Yefremov <[email protected]> writes:
?Yegor> - create mounting points
?Yegor> - fix dependencies
?Yegor> - fix udev rules
?Yegor> - fix fs type detectionThanks, committed with some fixes (see below).
........
Quoted 1 line
Please provide a proper description of what patches do in the future.
1. fix file system type detection due to multiple entries with keyword TYPE (already submitted)
2. automatic mounting points generation. Patch exists
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=361693), but has to be adapted to the latest usbmount version
3. udev rules: SUBSYSTEMS=="usb" trigger is not working, after searching the mailingslist I found some links, as suggestion how to fix/substitue usbmount:
http://lists.busybox.net/pipermail/buildroot/2011-April/042455.html
It would be great, if we could fix all these issues before next usbmount release.
Yegor
PATCH 2/3 util-linux: convert to autotarget and bump to 2.19.1
In reply to Yegor YefremovQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yegor" == Yegor Yefremov <[email protected]> writes:
Thanks, committed with some changes (see below).
Yegor> Signed-off-by: Chih-Min Chao <[email protected]> Yegor> Signed-off-by: Yegor Yefremov <[email protected]> Yegor> ---
Yegor> package/util-linux/Config.in | 113 ++ Yegor> package/util-linux/util-linux-2.13-pre17-hardcode-a-out-constants.patch | 41 Yegor> package/util-linux/util-linux-no-nls-fix.patch | 25 Yegor> package/util-linux/util-linux-susv3-legacy.patch | 429 ---------- Yegor> package/util-linux/util-linux-uclibc-build-fix.patch | 16 Yegor> package/util-linux/util-linux-umount2-fix.patch | 20 Yegor> package/util-linux/util-linux.mk | 180 ++--
Yegor> 7 files changed, 230 insertions(+), 594 deletions(-)
Yegor> Index: b/package/util-linux/Config.in
Yegor> =================================================================== Yegor> --- a/package/util-linux/Config.in
Yegor> +++ b/package/util-linux/Config.in
Yegor> @@ -1,4 +1,4 @@
Yegor> -config BR2_PACKAGE_UTIL-LINUX
Yegor> +config BR2_PACKAGE_UTIL_LINUX
Yegor> bool "util-linux" Yegor> select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE Yegor> select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE
After some tests I see that gettext/libintl/rpc aren't needed, but instead largefile+wchar+program_invocation are.
Yegor> @@ -12,3 +12,114 @@
Yegor> comment "util-linux requires a toolchain with RPC support"
Yegor> depends on !BR2_INET_RPC
Yegor> +
Yegor> +menu "util-linux tool support"
Yegor> + depends on BR2_PACKAGE_UTIL_LINUX
I dislike all the sub menus, so I instead made all these suboptions to util-linux instead.
Yegor> +++ b/package/util-linux/util-linux.mk
Yegor> +############################################# Yegor> +#
Yegor> +# disable default utilities
Yegor> +#
Yegor> +ifeq ($(BR2_PACKAGE_UTIL_LINUX_MOUNT),n) Yegor> +UTIL_LINUX_CONF_OPT += --disable-mount Yegor> endif
I've reworked these to the less verbose form:
$(if $(BR2_PACKAGE_UTIL_LINUX_blah),,--disable-blah)
Yegor> +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),n) Yegor> +UTIL_LINUX_CONF_OPT += --disable-libblkid Yegor> +endif
Typo.
You seem to have forgotten unshare.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/3 bump udev and clean up
In reply to Yegor YefremovQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yegor" == Yegor Yefremov <[email protected]> writes:
Yegor> Signed-off-by: Heiko Zuerker <[email protected]> Yegor> Signed-off-by: Yegor Yefremov <[email protected]>
Thanks, committed with minor tweaks (see below).
Yegor> ---
Yegor> package/udev/Config.in | 43 +++-------- Yegor> package/udev/S10udev | 6 - Yegor> package/udev/libvolume_id.la.tmpl | 35 --------- Yegor> package/udev/udev.mk | 144 ++++++--------------------------------
Yegor> 4 files changed, 36 insertions(+), 192 deletions(-) Yegor> delete mode 100644 package/udev/libvolume_id.la.tmpl
Yegor> Index: b/package/udev/Config.in
Yegor> =================================================================== Yegor> --- a/package/udev/Config.in
Yegor> +++ b/package/udev/Config.in
Yegor> @@ -5,37 +5,18 @@
Yegor> ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/
Yegor> -config BR2_PACKAGE_UDEV_UTILS
Yegor> - bool "udev-utils"
Yegor> +config BR2_PACKAGE_UDEV_ALL_EXTRAS
Yegor> + bool "enable all extras"
Yegor> depends on BR2_PACKAGE_UDEV
You forgot to depend on BR2_LARGEFILE + BR2_USE_WCHAR.
Yegor> +UDEV_VERSION = 172
Yegor> +UDEV_SOURCE = udev-$(UDEV_VERSION).tar.bz2
Yegor> +UDEV_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/hotplug/
Yegor> -UDEV_BUILD_EXTRAS=$(addprefix extras/,$(UDEV_EXTRAS))
Yegor> +UDEV_CONF_OPT = \
Yegor> + --sbindir=/sbin \
Yegor> + --with-rootlibdir=/lib \
Yegor> + --libexecdir=/lib/udev \
Yegor> + --disable-introspection
Yegor> -#
Yegor> -# Build
Yegor> -#
Yegor> -define UDEV_BUILD_CMDS
Yegor> - $(MAKE) CROSS_COMPILE=$(TARGET_CROSS) CC="$(TARGET_CC)" LD="$(TARGET_CC)"\
Yegor> - CFLAGS="$(BR2_UDEV_CFLAGS)" \
Yegor> - USE_LOG=false USE_SELINUX=false \
Yegor> - udevdir=$(UDEV_ROOT) EXTRAS="$(UDEV_BUILD_EXTRAS)" -C $(@D)
Yegor> -endef
Yegor> +UDEV_DEPENDENCIES = host-gperf
udev's configure script uses pkg-config, so we also need to depend on host-pkg-config.
Thanks for your persistence!
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/3 bump udev and clean up
Quoted 5 lines
udev's configure script uses pkg-config, so we also need to depend on host-pkg-config.
Thanks for your persistence
Yeah! We've done it! I want to thank everyone involved.
Yegor
PATCH 1/3 bump udev and clean up
Quoted 8 lines · Yegor Yefremov
Quoted 5 lines
udev's configure script uses pkg-config, so we also need to depend on host-pkg-config.
Thanks for your persistence
Yeah! We've done it! I want to thank everyone involved.
My setup does not build now:extras/input_id/input_id.c: In function 'test_key':extras/input_id/input_id.c:173: error: 'BTN_TRIGGER_HAPPY' undeclared (first use in this function)extras/input_id/input_id.c:173: error: (Each undeclared identifier is reported only onceextras/input_id/input_id.c:173: error: for each function it appears in.) make[3]: *** [extras/input_id/input_id.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/diego/src/buildroot/output/build/udev-172'
make: *** [/home/diego/src/buildroot/output/build/udev-172/.stamp_built] Error 2 This new udev version needs a kernel>=2.6.33 and my toolchain (?) comes with headers of 2.6.32. I am compiling for ARM using codesourcery 2010q1 (I normally use a "custom" setup, but using the one in buildroot fails). Using?2011.03 does work.
How do I convince the toolchain to use a newer kernel headers?
BTW, this cost has been added in 2.6.33rc5:
http://www.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.33-git5.log
PATCH 1/3 bump udev and clean up
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Diego" == Diego Iastrubni <[email protected]> writes:
Hi,
Diego> My setup does not build now:
Diego> extras/input_id/input_id.c: In function 'test_key':
Diego> extras/input_id/input_id.c:173: error: 'BTN_TRIGGER_HAPPY' undeclared Diego> (first use in this function)
Diego> extras/input_id/input_id.c:173: error: (Each undeclared identifier is Diego> reported only once
Diego> extras/input_id/input_id.c:173: error: for each function it appears in.) Diego> make[3]: *** [extras/input_id/input_id.o] Error 1
Diego> make[2]: *** [all-recursive] Error 1
Diego> make[1]: *** [all] Error 2
Diego> make[1]: Leaving directory `/home/diego/src/buildroot/output/build/udev-172' Diego> make: *** [/home/diego/src/buildroot/output/build/udev-172/.stamp_built] Error 2 Diego> This new udev version needs a kernel>=2.6.33 and my toolchain (?)
Yes, BTN_TRIGGER_HAPPY was indeed only added in 2.6.34-rc1.
Diego> comes with headers of 2.6.32. I am compiling for ARM using
Diego> codesourcery 2010q1 (I normally use a "custom" setup, but using the Diego> one in buildroot fails). Using?2011.03 does work.
What exactly fails with the internal toolchain?
Diego> How do I convince the toolchain to use a newer kernel headers?
You cannot, kernel headers are part of the toolchain. Consider moving to a newer toolchain and/or disable UDEV_EXTRAS.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/3 bump udev and clean up
Le Wed, 27 Jul 2011 09:34:55 +0200,
Peter Korsgaard <[email protected]> a ?crit :
Quoted 2 lines
You cannot, kernel headers are part of the toolchain. Consider moving to a newer toolchain and/or disable
UDEV_EXTRAS.
Or, if it's just a matter of defining BTN_TRIGGER_HAPPY, you can patch the udev source code to that it defines this constant if it's not already defined. This is a bit hackish, but it's true that not supporting CodeSourcery 2010q1 is a bit problematic.
Regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
A message that is not in the archive (sent off-list or not yet received): CALR4fEKGFH5tq-25=j3DW-CVD5Uc-QxUeLoec-JLwSxNUhQw-w@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): CALR4fEKxDB+xH1_X+0xY9KWQXAz_g6zbrQHqzOB81J2jpOcnOg@mail.gmail.com
PATCH 1/3 bump udev and clean up
Quoted 8 lines · Diego Iastrubni
You are probably right, qouting from
http://www.spinics.net/lists/hotplug/msg04998.html :It's generally not a good idea to build new low-level tools against outdated kernels or run new low-level tools against them. Things can easily go wrong. We usually only test the other way around: new kernels on old userspace. That should work fine for quite a while.
Quoted 7 lines
So, this patch demands:
1) newer toolchains
2) kernel 2.6.33 and above.(2) is bad, since 2.6.32 is still maintained. For (1), I have a patch in the works, I will test and report.
See patch attached. Just put it inside packages/udev and rebuild.
Works for me, and should not break other things, at least I hope.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: udev-fix-udev-linux-2.6.32-ugly.patch
Type: text/x-patch
Size: 2318 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110727/bd76cf0d/attachment.bin>
PATCH 1/3 bump udev and clean up
With the update of 173... lets bring this up again...
I am having problems in my setup: I see the /dev/ directory quite empty. I found out that you removed the call to udevstart in S10udev, calling it manually fixed the "emptiness problem" and /dev/ is filled up as I expect.
Is the problem caused by my side (I am using tmpfs, and not udevfs, and my kernel is *way* old). What is the equivalent of udevstart in udev?
Quoted 20 lines · Diego Iastrubni
Quoted 8 lines · Diego Iastrubni
You are probably right, qouting from
http://www.spinics.net/lists/hotplug/msg04998.html :It's generally not a good idea to build new low-level tools against outdated kernels or run new low-level tools against them. Things can easily go wrong. We usually only test the other way around: new kernels on old userspace. That should work fine for quite a while.
Quoted 7 lines
So, this patch demands:
1) newer toolchains
2) kernel 2.6.33 and above.(2) is bad, since 2.6.32 is still maintained. For (1), I have a patch in the works, I will test and report.
See patch attached. Just put it inside packages/udev and rebuild. Works for me, and should not break other things, at least I hope.
PATCH 1/3 bump udev and clean up
Hi Diego,
please use http://en.wikipedia.org/wiki/Top-posting#Bottom-posting.
Am 03.08.2011 14:37, schrieb Diego Iastrubni:
Quoted 10 lines
With the update of 173... lets bring this up again...
I am having problems in my setup: I see the
/dev/directory quite empty. I found out that you removed the call to udevstart in S10udev, calling it manually fixed the "emptiness problem" and/dev/is filled up as I expect.Is the problem caused by my side (I am using tmpfs, and not udevfs, and my kernel is *way* old). What is the equivalent of udevstart in udev?
I've looked at what Debian maintainers do:
they use udevadm trigger --action=add
http://linux.die.net/man/8/udevadm
With the newer kernel you don't have such a problem as empty /dev/, because in BR devtmpfs will be used to fill that directory before mounting rootfs. So just starting udevd is sufficient.
Quoted 26 lines · Diego Iastrubni
Quoted 11 lines · Diego Iastrubni
Quoted 10 lines
You are probably right, qouting from
http://www.spinics.net/lists/hotplug/msg04998.html :It's generally not a good idea to build new low-level tools against outdated kernels or run new low-level tools against them. Things can easily go wrong. We usually only test the other way around: new kernels on old userspace. That should work fine for quite a while.
So, this patch demands:
Quoted 9 lines
Quoted 5 lines
1) newer toolchains
2) kernel 2.6.33 and above.(2) is bad, since 2.6.32 is still maintained. For (1), I have a patch in the works, I will test and report.
See patch attached. Just put it inside packages/udev and rebuild. Works for me, and should not break other things, at least I hope.
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/3 bump udev and clean up
Quoted 11 lines · Yegor Yefremov
Quoted 3 lines
Is the problem caused by my side (I am using tmpfs, and not udevfs, and my kernel is *way* old). What is the equivalent of udevstart in udev?
I've looked at what Debian maintainers do:
they use udevadm trigger --action=add
http://linux.die.net/man/8/udevadm
With the newer kernel you don't have such a problem as empty
/dev/, because in BR devtmpfs will be used to fill that directory before mounting rootfs. So just starting udevd is sufficient.
Running "udevadm trigger" inside S10udev seem to fix the problem for me. I still need to understand the differences between all flags (the readme says --type=subsystems,-devices).
Is any one else affected from the move to a newer udev version like I am?