* [Buildroot] Udev generates too many tty dev nodes @ 2013-01-17 0:48 Willy Lambert 2013-01-17 9:57 ` Jérôme Pouiller 2013-01-17 12:55 ` Thomas Petazzoni 0 siblings, 2 replies; 7+ messages in thread From: Willy Lambert @ 2013-01-17 0:48 UTC (permalink / raw) To: buildroot Hi all, I'm trying to put my /dev folder into order, and I recently switched from static config to udev. All device are correctly set up exept tty* that are umerously present (something like 64 nodes). _ Does anyone know if it is normal that so many files are generated ? (or said differently should I wonder about my buildroot outputs) _ Is there any mean to change that ? _ Is this only and udev problem or is it linked to buildroot integration ? I think it's a quite "common problem" but googling it didn't helped :( The better answer was that : http://unix.stackexchange.com/questions/25021/change-the-number-of-generated-dev-tty-devices but it's a bit hackish... I generate a rootfs from scratch so I want to manage everything that's happening inside, so in this case I want to tell it how many device it may/should create. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Udev generates too many tty dev nodes 2013-01-17 0:48 [Buildroot] Udev generates too many tty dev nodes Willy Lambert @ 2013-01-17 9:57 ` Jérôme Pouiller 2013-01-17 13:10 ` Willy Lambert 2013-01-17 12:55 ` Thomas Petazzoni 1 sibling, 1 reply; 7+ messages in thread From: Jérôme Pouiller @ 2013-01-17 9:57 UTC (permalink / raw) To: buildroot On Thursday 17 January 2013 01:48:41 Willy Lambert wrote: > Hi all, Hi, > I'm trying to put my /dev folder into order, and I recently switched > from static config to udev. All device are correctly set up exept tty* > that are umerously present (something like 64 nodes). > > _ Does anyone know if it is normal that so many files are generated ? > (or said differently should I wonder about my buildroot outputs) > _ Is there any mean to change that ? > _ Is this only and udev problem or is it linked to buildroot integration ? Udev only create devices declared by kernel. So this setting is somewhere in kernel configuration. > I think it's a quite "common problem" but googling it didn't helped :( > The better answer was that : > http://unix.stackexchange.com/questions/25021/change-the-number-of-generated > -dev-tty-devices but it's a bit hackish... I generate a rootfs from scratch > so I want to manage everything that's happening inside, so in this case I > want to tell it how many device it may/should create. It looks, there is no configuration entry to change this setting. Nevertheless, you can try to change MAX_NR_CONSOLES from linux/vt.h. BR, -- J?r?me Pouiller ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Udev generates too many tty dev nodes 2013-01-17 9:57 ` Jérôme Pouiller @ 2013-01-17 13:10 ` Willy Lambert 0 siblings, 0 replies; 7+ messages in thread From: Willy Lambert @ 2013-01-17 13:10 UTC (permalink / raw) To: buildroot 2013/1/17 J?r?me Pouiller <jezz@sysmic.org>: > On Thursday 17 January 2013 01:48:41 Willy Lambert wrote: >> Hi all, > Hi, > >> I'm trying to put my /dev folder into order, and I recently switched >> from static config to udev. All device are correctly set up exept tty* >> that are umerously present (something like 64 nodes). >> >> _ Does anyone know if it is normal that so many files are generated ? >> (or said differently should I wonder about my buildroot outputs) >> _ Is there any mean to change that ? >> _ Is this only and udev problem or is it linked to buildroot integration ? > Udev only create devices declared by kernel. So this setting is somewhere in > kernel configuration. > > >> I think it's a quite "common problem" but googling it didn't helped :( >> The better answer was that : >> http://unix.stackexchange.com/questions/25021/change-the-number-of-generated >> -dev-tty-devices but it's a bit hackish... I generate a rootfs from scratch >> so I want to manage everything that's happening inside, so in this case I >> want to tell it how many device it may/should create. > It looks, there is no configuration entry to change this setting. > Nevertheless, you can try to change MAX_NR_CONSOLES from linux/vt.h. > > BR, > Hum... Thanks for pointing. I'll have a look. I had a quick look on different machines with different distributions (Debian, Ubuntu, Fedora) the don't behave equally. Debian is "clean", the other also have plenty of devices for tty* In the past there were a NR_TTY_DEVICES kernel config option (cf http://lkml.indiana.edu/hypermail/linux/kernel/0404.2/1316.html), but I can't find it anymore. I'd better not modify the kernel sources. I don't care about configuration, but change sources is a step ahead that I don't want to do. > -- > J?r?me Pouiller > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Udev generates too many tty dev nodes 2013-01-17 0:48 [Buildroot] Udev generates too many tty dev nodes Willy Lambert 2013-01-17 9:57 ` Jérôme Pouiller @ 2013-01-17 12:55 ` Thomas Petazzoni 2013-01-17 13:05 ` Willy Lambert 1 sibling, 1 reply; 7+ messages in thread From: Thomas Petazzoni @ 2013-01-17 12:55 UTC (permalink / raw) To: buildroot Dear Willy Lambert, On Thu, 17 Jan 2013 01:48:41 +0100, Willy Lambert wrote: > I'm trying to put my /dev folder into order, and I recently switched > from static config to udev. All device are correctly set up exept tty* > that are umerously present (something like 64 nodes). > > _ Does anyone know if it is normal that so many files are generated ? > (or said differently should I wonder about my buildroot outputs) > _ Is there any mean to change that ? > _ Is this only and udev problem or is it linked to buildroot > integration ? Is it really an issue? I mean, device nodes really don't consume that much memory or anything, so, who cares? Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Udev generates too many tty dev nodes 2013-01-17 12:55 ` Thomas Petazzoni @ 2013-01-17 13:05 ` Willy Lambert 2013-01-17 13:19 ` Thomas Petazzoni 0 siblings, 1 reply; 7+ messages in thread From: Willy Lambert @ 2013-01-17 13:05 UTC (permalink / raw) To: buildroot 2013/1/17 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > Dear Willy Lambert, > > On Thu, 17 Jan 2013 01:48:41 +0100, Willy Lambert wrote: > >> I'm trying to put my /dev folder into order, and I recently switched >> from static config to udev. All device are correctly set up exept tty* >> that are umerously present (something like 64 nodes). >> >> _ Does anyone know if it is normal that so many files are generated ? >> (or said differently should I wonder about my buildroot outputs) >> _ Is there any mean to change that ? >> _ Is this only and udev problem or is it linked to buildroot >> integration ? > > Is it really an issue? I mean, device nodes really don't consume that > much memory or anything, so, who cares? > I do ^^. The bad argument is that I hate having mess on my device, especially when typing "ls /dev". The good one is that if something behave strangly I like to tackle the root cause. It's not an industrial projet, it's a personnal one on which I can take the time I want to look at everything I like :D. And in this case I do *not* have a need for 64 ttys and I did *not* (at least consciently) ask for having them. So somehting, somewhere is doing thing on my back, and I want to know what. udev is supposed to show only what's available or in use. It's sure that some of those devices are not meeting this criterias. But I agree, it's all but an issue. > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Udev generates too many tty dev nodes 2013-01-17 13:05 ` Willy Lambert @ 2013-01-17 13:19 ` Thomas Petazzoni 2013-01-17 13:43 ` Willy Lambert 0 siblings, 1 reply; 7+ messages in thread From: Thomas Petazzoni @ 2013-01-17 13:19 UTC (permalink / raw) To: buildroot Dear Willy Lambert, On Thu, 17 Jan 2013 14:05:46 +0100, Willy Lambert wrote: > I do ^^. The bad argument is that I hate having mess on my device, > especially when typing "ls /dev". The good one is that if something > behave strangly I like to tackle the root cause. It's not an > industrial projet, it's a personnal one on which I can take the time I > want to look at everything I like :D. And in this case I do *not* have > a need for 64 ttys and I did *not* (at least consciently) ask for > having them. So somehting, somewhere is doing thing on my back, and I > want to know what. > > udev is supposed to show only what's available or in use. It's sure > that some of those devices are not meeting this criterias. Those devices *are* available. They have been registered by the kernel, so they are available, and it makes perfect sense for udev to create device files for them. If you really don't want to see them in /dev, then create a udev rule to not create those device files. See the answer at http://unix.stackexchange.com/questions/25021/change-the-number-of-generated-dev-tty-devices for a hint (not tested, not sure it is the correct way of writing the udev rule, check udev's documentation). At the kernel level, this number of tty is not configurable. It's defined by MAX_NR_CONSOLES, and interestingly, this constant is part of the kernel to userspace ABI, so I am not sure it is entirely safe to change it to some other random value. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Udev generates too many tty dev nodes 2013-01-17 13:19 ` Thomas Petazzoni @ 2013-01-17 13:43 ` Willy Lambert 0 siblings, 0 replies; 7+ messages in thread From: Willy Lambert @ 2013-01-17 13:43 UTC (permalink / raw) To: buildroot 2013/1/17 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > Dear Willy Lambert, > > On Thu, 17 Jan 2013 14:05:46 +0100, Willy Lambert wrote: > >> I do ^^. The bad argument is that I hate having mess on my device, >> especially when typing "ls /dev". The good one is that if something >> behave strangly I like to tackle the root cause. It's not an >> industrial projet, it's a personnal one on which I can take the time I >> want to look at everything I like :D. And in this case I do *not* have >> a need for 64 ttys and I did *not* (at least consciently) ask for >> having them. So somehting, somewhere is doing thing on my back, and I >> want to know what. >> >> udev is supposed to show only what's available or in use. It's sure >> that some of those devices are not meeting this criterias. > > Those devices *are* available. They have been registered by the kernel, > so they are available, and it makes perfect sense for udev to create > device files for them. > > If you really don't want to see them in /dev, then create a udev rule > to not create those device files. This is the solution I want to avoid. I want to prevent the one that is asking to create those device (so as you light up, it is the kernel), not to delete them afterwards. > See the answer at > http://unix.stackexchange.com/questions/25021/change-the-number-of-generated-dev-tty-devices > for a hint (not tested, not sure it is the correct way of writing the > udev rule, check udev's documentation). > > At the kernel level, this number of tty is not configurable. It's > defined by MAX_NR_CONSOLES, and interestingly, this constant is part of > the kernel to userspace ABI, so I am not sure it is entirely safe to > change it to some other random value. > > Best regards, > > Thomas > -- > Thomas Petazzoni, Free Electrons > Kernel, drivers, real-time and embedded Linux > development, consulting, training and support. > http://free-electrons.com ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-01-17 13:43 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-17 0:48 [Buildroot] Udev generates too many tty dev nodes Willy Lambert 2013-01-17 9:57 ` Jérôme Pouiller 2013-01-17 13:10 ` Willy Lambert 2013-01-17 12:55 ` Thomas Petazzoni 2013-01-17 13:05 ` Willy Lambert 2013-01-17 13:19 ` Thomas Petazzoni 2013-01-17 13:43 ` Willy Lambert
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox