You are not logged in.
I'm trying to create a package for a patched psmouse kernel module. (https://aur.archlinux.org/packages.php?ID=49284). However, I can't quite get the module built correctly.
I'm trying various make options like -C $KDIR, M=,.... and various make targets like prepare, modules_pepare, and explicitly giving a module.
Forgetting about the patch for a moment? How am I supposed to do this? I thought something like:
make -C /usr/src/linux-$(uname -r) M=drivers/input/mouse psmouse.ko
would work, but I think it's trying to write to the headers directory.
Thanks for any help.
Offline
What’s the error in particular? Are you trying to build the module source code from inside the kernel tree or separately? Look for similar module packages for examples?
If you’re trying to do an external build, perhaps try giving the absolute path in your M=drivers/input/mouse parameter; otherwise the -C option tells Make to change directory and it forgets what the original directory was.
I have an external module with me that has its own Make file and calls the kernel’s Make files with this if it’s any help:
make -C $(KDIR) SUBDIRS=$(PWD) modules
Offline
I'll give that a try. I actually just got it working by rsync'ing the kernel26-headers files over the clean source I downloaded from kernel.org, but I get the feeling there is a better way than this.
Offline
So, that appears to be part of the secret
KDIR=/usr/src/linux-$_kver-$_kname
SDIR=$srcdir/linux-$_kver/drivers/input/mouse
make -C $KDIR M=$SDIR psmouse.ko
solves the readonly problem. But it uses the Kconfig from KDIR and I need to use the Kconfig from SDIR because that is modified also.
Last edited by piezoelectric (2011-05-28 17:03:38)
Offline
Maybe try make O=/absolute/directory or make KCONFIG_CONFIG=/absolute/path. I’m just guessing though by running “make help” and looking through the Make file on my kernel.
Offline