[2008.12] Anyone get iptables working?
So, with 2008.9 I was using iptables to tether my ubuntu laptop to my freerunner's gprs connection. But as of 2008.12 I'm getting an Illegal instruction error each time I run the iptables command. Commands I run on the freerunner to enable tethering after gprs connection: iptables -v -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 sysctl -w net.ipv4.ip_forward=1 I've noticed that most but not all iptables commands generate the same Illegal instruction error as well. Has anyone got around this yet? I've installed iptables, iptables-utils, and upgraded libgcc1 to v4.2.4-r5.1 from the angstrom repository. -Nick _ Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_explore_012009___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [2008.12] Anyone get iptables working?
Nick Van Fossen stix...@hotmail.com writes: I've noticed that most but not all iptables commands generate the same Illegal instruction error as well. Has anyone got around this yet? Which instruction is it? Use the following to find out 1) gdb --args iptables -v -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 2) run 3) backtrace 4) x/5i $pc 5) info register Better Cc: me on your reply since I might not notice your reply on the mailing list due to heavy traffic :-) ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [2008.12] Anyone get iptables working?
Nick Van Fossen stix...@hotmail.com writes: Program received signal SIGILL, Illegal instruction. 0x9834 in ?? () (gdb) backtrace #0 0x9834 in ?? () Cannot access memory at address 0x2 (gdb) x/5i $pc 0x9834 __strtoull_internal+1088:teqeq pc, r5, asr r6 Very odd. teq should be perfectly legal instructions that is available on all architecture versions and does not involve exceptions. 0x9838 __strtoull_internal+1092:cfstrsnemvf4, [r0], #-316 What is this? Google finds this in a list about Cirrus Maverick co-processor support for GCC. the following are patches for gas, ld, opcodes, and bfd-- for the Cirrus DSP arm copprocessor (arm9e). /* Cirrus DSP instructions. */ + {cfstrs,0x0c000400, NULL, NULL, ARM_EXT_MAVERIK, do_c_ldst_1}, -- http://sources.redhat.com/ml/binutils/2001-10/msg00134.html Where did you get these? :-) Please run 1) gdb --args iptables -v -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 2) run 3) shell cat /proc/`pidof iptables`/maps so that we see what library comes with this __strtoull_internal implementation. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
RE: [2008.12] Anyone get iptables working?
From: timo.lindf...@iki.fi To: stix...@hotmail.com CC: community@lists.openmoko.org; timo.lindf...@iki.fi Subject: Re: [2008.12] Anyone get iptables working? Date: Thu, 8 Jan 2009 23:23:00 +0200 Nick Van Fossen stix...@hotmail.com writes: Program received signal SIGILL, Illegal instruction. 0x9834 in ?? () (gdb) backtrace #0 0x9834 in ?? () Cannot access memory at address 0x2 (gdb) x/5i $pc 0x9834 __strtoull_internal+1088: teqeq pc, r5, asr r6 Very odd. teq should be perfectly legal instructions that is available on all architecture versions and does not involve exceptions. 0x9838 __strtoull_internal+1092: cfstrsnemvf4, [r0], #-316 What is this? Google finds this in a list about Cirrus Maverick co-processor support for GCC. the following are patches for gas, ld, opcodes, and bfd-- for the Cirrus DSP arm copprocessor (arm9e). /* Cirrus DSP instructions. */ + {cfstrs,0x0c000400, NULL, NULL, ARM_EXT_MAVERIK, do_c_ldst_1}, -- http://sources.redhat.com/ml/binutils/2001-10/msg00134.html Where did you get these? :-) Please run 1) gdb --args iptables -v -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 2) run 3) shell cat /proc/`pidof iptables`/maps so that we see what library comes with this __strtoull_internal implementation. Like I said, I got iptables and iptables-utils from angstrom by adding the angstrom repo using instructions at http://wiki.openmoko.org/wiki/Repositories by creating the /etc/opkg/angstrom-feed.conf file per the 2008.8 instructions near the top. Then I used commands opkg update followed by opkg install iptables iptables-utils. This also updated the libgcc1 package, since iptables required a newer version than the openmoko repo contained. (this includes the libgcc_s.so.1 file mentioned below) -Nick r...@om-gta02:/etc/opkg# gdb --args iptables -v -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as arm-angstrom-linux-gnueabi... (no debugging symbols found) (gdb) run Starting program: /usr/sbin/iptables -v -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) Program received signal SIGILL, Illegal instruction. 0x9834 in ?? () (gdb) shell cat /proc/`pidof iptables`/maps 8000-00021000 r-xp 1f:06 14560 /usr/sbin/iptables 00028000-0002b000 rw-p 00018000 1f:06 14560 /usr/sbin/iptables 0002b000-0004c000 rwxp 0002b000 00:00 0 [heap] 4000-4001c000 r-xp 1f:06 582/lib/ld-2.6.1.so 4002-40022000 rw-p 4002 00:00 0 40023000-40025000 rw-p 0001b000 1f:06 582/lib/ld-2.6.1.so 40025000-4002f000 r-xp 1f:06 14557 /lib/libgcc_s.so.1 4002f000-40036000 ---p a000 1f:06 14557 /lib/libgcc_s.so.1 40036000-40037000 rw-p 9000 1f:06 14557 /lib/libgcc_s.so.1 40037000-40148000 r-xp 1f:06 588/lib/libc-2.6.1.so 40148000-4015 ---p 00111000 1f:06 588/lib/libc-2.6.1.so 4015-40151000 r--p 00111000 1f:06 588/lib/libc-2.6.1.so 40151000-40153000 rw-p 00112000 1f:06 588/lib/libc-2.6.1.so 40153000-40156000 rw-p 40153000 00:00 0 be85-be865000 rwxp befeb000 00:00 0 [stack] (gdb) _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [2008.12] Anyone get iptables working?
Nick Van Fossen stix...@hotmail.com writes: 8000-00021000 r-xp 1f:06 14560 /usr/sbin/iptables Ok so the address 0x9838 is indeed inside the iptables binary which thus has been compiled for wrong instruction set. Go build it for armv4 or get a distro that has it prebuilt :-) ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
RE: [2008.12] Anyone get iptables working?
Thanks again, I'll give that a try! -Nick From: timo.lindf...@iki.fi To: stix...@hotmail.com CC: timo.lindf...@iki.fi; community@lists.openmoko.org Subject: Re: [2008.12] Anyone get iptables working? Date: Fri, 9 Jan 2009 00:00:09 +0200 Nick Van Fossen stix...@hotmail.com writes: 8000-00021000 r-xp 1f:06 14560 /usr/sbin/iptables Ok so the address 0x9838 is indeed inside the iptables binary which thus has been compiled for wrong instruction set. Go build it for armv4 or get a distro that has it prebuilt :-) _ Windows Live™: Keep your life in sync. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_012009___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
RE: [2008.12] Anyone get iptables working?
Ahh dang I should have checked my e-mail again earlier. I followed Timo's suggestion to rebuild from source, and that worked like a charm. But your fix would have saved me a bit of time. If anyone wants an ipk of iptables v1.4.2 let me know :) Thanks everyone -Nick Date: Thu, 8 Jan 2009 18:15:48 -0500 From: freerun...@newkirk.us To: community@lists.openmoko.org CC: stix...@hotmail.com Subject: RE: [2008.12] Anyone get iptables working? Try opkg remove iptables followed by opkg install http://downloads.openmoko.org/repository/testing/armv4t/iptables_1.3.8-r4_armv4t.opk; ;) j On Thu, 8 Jan 2009 13:47:56 -0800, Nick Van Fossen stix...@hotmail.com wrote: From: timo.lindf...@iki.fi To: stix...@hotmail.com CC: community@lists.openmoko.org; timo.lindf...@iki.fi Subject: Re: [2008.12] Anyone get iptables working? Date: Thu, 8 Jan 2009 23:23:00 +0200 Nick Van Fossen stix...@hotmail.com writes: Program received signal SIGILL, Illegal instruction. 0x9834 in ?? () (gdb) backtrace #0 0x9834 in ?? () Cannot access memory at address 0x2 (gdb) x/5i $pc 0x9834 __strtoull_internal+1088: teqeq pc, r5, asr r6 Very odd. teq should be perfectly legal instructions that is available on all architecture versions and does not involve exceptions. 0x9838 __strtoull_internal+1092: cfstrsnemvf4, [r0], #-316 What is this? Google finds this in a list about Cirrus Maverick co-processor support for GCC. the following are patches for gas, ld, opcodes, and bfd-- for the Cirrus DSP arm copprocessor (arm9e). /* Cirrus DSP instructions. */ + {cfstrs,0x0c000400, NULL, NULL, ARM_EXT_MAVERIK, do_c_ldst_1}, -- http://sources.redhat.com/ml/binutils/2001-10/msg00134.html Where did you get these? :-) Please run 1) gdb --args iptables -v -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 2) run 3) shell cat /proc/`pidof iptables`/maps so that we see what library comes with this __strtoull_internal implementation. Like I said, I got iptables and iptables-utils from angstrom by adding the angstrom repo using instructions at http://wiki.openmoko.org/wiki/Repositories by creating the /etc/opkg/angstrom-feed.conf file per the 2008.8 instructions near the top. Then I used commands opkg update followed by opkg install iptables iptables-utils. This also updated the libgcc1 package, since iptables required a newer version than the openmoko repo contained. (this includes the libgcc_s.so.1 file mentioned below) -Nick r...@om-gta02:/etc/opkg# gdb --args iptables -v -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as arm-angstrom-linux-gnueabi... (no debugging symbols found) (gdb) run Starting program: /usr/sbin/iptables -v -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) Program received signal SIGILL, Illegal instruction. 0x9834 in ?? () (gdb) shell cat /proc/`pidof iptables`/maps 8000-00021000 r-xp 1f:06 14560 /usr/sbin/iptables 00028000-0002b000 rw-p 00018000 1f:06 14560 /usr/sbin/iptables 0002b000-0004c000 rwxp 0002b000 00:00 0 [heap] 4000-4001c000 r-xp 1f:06 582/lib/ld-2.6.1.so 4002-40022000 rw-p 4002 00:00 0 40023000-40025000 rw-p 0001b000 1f:06 582/lib/ld-2.6.1.so 40025000-4002f000 r-xp 1f:06 14557 /lib/libgcc_s.so.1 4002f000-40036000 ---p a000 1f:06 14557 /lib/libgcc_s.so.1 40036000-40037000 rw-p 9000 1f:06 14557 /lib/libgcc_s.so.1 40037000-40148000 r-xp 1f:06 588/lib/libc-2.6.1.so 40148000-4015 ---p 00111000 1f:06 588/lib/libc-2.6.1.so 4015-40151000 r--p 00111000 1f:06 588/lib/libc-2.6.1.so 40151000-40153000 rw-p 00112000 1f:06 588/lib/libc-2.6.1.so 40153000-40156000 rw-p 40153000 00:00 0 be85-be865000 rwxp befeb000 00:00 0 [stack] (gdb) _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009 -- Joel Newkirk http://jthinks.com (blog) http://newkirk.us/om (FR stuff) _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009___ Openmoko community