Age | Commit message (Collapse) | Author |
|
|
|
|
|
On Mon, Jan 12, 2004 at 05:04:45PM -0800, Greg KH wrote:
> Very nice, applied. But I did have to make one small change to get the
> code to build properly with klibc:
>
> > +static void print_record(char *path, struct udevice *dev)
> > +{
> > + printf("P: %s\n", path);
> > + printf("N: %s\n", dev->name);
> > + printf("S: %s\n", dev->symlink);
> > + printf("O: %s\n", dev->owner);
> > + printf("G: %s\n", dev->group);
> > + printf("\n");
> > +}
>
> Turns out that gcc likes to convert single character printf() calls to
> putchar() which is only defined in klibc as a macro :(
Just for information. This seems to fix the gcc with klibc :)
|
|
I get the following error on install:
pim:/home/kay/src/udev.test# make install
sed -e "s:@udevdir@:/udev:" < etc/udev/udev.conf.in > etc/udev/udev.conf
/usr/bin/install -c -d /etc/udev/
/usr/bin/install -c -d /udev
/usr/bin/install -c -d /etc/hotplug.d/default
/usr/bin/install -c -D udev /sbin/udev
/bin/sh: -c: line 2: syntax error: unexpected end of file
make: *** [install] Error 2
|
|
I had too much time during the holidays, so I played a bit with udev. The
changes are like last time mostly on the init stuff. I'm sending you this as
a great diff which is just for comments.
What it does:
-fix a typo in Makefile
-use only one "grep -v" instead of many
-don't include BK-Files into release (shrinks the stuff to 30%!)
-add a new init script which is LSB compliant
-add some flags to choose which one to use
-use /etc/udev/udev.conf in Redhat init script as the source for the udev
directory. If this is not done then the init script may create a directory
which udev itself isn't using (I changed /udev to /Udev to avoid collisions
with /usr and ran into this)
-first check for sysfs_dir before creating udev_root (maybe someone else has
already fixed this, I saw this discussion on lkml)
|
|
|
|
|
|
|
|
|
|
|
|
Let the build depend on all header files.
|
|
|
|
|
|
|
|
|
|
|
|
One patch to let bk ignore the created udev.conf.
The second to depend on the .h files.
|
|
Here is a patch for the Makefile to look for a already
installed config and not to overwrite it.
|
|
Need to let the shell expand $EXTRAS so it can properly detect an empty
list. Without this patch, the build fails whenever $EXTRAS is empty.
|
|
|
|
|
|
KLIBC is used as an internal makefile variable, it expands to either
true or false right now. udev should use something else than KLIBC to
allow build against the latest and greatest klibc version.
|
|
Attached patch installs the initscript via 'make install' and adds it to
the RPM package. The RPM script then runs chkconfig(8) to setup the
initscript to run at the appropriate runlevels.
|
|
adds /etc/init.d/udev to "make install"
|
|
|
|
udevdir is a define, but udev.conf has a hardcoded path. Maybe this
config file should be generated on the fly, like shown below.
|
|
|
|
it's still to hard to build on all systems.
|
|
Attached is a patch against udev-008 to send out a D-BUS message when a
device node is added or removed.
Using D-BUS lingo, udev acquires the org.kernel.udev service and sends
out a NodeCreated or NodeDeleted signal on the
org.kernel.udev.NodeMonitor interface. Each signal carries two
parameters: the node in question and the corresponding sysfs path.
[Note: the D-BUS concepts of service, interface, object can be a bit
confusing at first glance]
An example program listening for these messages looks like this
#!/usr/bin/python
import dbus
import gtk
def udev_signal_received(dbus_iface, member, service, object_path, message):
[filename, sysfs_path] = message.get_args_list()
if member=='NodeCreated':
print 'Node %s created for %s'%(filename, sysfs_path)
elif member=='NodeDeleted':
print 'Node %s deleted for %s'%(filename, sysfs_path)
def main():
bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
bus.add_signal_receiver(udev_signal_received,
'org.kernel.udev.NodeMonitor', # interface
'org.kernel.udev', # service
'/org/kernel/udev/NodeMonitor') # object
gtk.mainloop()
if __name__ == '__main__':
main()
and this is the output when hot-plugging some usb-storage.
[david@laptop udev-008]$ ~/node_monitor.py
Node /udev/sda created for /block/sda
Node /udev/sda1 created for /block/sda/sda1
Node /udev/sda1 deleted for /block/sda/sda1
Node /udev/sda deleted for /block/sda
The patch requires D-BUS 0.20 or later while the python example program
requires D-BUS from CVS as I only recently applied a patch against the
python bindings.
|
|
Here is an improved version of the patch that enables builds of the extras
progams for the targets all, clean, install, and uninstall, and passes
down the "prefix" for use by install and uninstall.
This patch enables building of the "extras" programs using the same build
environment as udev (i.e. build with udev's versions of klibc and
sysfsutils).
For example, build scsi_id and udev via:
make EXTRAS=extras/scsi_id
Build scsi_id and udev with klibc via:
make KLIBC=true EXTRAS=extras/scsi_id
|
|
|
|
|
|
Now there are only 3 valid environment test variables. The rest can be
specified with the config file.
|
|
the older udev.config file is now called udev.rules.
This allows us to better control configuration values, and move away from
the environment variables.
|
|
it's a bit noisy for the masses...
|
|
|
|
This patch adds -nodefaultlibs to LDFLAGS when compiling udev against
klibc. This fixes the warning that I was getting when using $(LD)=gcc
in the versions after Makefile.klibc disappeared. The problem was that
it was still including a "-lc" in the call to the linker.
|
|
I'm not sure why ppc is converted to powerpc, it breaks at least $(ARCH)
in klibc.
gcc -dumpmachine
powerpc-suse-linux
|
|
I can't build udev with make -j9. Here's a patch to fix it.
|
|
|
|
|
|
|
|
|
|
On Wed, Nov 19, Greg KH wrote:
> > I did 'make KLIBC=true' in the current bk tree.
>
> try 'make -f Makefile.klibc' in the current tree. For some reason I
> couldn't figure out how to have Makefile work for both KLIBC=true and
> KLIBC=false. But I didn't try too hard :)
I dont understand that.
please do rm -f Makefile.klibc; apply this patch and tell me what fails.
works for me.
|
|
|
|
|
|
|
|
|
|
|
|
|