* udev: disable mtd_probe?
@ 2011-07-18 20:45 Allin Cottrell
2011-07-18 21:10 ` Kay Sievers
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Allin Cottrell @ 2011-07-18 20:45 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: TEXT/PLAIN, Size: 474 bytes --]
Since the new mechanism for enabling/disabling selected
components of the udev "extras" was introduced it hasn't been
possible to disable mtd_probe, so far as I can see.
Could we please have that option, unless there are compelling
reasons to the contrary? The MTD stuff drags in a bunch of
dependencies.
I'm attaching a little patch to configure.ac and Makefile.am
in udev-172 that does the job.
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
[-- Attachment #2: Type: TEXT/PLAIN, Size: 2878 bytes --]
diff -ur udev-172.orig/configure.ac udev-172/configure.ac
--- udev-172.orig/configure.ac 2011-07-10 19:42:53.958052609 -0400
+++ udev-172/configure.ac 2011-07-18 09:22:25.834001037 -0400
@@ -87,6 +87,14 @@
AM_CONDITIONAL([ENABLE_RULE_GENERATOR], [test "x$enable_rule_generator" = xyes])
# ------------------------------------------------------------------------------
+# mtd_probe - autoloads FTL module for mtd devices
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([mtd_probe],
+ AS_HELP_STRING([--disable-mtd_probe], [disable MTD support]),
+ [], [enable_mtd_probe=yes])
+AM_CONDITIONAL([ENABLE_MTD_PROBE], [test "x$enable_mtd_probe" = xyes])
+
+# ------------------------------------------------------------------------------
# usb/pci-db - read vendor/device string database
# ------------------------------------------------------------------------------
AC_ARG_ENABLE([hwdb],
diff -ur udev-172.orig/Makefile.am udev-172/Makefile.am
--- udev-172.orig/Makefile.am 2011-07-10 19:09:01.791662889 -0400
+++ udev-172/Makefile.am 2011-07-18 09:22:45.453001047 -0400
@@ -294,17 +294,6 @@
dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules
# ------------------------------------------------------------------------------
-# mtd_probe - autoloads FTL module for mtd devices
-# ------------------------------------------------------------------------------
-extras_mtd_probe_mtd_probe_SOURCES = \
- extras/mtd_probe/mtd_probe.c \
- extras/mtd_probe/mtd_probe.h \
- extras/mtd_probe/probe_smartmedia.c
-extras_mtd_probe_mtd_probe_CPPFLAGS = $(AM_CPPFLAGS)
-dist_udevrules_DATA += extras/mtd_probe/75-probe_mtd.rules
-libexec_PROGRAMS += extras/mtd_probe/mtd_probe
-
-# ------------------------------------------------------------------------------
# accelerometer - updates device orientation
# ------------------------------------------------------------------------------
extras_accelerometer_accelerometer_SOURCES = extras/accelerometer/accelerometer.c
@@ -333,6 +322,20 @@
extras/rule_generator/75-persistent-net-generator.rules
endif
+if ENABLE_MTD_PROBE
+# ------------------------------------------------------------------------------
+# mtd_probe - autoloads FTL module for mtd devices
+# ------------------------------------------------------------------------------
+extras_mtd_probe_mtd_probe_SOURCES = \
+ extras/mtd_probe/mtd_probe.c \
+ extras/mtd_probe/mtd_probe.h \
+ extras/mtd_probe/probe_smartmedia.c
+extras_mtd_probe_mtd_probe_CPPFLAGS = $(AM_CPPFLAGS)
+dist_udevrules_DATA += extras/mtd_probe/75-probe_mtd.rules
+libexec_PROGRAMS += extras/mtd_probe/mtd_probe
+
+endif
+
if ENABLE_HWDB
# ------------------------------------------------------------------------------
# usb/pci-db - read vendor/device string database
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
@ 2011-07-18 21:10 ` Kay Sievers
2011-07-18 21:17 ` Gabor Z. Papp
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2011-07-18 21:10 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jul 18, 2011 at 22:45, Allin Cottrell <cottrell@wfu.edu> wrote:
> Since the new mechanism for enabling/disabling selected components of the
> udev "extras" was introduced it hasn't been possible to disable mtd_probe,
> so far as I can see.
>
> Could we please have that option, unless there are compelling reasons to the
> contrary? The MTD stuff drags in a bunch of
> dependencies.
No problem with the patch or the option, but: Dependencies? A bunch? I
don't see any. Not even the rules are doing anything, if no mtd
devices are present.
Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
2011-07-18 21:10 ` Kay Sievers
@ 2011-07-18 21:17 ` Gabor Z. Papp
2011-07-18 21:19 ` Kay Sievers
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Gabor Z. Papp @ 2011-07-18 21:17 UTC (permalink / raw)
To: linux-hotplug
* Kay Sievers <kay.sievers@vrfy.org>:
| > Could we please have that option, unless there are compelling reasons to the
| > contrary? The MTD stuff drags in a bunch of
| > dependencies.
| No problem with the patch or the option, but: Dependencies? A bunch? I
| don't see any. Not even the rules are doing anything, if no mtd
| devices are present.
CC extras/mtd_probe/extras_mtd_probe_mtd_probe-mtd_probe.o
In file included from extras/mtd_probe/mtd_probe.c:19: extras/mtd_probe/mtd_probe.h:20:26: error: mtd/mtd-user.h: No such file or directory
$ uname -a
Linux gzp1 2.6.32.42 #1 SMP PREEMPT Mon Jun 27 09:36:50 CEST 2011 i686 GNU/Linux
and:
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)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
2011-07-18 21:10 ` Kay Sievers
2011-07-18 21:17 ` Gabor Z. Papp
@ 2011-07-18 21:19 ` Kay Sievers
2011-07-18 21:22 ` Gabor Z. Papp
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2011-07-18 21:19 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jul 18, 2011 at 23:17, Gabor Z. Papp <gzp@papp.hu> wrote:
> * Kay Sievers <kay.sievers@vrfy.org>:
>
> | > Could we please have that option, unless there are compelling reasons to the
> | > contrary? The MTD stuff drags in a bunch of
> | > dependencies.
>
> | No problem with the patch or the option, but: Dependencies? A bunch? I
> | don't see any. Not even the rules are doing anything, if no mtd
> | devices are present.
>
> CC extras/mtd_probe/extras_mtd_probe_mtd_probe-mtd_probe.o
> In file included from extras/mtd_probe/mtd_probe.c:19: extras/mtd_probe/mtd_probe.h:20:26: error: mtd/mtd-user.h: No such file or directory
>
> $ uname -a
> Linux gzp1 2.6.32.42 #1 SMP PREEMPT Mon Jun 27 09:36:50 CEST 2011 i686 GNU/Linux
>
> and:
>
> 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)
You just need recent kernel headers to compile udev.
Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
` (2 preceding siblings ...)
2011-07-18 21:19 ` Kay Sievers
@ 2011-07-18 21:22 ` Gabor Z. Papp
2011-07-18 21:37 ` Allin Cottrell
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Gabor Z. Papp @ 2011-07-18 21:22 UTC (permalink / raw)
To: linux-hotplug
* Kay Sievers <kay.sievers@vrfy.org>:
| > Linux gzp1 2.6.32.42 #1 SMP PREEMPT Mon Jun 27 09:36:50 CEST 2011 i686 GNU/Linux
| >
| > and:
| >
| > 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)
| You just need recent kernel headers to compile udev.
Requirements:
- Version 2.6.32 of the Linux kernel with sysfs, procfs, signalfd, inotify, unix domain sockets, networking and hotplug enabled
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
` (3 preceding siblings ...)
2011-07-18 21:22 ` Gabor Z. Papp
@ 2011-07-18 21:37 ` Allin Cottrell
2011-07-18 21:40 ` Kay Sievers
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Allin Cottrell @ 2011-07-18 21:37 UTC (permalink / raw)
To: linux-hotplug
On Mon, 18 Jul 2011, Kay Sievers wrote:
> On Mon, Jul 18, 2011 at 22:45, Allin Cottrell <cottrell@wfu.edu> wrote:
>> Since the new mechanism for enabling/disabling selected components of the
>> udev "extras" was introduced it hasn't been possible to disable mtd_probe,
>> so far as I can see.
>>
>> Could we please have that option, unless there are compelling reasons to the
>> contrary? The MTD stuff drags in a bunch of
>> dependencies.
>
> No problem with the patch or the option [...]
Good, thanks.
> but: Dependencies? A bunch? I don't see any. Not even the rules
> are doing anything, if no mtd devices are present.
Maybe I'm misunderstanding something, but I thought I had to install
the mtd-utils and/or configure MTD support into the kernel.
Certainly, the mtd_probe build bombs out on my system with mtd.h not
found. And if the mtd-utils are needed, they drag in attr and
libacl.
--
Allin Cottrell
Department of Economics
Wake Forest University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
` (4 preceding siblings ...)
2011-07-18 21:37 ` Allin Cottrell
@ 2011-07-18 21:40 ` Kay Sievers
2011-07-18 21:44 ` Kay Sievers
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2011-07-18 21:40 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jul 18, 2011 at 23:37, Allin Cottrell <cottrell@wfu.edu> wrote:
> On Mon, 18 Jul 2011, Kay Sievers wrote:
>> but: Dependencies? A bunch? I don't see any. Not even the rules are doing
>> anything, if no mtd devices are present.
>
> Maybe I'm misunderstanding something, but I thought I had to install the
> mtd-utils and/or configure MTD support into the kernel. Certainly, the
> mtd_probe build bombs out on my system with mtd.h not found. And if the
> mtd-utils are needed, they drag in attr and libacl.
No, nothing like this is needed, it only runs a tiny program that
reads a device and loads a kernel module. No dependencies are needed
for that.
You can see in the section you made conditional, it does not get rid
of anything.
Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
` (5 preceding siblings ...)
2011-07-18 21:40 ` Kay Sievers
@ 2011-07-18 21:44 ` Kay Sievers
2011-07-18 21:49 ` Kay Sievers
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2011-07-18 21:44 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jul 18, 2011 at 23:40, Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Mon, Jul 18, 2011 at 23:37, Allin Cottrell <cottrell@wfu.edu> wrote:
>> On Mon, 18 Jul 2011, Kay Sievers wrote:
>>> but: Dependencies? A bunch? I don't see any. Not even the rules are doing
>>> anything, if no mtd devices are present.
>>
>> Maybe I'm misunderstanding something, but I thought I had to install the
>> mtd-utils and/or configure MTD support into the kernel. Certainly, the
>> mtd_probe build bombs out on my system with mtd.h
mtd.h? It includes: mtd/mtd-user.h, which is there since 2.6.17. You
need proper or more recent kernel headers, I guess, it's not any
external dependency.
Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
` (6 preceding siblings ...)
2011-07-18 21:44 ` Kay Sievers
@ 2011-07-18 21:49 ` Kay Sievers
2011-07-19 16:06 ` Allin Cottrell
2011-07-19 20:06 ` Kay Sievers
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2011-07-18 21:49 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jul 18, 2011 at 23:22, Gabor Z. Papp <gzp@papp.hu> wrote:
> * Kay Sievers <kay.sievers@vrfy.org>:
>
> | > Linux gzp1 2.6.32.42 #1 SMP PREEMPT Mon Jun 27 09:36:50 CEST 2011 i686 GNU/Linux
> | >
> | > and:
> | >
> | > 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)
>
> | You just need recent kernel headers to compile udev.
>
> Requirements:
> Â - Version 2.6.32 of the Linux kernel with sysfs, procfs, signalfd, inotify, unix domain sockets, networking and hotplug enabled
>
That's the runtime dependency. The build dependency might be more
recent. We usually don't really check what's needed, as long as it is
on the last released and current distro nobody really knows when it
was introduced. In this case. seems, it's at least 2.6.34.
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.
Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
` (7 preceding siblings ...)
2011-07-18 21:49 ` Kay Sievers
@ 2011-07-19 16:06 ` Allin Cottrell
2011-07-19 20:06 ` Kay Sievers
9 siblings, 0 replies; 11+ messages in thread
From: Allin Cottrell @ 2011-07-19 16:06 UTC (permalink / raw)
To: linux-hotplug
On Mon, 18 Jul 2011, Kay Sievers wrote:
> On Mon, Jul 18, 2011 at 23:40, Kay Sievers <kay.sievers@vrfy.org> wrote:
>> On Mon, Jul 18, 2011 at 23:37, Allin Cottrell <cottrell@wfu.edu> wrote:
>>> On Mon, 18 Jul 2011, Kay Sievers wrote:
>>>> but: Dependencies? A bunch? I don't see any. Not even the rules are doing
>>>> anything, if no mtd devices are present.
>>>
>>> Maybe I'm misunderstanding something, but I thought I had to install the
>>> mtd-utils and/or configure MTD support into the kernel. Certainly, the
>>> mtd_probe build bombs out on my system with mtd.h
>
> mtd.h? It includes: mtd/mtd-user.h, which is there since 2.6.17. You
> need proper or more recent kernel headers, I guess, it's not any
> external dependency.
OK, my bad. I'm using kernel 2.6.39.3 but I hadn't copied or
linked the mtd subdir of the kernel headers to /usr/include.
Allin Cottrell
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: udev: disable mtd_probe?
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
` (8 preceding siblings ...)
2011-07-19 16:06 ` Allin Cottrell
@ 2011-07-19 20:06 ` Kay Sievers
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2011-07-19 20:06 UTC (permalink / raw)
To: linux-hotplug
On Tue, Jul 19, 2011 at 18:06, Allin Cottrell <cottrell@wfu.edu> wrote:
> On Mon, 18 Jul 2011, Kay Sievers wrote:
>> mtd.h? It includes: mtd/mtd-user.h, which is there since 2.6.17. You
>> need proper or more recent kernel headers, I guess, it's not any
>> external dependency.
>
> OK, my bad. I'm using kernel 2.6.39.3 but I hadn't copied or
> linked the mtd subdir of the kernel headers to /usr/include.
Applied the patch anyway.
Thanks,
Kay
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-07-19 20:06 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-18 20:45 udev: disable mtd_probe? Allin Cottrell
2011-07-18 21:10 ` Kay Sievers
2011-07-18 21:17 ` Gabor Z. Papp
2011-07-18 21:19 ` Kay Sievers
2011-07-18 21:22 ` Gabor Z. Papp
2011-07-18 21:37 ` Allin Cottrell
2011-07-18 21:40 ` Kay Sievers
2011-07-18 21:44 ` Kay Sievers
2011-07-18 21:49 ` Kay Sievers
2011-07-19 16:06 ` Allin Cottrell
2011-07-19 20:06 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).