From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sat, 31 Dec 2005 01:26:48 +0000 Subject: Re: initially building /dev very early in system booting Message-Id: <20051231012648.GA8304@vrfy.org> List-Id: References: <20051230220644.GA30318@altair.ipal.net> In-Reply-To: <20051230220644.GA30318@altair.ipal.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Dec 30, 2005 at 04:06:44PM -0600, Phil Howard wrote: > My issue is about how to initially fill in /dev and not at all about any > hotpluggable devices. ... > So that brings me to doing what effectively "udevstart" would seem to do. > But I would not literally use "udevstart". Instead, my thinking was to > include a subset of that code to build a subset of /dev enough to get the > system up to the next stage. At this point I don't need all devices, so > the fact that I won't yet have any udev config files (in /etc which is > not yet mounted) shouldn't be much of an issue. ... > So any advice on what is ultimately an effort to scan /sys for devices to > build into /dev would be appreciated. Take the two readdir() loops over /sys/block and /sys/class from udevstart.c. If you find a "dev" file below the current devpath, read() it and call mknod() with the numbers read and the last part of the current devpath directory. That should do it, if you don't want to use udev itself for it. Be prepared, that it will not create /dev/input/mice, but /dev/mice and such things without any rules configured. Kay ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel