SUCCESS: BusLogic-1.2.2 / Linux 1.2.13 compile error

jms@pobox.com
Thu, 25 Apr 96 08:25 CDT


>>>>> "lnz" == "Leonard N Zubkoff" <lnz@dandelion.com> writes:

lnz> Date: Wed, 24 Apr 96 21:27 CDT
lnz> From: jms@pobox.com

lnz> I've tried MANY kernel builds with different patch configurations. The
lnz> BusLogic 1.2.2 driver and the linux-elf patch seem to be mutually-exclusive.

lnz> I extracted the linux-1.2.13 source, applied the BusLogic 1.2.2 driver
lnz> patch and the linux-elf patch. A build resulted in the final vmlinux
lnz> ld failing with numerous undefined references in the disable_irq
lnz> function of kernel.o. Does anyone know how to get an elf 1.2.13 with
lnz> the new driver?

lnz> Well, this finally explains a thing or two. I suspect that it's the use of '_'
lnz> versus nothing on symbol names that's causing the problem, most likely with the
lnz> new BUILD_TIMER_IRQ macro in irq.h.

lnz> I don't run an ELF system yet so someone's going to have to volunteer as a test
lnz> site...

lnz> I suspect that just removing the initial underscores on the symbols as I've
lnz> done below would take care of the problem. Someone please test this theory out
lnz> please.

[code changes removed]

OK, the changes you sent worked, it compiles now. I still have to go
back and rebuild my source tree with all the other patches that I use
before I can build something I can boot with, but a base elf source
tree does compile now. Here are two patches, the first is a patch to
the BusLogic.patch file and the second is a patch to the irq.h for a
tree patched with the original patch.

Buslogic.patch-patch:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Cut Here -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
*** BusLogic.patch.orig Thu Apr 25 07:57:14 1996
--- BusLogic.patch Thu Apr 25 08:01:44 1996
***************
*** 932,952 ****
+asmlinkage void BAD_IRQ_NAME(nr); \
+__asm__( \
+"\n.align 4\n" \
! +"_fast_IRQ" #nr "_interrupt:\n\t" \
! +"_bad_IRQ" #nr "_interrupt:\n\t" \
! +"_IRQ" #nr "_interrupt:\n\t" \
+ "pushl $-"#nr"-2\n\t" \
+ SAVE_ALL \
+ ACK_##chip(mask) \
! + "incl _intr_count\n\t"\
+ "movl %esp,%ebx\n\t" \
+ "pushl %ebx\n\t" \
+ "pushl $" #nr "\n\t" \
! + "call _do_IRQ\n\t" \
+ "addl $8,%esp\n\t" \
+ "cli\n\t" \
+ UNBLK_##chip(mask) \
! + "decl _intr_count\n\t" \
+ "jmp ret_from_sys_call\n");

#endif
--- 932,952 ----
+asmlinkage void BAD_IRQ_NAME(nr); \
+__asm__( \
+"\n.align 4\n" \
! +"fast_IRQ" #nr "_interrupt:\n\t" \
! +"bad_IRQ" #nr "_interrupt:\n\t" \
! +"IRQ" #nr "_interrupt:\n\t" \
+ "pushl $-"#nr"-2\n\t" \
+ SAVE_ALL \
+ ACK_##chip(mask) \
! + "incl intr_count\n\t"\
+ "movl %esp,%ebx\n\t" \
+ "pushl %ebx\n\t" \
+ "pushl $" #nr "\n\t" \
! + "call do_IRQ\n\t" \
+ "addl $8,%esp\n\t" \
+ "cli\n\t" \
+ UNBLK_##chip(mask) \
! + "decl intr_count\n\t" \
+ "jmp ret_from_sys_call\n");

#endif
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Cut Here -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

irq.h-patch:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Cut Here -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
*** linux-1.2.13/include/asm-i386/irq.h.orig Thu Apr 25 00:59:40 1996
--- linux-1.2.13/include/asm-i386/irq.h Thu Apr 25 07:42:11 1996
***************
*** 168,188 ****
asmlinkage void BAD_IRQ_NAME(nr); \
__asm__( \
"\n.align 4\n" \
! "_fast_IRQ" #nr "_interrupt:\n\t" \
! "_bad_IRQ" #nr "_interrupt:\n\t" \
! "_IRQ" #nr "_interrupt:\n\t" \
"pushl $-"#nr"-2\n\t" \
SAVE_ALL \
ACK_##chip(mask) \
! "incl _intr_count\n\t"\
"movl %esp,%ebx\n\t" \
"pushl %ebx\n\t" \
"pushl $" #nr "\n\t" \
! "call _do_IRQ\n\t" \
"addl $8,%esp\n\t" \
"cli\n\t" \
UNBLK_##chip(mask) \
! "decl _intr_count\n\t" \
"jmp ret_from_sys_call\n");

#endif
--- 168,188 ----
asmlinkage void BAD_IRQ_NAME(nr); \
__asm__( \
"\n.align 4\n" \
! "fast_IRQ" #nr "_interrupt:\n\t" \
! "bad_IRQ" #nr "_interrupt:\n\t" \
! "IRQ" #nr "_interrupt:\n\t" \
"pushl $-"#nr"-2\n\t" \
SAVE_ALL \
ACK_##chip(mask) \
! "incl intr_count\n\t"\
"movl %esp,%ebx\n\t" \
"pushl %ebx\n\t" \
"pushl $" #nr "\n\t" \
! "call do_IRQ\n\t" \
"addl $8,%esp\n\t" \
"cli\n\t" \
UNBLK_##chip(mask) \
! "decl intr_count\n\t" \
"jmp ret_from_sys_call\n");

#endif
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Cut Here -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Johnie

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Johnie Stafford           |  Internet E-mail: jms@pobox.com
 KB5YVF - Lafayette, LA    | Ham Radio Packet: kb5yvf@k5arh.#lftla.la.us.noam
                           |          WWW URL: http://www.pobox.com/~jms
           pobox.com for lifetime email -- mail info@pobox.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-