Subject: icmp problems

From: Simon Kilvington <[email-masked]>
Date: Mon, 19 Jul 1999 15:26:13 +0000

Hi,

	I'm having some problems with ICMP - if I try to ping my arm
linux box it sends back a valid ARP reply, but the ECHO REPLY packet
is corrupt. Also, if I try to ping from the arm linux box it just
prints out "icmp: unknown protocol".

	I'm using an A5000, 2.0.36 kernel with the 19990529 arm patches, gcc
2.8.1 cross compiler (target=arm-acorm-linuxaout), ether3 ethernet
card.

	I suspect there may be a problem with my compiler. When I was
compiling the kernel I had to make one of the functions in ether3.c not
be inlined otherwise cc1 called abort. (Though it worked if optimisation
wasn't turned on.) So I'm not entirely confident that there's nothing
else going wrong with it. Can you compile the kernel with optimisation
turned off? - when I tried it it threw up all sorts of undefined
references when it got to the final linking step. (eg look at
include/asm/byteorder.h, ntohs et al are not defined unless
__OPTIMIZE__ is defined.)

	my next project, once I've got the networking working, is to
build an elf system. The last I heard the elf stuff for arm2/3 machines
was not too stable. Is this still the case? Will I be better off with
the egcs version of gcc?

-- 
Simon Kilvington, [email-masked]
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Mon, 19 Jul 1999 15:34:52 +0100 (BST)

> prints out "icmp: unknown protocol".

Can you tcpdump the net?  tcpdump -i eth0 -s 1024 -e -x on the
non-ARM end please?

> __OPTIMIZE__ is defined.)

The kernel *must* always be compiled with optimisation enabled.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Alex Holden <[email-masked]>
Date: Mon, 19 Jul 1999 15:55:12 +0100 (GMT)

> > prints out "icmp: unknown protocol".

I think that means you don't have an /etc/protocols file.

--------------- Linux- the choice of a GNU generation. --------------
: Alex Holden (M1CJD)- Caver, Programmer, Land Rover nut, Radio Ham :

---

From: Philip Blundell <[email-masked]>
Date: Mon, 19 Jul 1999 15:51:59 +0100

>prints out "icmp: unknown protocol".

Add icmp to /etc/protocols.

>	I suspect there may be a problem with my compiler.

Try the latest prerelease of gcc 2.95 instead.  2.8.1 is old and fairly 
broken.

>Can you compile the kernel with optimisation turned off?

No.  If you think you are having compiler problems you could try -O1.

>was not too stable. Is this still the case? Will I be better off with

I think ELF is working ok on 26-bit machines these days, though I haven't ever 
really used it much.  If you want to try this you should probably use the 
latest development version of binutils and, again, gcc 2.95.  There is a small
patch for the latter at 
<ftp://ftp.netwinder.org/users/p/philb/gcc-2.95-diff-990716.gz> which might 
also help.

p.

---

From: Philip Blundell <[email-masked]>
Date: Mon, 19 Jul 1999 15:57:47 +0100

>2.8.1 cross compiler (target=arm-acorm-linuxaout), ether3 ethernet

BTW, if you do try a newer version of gcc with that kernel you will need to 
add "-fno-strict-aliasing -ffixed-r10" to the CFLAGS.  If you use a 2.2 or 
2.3 kernel with the patch from ftp.netwinder.org:/users/p/philb/kernel/ then 
it should work automatically with the new gcc and binutils.

p.