Hullo. Having found http://bugs.digium.com/bug_view_page.php?bug_id=0000875 I grabbed the original 0.0.1 and Dan's patch, and whilst it didn't apply, I was able to patch the zaprtc.c manually - the Makefile has changed a lot, and I wasn't able to understand the changes. (this is all on a machine that's never had any * on it before, and has a 2.6.5 kernel with a matching source tree in /usr/src/linux) So I checked out zaptel and libpri, and these compiled perfectly, but zaprtc didn't go so well: eddie:/usr/src/zaptelrtc# make cc -c zaprtc.c -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -O2 -Wall -I/usr/src/linux/include -I../zaptel -Wall In file included from /usr/src/linux/include/linux/irq.h:20, from /usr/src/linux/include/asm/hardirq.h:6, from /usr/src/linux/include/linux/interrupt.h:11, from zaprtc.c:72: /usr/src/linux/include/asm/irq.h:16: irq_vectors.h: No such file or directory make: *** [zaprtc.o] Error 1 Eek I'm a little out of my depth here with such involved kernel stuff - I can see irq_vectors.h in asm-i386 dirs of the kernel source, but Idon't know what I should do from here :( Any takers? Cheers, Gavin.
I should add a small readme to the patch. The 2.6 series build process creates a symlink to identify the correct irq_vectors.h during the build process then clears it once the build is complete. I modified the file ../include/asm/irq.h to have an absolute reference to irq_vectors.h to resolve those errors. There has been a recent discussion on the kernel developers list about out-of-tree modules and problems like this. The top level kernel makefile is being tweaked to eliminate these issues, but does not appear that the changes will make it into 2.6.6. So my process would be to build the new kernel, modify the #include in irq.h and then build zaprtc. Dan -----Original Message----- From: Gavin Hamill [mailto:gdh@acentral.co.uk] Sent: Friday, April 23, 2004 2:45 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] zaprtc on 2.6 Hullo. Having found http://bugs.digium.com/bug_view_page.php?bug_id=0000875 I grabbed the original 0.0.1 and Dan's patch, and whilst it didn't apply, I was able to patch the zaprtc.c manually - the Makefile has changed a lot, and I wasn't able to understand the changes. (this is all on a machine that's never had any * on it before, and has a 2.6.5 kernel with a matching source tree in /usr/src/linux) So I checked out zaptel and libpri, and these compiled perfectly, but zaprtc didn't go so well: eddie:/usr/src/zaptelrtc# make cc -c zaprtc.c -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -fomit-frame-pointer -O2 -Wall -I/usr/src/linux/include -I../zaptel -Wall In file included from /usr/src/linux/include/linux/irq.h:20, from /usr/src/linux/include/asm/hardirq.h:6, from /usr/src/linux/include/linux/interrupt.h:11, from zaprtc.c:72: /usr/src/linux/include/asm/irq.h:16: irq_vectors.h: No such file or directory make: *** [zaprtc.o] Error 1 Eek I'm a little out of my depth here with such involved kernel stuff - I can see irq_vectors.h in asm-i386 dirs of the kernel source, but Idon't know what I should do from here :( Any takers? Cheers, Gavin. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
The warning is harmless. I built on the existing work for compiling modules for 2.6, which required the source in linux-2.6 (which you could mod in the makefile), but you also need for the makefile in ../zaptelrtc to setup the rest of the build environment. Using the command make -C /usr/src/linux SUBDIRS=`pwd` modules will bypass the zaptelrtc makefile. If you want to send me the output of the patch attempt, I can try to fix it up, but I don't see why it would fail against zaprtc 0.1 since I used that for my base and diff. Feel free to send the diff privately, as I'm sure no-one here would be too interested. Dan -----Original Message----- From: Gavin Hamill [mailto:gdh@acentral.co.uk] Sent: Friday, April 23, 2004 3:22 PM To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] zaprtc on 2.6 On Friday 23 April 2004 22:58, Dan Austin wrote:> I should add a small readme to the patch. The 2.6 series buildprocess> creates a symlink to identify the correct irq_vectors.h during thebuild> process then clears it once the build is complete. I modified thefile> ../include/asm/irq.h to have an absolute reference to irq_vectors.h to > resolve those errors.Ahhh I see now :) For the list archives, I changed /usr/src/linux/include/asm/irq.h line 16 from #include "irq_vectors.h" to #include "mach-default/irq_vectors.h" and now a simple 'make' compiles zaprtc.o and rtcsetup just fine :) Now, I have a zaprtc.o, but not the .ko that 2.6 seems to like - I've tried to substitute the 'make modules' bit from your patch into: eddie:/usr/src/zaptelrtc# make -C /usr/src/linux SUBDIRS=`pwd` modules make: Entering directory `/usr/src/kernel-source-2.6.5' CHK include/linux/version.h *** Warning: Overriding SUBDIRS on the command line can cause *** inconsistencies make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. CHK include/asm-i386/asm_offsets.h Building modules, stage 2. make: Leaving directory `/usr/src/kernel-source-2.6.5' And whilst this doesn't generate errors, it doesn't generate a zaprtc.ko either :( Again, I'm at your mercy :) Cheers, Gavin. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users