I cannot build a new kernel image when I add a assembly module to It

I cannot build a new kernel image when I add a assembly module to It

am 08.08.2005 15:21:00 von mhb

Hi

I had added an assembly program to the networking
section of kernel linux 2.2.16 without any problem.
But when I add it to kerenel 2.4.1 I could build that
kernel, but I faced with kernel panic error when I
boot
system with new builded image. I use the following
Make file to build It in the 2.4.1 kernel.

/*--------------------------------*/
L_TARGET := libtest.a

obj-$(CONFIG_TEST) += test.o

override CFLAGS += -Wpointer-arith
override CFLAGS += -Wbad-function-cast
override CFLAGS += -DTERMIO


#----------------------------------------------------------- ------------------
# Section 3 - Conversion routines from new style to
old style for Rules.make

#----------------------------------------------------------- ------------------
# Section 4 - Rules.make section
include $(TOPDIR)/Rules.make
#----------------------------------------------------------- ------------------
# Section 5

$(obj-y): $(TOPDIR)/include/linux/config.h\

$(TOPDIR)/include/linux/autoconf.h

clean:
-rm -f *.o
tags:
ctags libtest.a

tar:
tar -cvf /dev/f1 .

test.o: test1.o test2.o test3.o
$(LD) -r -o $@ test1.o test2.o test3.o

test3.o: test3.s
$(AS) -o $@ $<
#----------------------------------------------------------- ------------------
As you can see test3.s is an assembly file.
I guess this problem is related to this Makefile.
Is this Make file true?
How can I win over this problem?

thanks

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: I cannot build a new kernel image when I add a assembly moduleto It

am 08.08.2005 21:17:42 von Stephen Ray

mhb wrote:
> Hi
>
> I had added an assembly program to the networking
> section of kernel linux 2.2.16 without any problem.
> But when I add it to kerenel 2.4.1 I could build that
> kernel, but I faced with kernel panic error when I
> boot
> system with new builded image.
....
> As you can see test3.s is an assembly file.
> I guess this problem is related to this Makefile.
> Is this Make file true?
> How can I win over this problem?
>
> thanks
>

Sorry, I'm not much of a linux assembly guru, but I am wondering why you
assume the Makefile is the problem. It could be, I'm not a makefile
guru either. But, as far as I know, make works the same no matter what
kernel it's running on. My first suspicion would be that calling
conventions were changed between kernel versions, or that you use a
kernel function that changed functionality. Also, the version of gcc
may be important. I think something in the 2.9xx series is recommended
for compiling the kernel.

Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html