Hi,
Since the kernel is 2.6, I have trouble compiling and installing an external module. I could only compile the driver as root. And before I compile it I had to do the following as root:
* edit the Makefile in /usr/src/kernel-2.6.... and remove 'custom' from the EXTRAVERSION. Otherwise it isn't installed at the right place. * run make oldconfig make prepare
If I try to compile as a user, I get [pat@localhost driver]$ make make -C /usr/src/linux SUBDIRS=/home/pat/src/eagleusb/driver modules make[1]: Entering directory `/opt/fc2t/usr/src/linux-2.6.3-1.118' HOSTCC scripts/modpost.o cc1 : Permission non accordée : ouverture du fichier de dépendances scripts/.modpost.o.d make[2]: *** [scripts/modpost.o] Erreur 1 make[1]: *** [scripts] Erreur 2 make[1]: Leaving directory `/opt/fc2t/usr/src/linux-2.6.3-1.118' make: *** [eagle-usb.ko] Erreur 2
If I can compile the driver, as root, I get: [root@localhost driver]# make make -C /usr/src/linux SUBDIRS=/home/pat/src/eagleusb/driver modules make[1]: Entering directory `/opt/fc2t/usr/src/linux-2.6.3-1.118' HOSTCC scripts/modpost.o HOSTLD scripts/modpost *** Warning: Overriding SUBDIRS on the command line can cause *** inconsistencies make[2]: « arch/i386/kernel/asm-offsets.s » est à jour. CC [M] /home/pat/src/eagleusb/driver/eu_main.o CC [M] /home/pat/src/eagleusb/driver/Boot.o CC [M] /home/pat/src/eagleusb/driver/eu_utils.o CC [M] /home/pat/src/eagleusb/driver/Pipes.o CC [M] /home/pat/src/eagleusb/driver/Me.o CC [M] /home/pat/src/eagleusb/driver/Sm.o CC [M] /home/pat/src/eagleusb/driver/eu_msg.o CC [M] /home/pat/src/eagleusb/driver/Dsp.o CC [M] /home/pat/src/eagleusb/driver/Mpoa.o CC [M] /home/pat/src/eagleusb/driver/Uni.o CC [M] /home/pat/src/eagleusb/driver/Sar.o CC [M] /home/pat/src/eagleusb/driver/Oam.o CC [M] /home/pat/src/eagleusb/driver/eu_eth.o LD [M] /home/pat/src/eagleusb/driver/eagle-usb.o Building modules, stage 2. MODPOST CC /home/pat/src/eagleusb/driver/eagle-usb.mod.o LD [M] /home/pat/src/eagleusb/driver/eagle-usb.ko make[1]: Leaving directory `/opt/fc2t/usr/src/linux-2.6.3-1.118'
Well, it works.
It is in line with what I have seen on some docs about the building of modules, but I am not very comfortable with that. First I don't like to build as root and second I don't know what to do for rpm building. What should I do to build modules as non root, and build rpms for the module ?
I searched for informations on that subject but I haven't found anything.
Pat