From owner-freebsd-mips@FreeBSD.ORG Tue Feb 5 17:16:24 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0EEB2E32 for ; Tue, 5 Feb 2013 17:16:24 +0000 (UTC) (envelope-from remy@activnetworks.com) Received: from fr-exchange.activnetworks.com (anwadmin.net8.nerim.net [213.41.185.85]) by mx1.freebsd.org (Postfix) with ESMTP id 70FDDA18 for ; Tue, 5 Feb 2013 17:16:22 +0000 (UTC) Received: from rn.activnetworks.com ([192.168.1.100]) by fr-exchange.activnetworks.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 5 Feb 2013 18:13:42 +0100 Message-ID: <51113DCB.5000904@activnetworks.com> Date: Tue, 05 Feb 2013 18:13:47 +0100 From: Remy Nonnenmacher User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130118 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-mips@freebsd.org Subject: Routerboard RB435G: dynamically linked binaries crash, static OK. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 Feb 2013 17:13:42.0527 (UTC) FILETIME=[25EFD0F0:01CE03C4] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2013 17:16:24 -0000 Hi, I'm trying to boot a mikrotik routerboard RB435G (mainly a 433UAH with 256MB). I've setup a cross builded nfs root using 9-stable (head does not works: interfaces does not come up). I got the whole thing up until it nfs mount root filesystem. After that, whatever dynamic binaries I invoke, it dumps core somewhere in libc.so.7 (always at same point). I guess it's libc since this is the last accessed lib via NFS before crash. I'm left with /rescue statically linked binaries that works well. Any hint ? (Cross compiled using: TARGET=mips, TARGET_ARCH=mipseb, TARGET_CPUTYPE=mips32). +++++ Log of boot with dumps samples.... RouterBOOT booter 2.41 RouterBoard 435G CPU frequency: 680 MHz Memory size: 256 MB Press any key within 2 seconds to enter setup.. trying bootp protocol... OK Got IP address: 192.168.1.115 resolved mac address E4:1F:13:B9:8E:84 Gateway: 192.168.1.1 transfer started ................................................... transfer ok, time=1.73s setting up elf image... OK jumping to kernel code CPU platform: Atheros AR7161 rev 2 CPU Frequency=680 MHz CPU DDR Frequency=340 MHz CPU AHB Frequency=170 MHz platform frequency: 680000000 arguments: a0 = 00000009 a1 = a0871c00 a2 = 00000000 a3 = 00000000 Cmd line: console=ttyS0,115200 boot_part_size=4194304 gpio=4031 HZ=340000000 mem=256M kmac=D4:CA:6D:6C:24:1C board=435G boot=1 mlc=3 Environment: envp is invalid Cache info: picache_stride = 4096 picache_loopcount = 16 pdcache_stride = 4096 pdcache_loopcount = 8 cpu0: MIPS Technologies processor v116.147 MMU: Standard TLB, 16 entries L1 i-cache: 4 ways of 512 sets, 32 bytes per line L1 d-cache: 4 ways of 256 sets, 32 bytes per line Config1=0x9ee3519e Config3=0x20 Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.1-STABLE #0: Tue Feb 5 16:40:31 CET 2013 root@dvl5.activnetworks.com:/usr/rb435/obj/mips.mipseb/usr/rb435/src/sys/RB435 mips real memory = 268435456 (262144K bytes) avail memory = 255176704 (243MB) nexus0: clock0: on nexus0 Timecounter "MIPS32" frequency 340000000 Hz quality 800 Event timer "MIPS32" frequency 340000000 Hz quality 800 apb0 at irq 4 on nexus0 uart0: <16550 or compatible> on apb0 uart0: console (115200,n,8,1) gpio0: on apb0 gpio0: [GIANT-LOCKED] gpioc0: on gpio0 gpiobus0: on gpio0 gpioled0: at pin(s) 4 on gpiobus0 arge0: at mem 0x19000000-0x19000fff irq 2 on nexus0 arge0: Ethernet address: d4:ca:6d:6c:24:1c arge1: at mem 0x1a000000-0x1a000fff irq 3 on nexus0 miibus0: on arge1DUMMYNET 0 with IPv6 initialized (100409) ukphy0: PHY 4 on miibus0 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto arge1: Ethernet address: d4:ca:6d:6c:24:1d spi0: at mem 0x1f000000-0x1f00000f on nexus0 spibus0: on spi0 spibus0: at cs 2 ar71xx_wdog0: on nexus0 Timecounters tick every 1.000 msec ipfw2 initialized, divert enabled, nat enabled, default to accept, logging disabled DUMMYNET 0 with IPv6 initialized (100409) load_dn_sched dn_sched QFQ loaded load_dn_sched dn_sched RR loaded load_dn_sched dn_sched WF2Q+ loaded load_dn_sched dn_sched FIFO loaded load_dn_sched dn_sched PRIO loaded bootpc_init: wired to interface 'arge1' Sending DHCP Discover packet from interface arge1 (d4:ca:6d:6c:24:1d) arge1: link state changed to DOWN arge1: link state changed to UP Received DHCP Offer packet on arge1 from 192.168.1.254 (accepted) (no root path) Received DHCP Offer packet on arge1 from 192.168.1.254 (ignored) (no root path) Received DHCP Offer packet on arge1 from 192.168.1.254 (ignored) (no root path) Received DHCP Offer packet on arge1 from 192.168.1.254 (ignored) (no root path) Sending DHCP Request packet from interface arge1 (d4:ca:6d:6c:24:1d) Received DHCP Ack packet on arge1 from 192.168.1.254 (accepted) (got root path) arge1 at 192.168.1.115 server 192.168.1.254 boot file kernel.435 subnet mask 255.255.255.0 router 192.168.1.1 rootfs 192.168.1.254:/usr/rb435/root Adjusted interface arge1 Trying to mount root from nfs: []... NFS ROOT: 192.168.1.254:/usr/rb435/root warning: no time-of-day clock registered, system time will not be set accurately warning: no time-of-day clock registered, system time will not be set accurately BAD_PAGE_FAULT: pid 16 (sh), uid 0: pc 0x40445418 got a fault at 0x40445450 Trapframe Register Dump: zero: 0 at: 0x40465b70 v0: 0x40458000 v1: 0x7ffedec0 a0: 0x3 a1: 0x40465b60 a2: 0 a3: 0 t0: 0x7fffefd8 t1: 0x7fffefb8 t2: 0 t3: 0x56ce3179 t4: 0x1 t5: 0 t6: 0x738 t7: 0x4043a284 t8: 0 t9: 0x40445450 s0: 0 s1: 0x7ffed8e8 s2: 0x404422d0 s3: 0x7fffdfa0 s4: 0x7fffdee0 s5: 0x7fffdecc s6: 0x2 s7: 0x7fffdedc k0: 0 k1: 0 gp: 0x4046cf60 sp: 0x7ffed860 s8: 0x6474e551 ra: 0x404453f4 sr: 0xf013 mullo: 0x80be mulhi: 0x8c badvaddr: 0x40445450 cause: 0x4 pc: 0x40445418 Page table info for pc address 0x40445418: pde = 0x80a5b000, pte = 0x4002c5da Dumping 4 words starting at pc address 0x40445418: af220000 8c420034 8fbf0654 8fbe0650 Page table info for bad address 0x40445450: pde = 0x80a5b000, pte = 0x4002c5da pid 16 (sh), uid 0: exited on signal 10 Jan 1 00:00:15 init: /bin/sh on /etc/rc terminated abnormally, going to single user mode Enter full pathname of shell or RETURN for /bin/sh: /rescue/sh # /rescue/ls -l / total 145 -rw-r--r-- 2 root wheel 963 Feb 5 2013 .cshrc -rw-r--r-- 2 root wheel 251 Feb 5 2013 .profile -r--r--r-- 1 root wheel 6194 Feb 5 2013 COPYRIGHT drwxr-xr-x 2 root wheel 1024 Feb 5 2013 bin drwxr-xr-x 7 root wheel 512 Feb 5 2013 boot dr-xr-xr-x 4 root wheel 512 Jan 1 00:00 dev drwxr-xr-x 20 root wheel 2048 Feb 5 2013 etc drwxr-xr-x 3 root wheel 1536 Feb 5 2013 lib drwxr-xr-x 3 root wheel 512 Feb 5 2013 libexec drwxr-xr-x 2 root wheel 512 Feb 5 2013 media drwxr-xr-x 2 root wheel 512 Feb 5 2013 mnt dr-xr-xr-x 2 root wheel 512 Feb 5 2013 proc drwxr-xr-x 2 root wheel 2560 Feb 5 2013 rescue drwxr-xr-x 2 root wheel 512 Feb 5 2013 root drwxr-xr-x 2 root wheel 2560 Feb 5 2013 sbin lrwxr-xr-x 1 root wheel 11 Feb 5 2013 sys -> usr/src/sys drwxrwxrwt 2 root wheel 512 Feb 5 2013 tmp drwxr-xr-x 14 root wheel 512 Feb 5 2013 usr drwxr-xr-x 23 root wheel 512 Feb 5 2013 var # /bin/ls -l / BAD_PAGE_FAULT: pid 20 (ls), uid 0: pc 0x40423418 got a fault at 0x40423450 Trapframe Register Dump: zero: 0 at: 0x40443b70 v0: 0x40436000 v1: 0x7ffede38 a0: 0x3 a1: 0x40443b60 a2: 0 a3: 0 t0: 0x7fffefd8 t1: 0x7fffefb8 t2: 0 t3: 0x55235001 t4: 0x1 t5: 0 t6: 0x738 t7: 0x40418284 t8: 0 t9: 0x40423450 s0: 0 s1: 0x7ffed860 s2: 0x404202d0 s3: 0x7fffdf2c s4: 0x7fffde6c s5: 0x7fffde44 s6: 0x2 s7: 0x7fffde54 k0: 0 k1: 0 gp: 0x4044af60 sp: 0x7ffed7d8 s8: 0x6474e551 ra: 0x404233f4 sr: 0xf013 mullo: 0x80be mulhi: 0x8c badvaddr: 0x40423450 cause: 0x4 pc: 0x40423418 Page table info for pc address 0x40423418: pde = 0x80a7f000, pte = 0x4002c5da Dumping 4 words starting at pc address 0x40423418: af220000 8c420034 8fbf0654 8fbe0650 Page table info for bad address 0x40423450: pde = 0x80a7f000, pte = 0x4002c5da pid 20 (ls), uid 0: exited on signal 10 Bus error # # /rescue/df Filesystem 512-blocks Used Avail Capacity Mounted on 192.168.1.254:/usr/rb435/root 247682104 42390264 185477272 19% / devfs 2 2 0 100% /dev # df BAD_PAGE_FAULT: pid 22 (df), uid 0: pc 0x4041f418 got a fault at 0x4041f450 Trapframe Register Dump: zero: 0 at: 0x4043fb70 v0: 0x40432000 v1: 0x7ffede48 a0: 0x3 a1: 0x4043fb60 a2: 0 a3: 0 t0: 0x7fffefd8 t1: 0x7fffefb8 t2: 0 t3: 0x55460025 t4: 0x1 t5: 0 t6: 0x738 t7: 0x40414284 t8: 0 t9: 0x4041f450 s0: 0 s1: 0x7ffed870 s2: 0x4041c2d0 s3: 0x7fffdf34 s4: 0x7fffde74 s5: 0x7fffde54 s6: 0x2 s7: 0x7fffde5c k0: 0 k1: 0 gp: 0x40446f60 sp: 0x7ffed7e8 s8: 0x6474e551 ra: 0x4041f3f4 sr: 0xf013 mullo: 0x80be mulhi: 0x8c badvaddr: 0x4041f450 cause: 0x4 pc: 0x4041f418 Page table info for pc address 0x4041f418: pde = 0x80a80000, pte = 0x4002c5da Dumping 4 words starting at pc address 0x4041f418: af220000 8c420034 8fbf0654 8fbe0650 Page table info for bad address 0x4041f450: pde = 0x80a80000, pte = 0x4002c5da pid 22 (df), uid 0: exited on signal 10 Bus error