From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 27 18:30:19 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 57694323 for ; Tue, 27 Aug 2013 18:30:19 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x22f.google.com (mail-ea0-x22f.google.com [IPv6:2a00:1450:4013:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A5ED22A06 for ; Tue, 27 Aug 2013 18:30:18 +0000 (UTC) Received: by mail-ea0-f175.google.com with SMTP id m14so2429740eaj.6 for ; Tue, 27 Aug 2013 11:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Dla7vllCy8I8nyU3O8re4GxtIYZC/qn/nHeMKBm68uk=; b=ZWNSx+VY+4nPmjDHblxW5J2GxDq3P05BmmSTPHyXKvRCGvLcKyk8bDMFvoYlFcWCrf VxS8QHX0EALvoRASft5+P2smYGd1PCHPJRAA34/c16gwIAOuD8v2wNFkzobNrhauhU8f Ff0HnyGvutABNws3k/d0zXlZGc1D9hhet88MLpBAnx4inCT2CeI4Tg+x3YXQSTrGGE1X VSEbIT8L9TZ1c5mZj2OyUsuuEnU7wXYvQUwWtHKwXBC36k7SPB1k52yCZTfL8PjXsWxe aN1Bu4HLanmzjq9EjaX4OJ4sOP+jQ43ru8H+slGPMDjCgvyIsOwHHcRcLfuB5yxWH6hm 5Pqg== MIME-Version: 1.0 X-Received: by 10.14.205.9 with SMTP id i9mr209544eeo.72.1377628216903; Tue, 27 Aug 2013 11:30:16 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Tue, 27 Aug 2013 11:30:16 -0700 (PDT) In-Reply-To: <20130827055547.GK29777@funkthat.com> References: <20130826225420.GF29777@funkthat.com> <20130826230843.GH29777@funkthat.com> <20130827055547.GK29777@funkthat.com> Date: Tue, 27 Aug 2013 11:30:16 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: hiren panchasara , freebsd-embedded Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 18:30:19 -0000 On Mon, Aug 26, 2013 at 10:55 PM, John-Mark Gurney wrote: > > > Alright, so debugging in g_uncompress.c gave me this: > > > > flash/spi0.uncompress: media sectorsize 512, mediasize 8388608 > > flash/spi0.uncompress: no CLOOP magic > > map/u-boot.uncompress: media sectorsize 512, mediasize 262144 > > map/u-boot.uncompress: no CLOOP magic > > map/u-boot-env.uncompress: media sectorsize 512, mediasize 65536 > > map/u-boot-env.uncompress: no CLOOP magic > > map/kernel.uncompress: media sectorsize 512, mediasize 1048576 > > map/kernel.uncompress: no CLOOP magic > > map/rootfs.uncompress: media sectorsize 512, mediasize 6684672 > > map/rootfs.uncompress: no CLOOP magic > > map/cfg.uncompress: media sectorsize 512, mediasize 262144 > > map/cfg.uncompress: no CLOOP magic > > map/eeprom.uncompress: media sectorsize 512, mediasize 65536 > > map/eeprom.uncompress: no CLOOP magic > > Trying to mount root from ufs:/dev/map/rootfs.uncompress []... > > mountroot: waiting for device /dev/map/rootfs.uncompress ... > > Mounting from ufs:/dev/map/rootfs.uncompress failed with error 19. > > > > Loader variables: > > > > Manual root filesystem specification: > > : [options] > > Mount using filesystem > > and with the specified (optional) option list. > > > > eg. ufs:/dev/da0s1a > > zfs:tank > > cd9660:/dev/acd0 ro > > (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /) > > > > ? List valid disk boot devices > > . Yield 1 second (for background tasks) > > Abort manual input > > > > mountroot> ? > > > > List of GEOM managed disk devices: > > map/eeprom map/cfg map/rootfs map/kernel map/u-boot-env map/u-boot > > flash/spi0 > > > > mountroot> > > Looks like your rootfs image isn't correct... does the image have a: > #!/bin/sh > > as the first line? or is it something else? what does file say about > the image? Have you tried to boot directly from it using > "ufs:/dev/map/rootfs"? > So everything was setup well at this front. The image had "#!/bin/sh" in the beginning and all that. loos@ caught that the problem was the rootfs start point in AP91.hints file. Specially we had to specify: hint.map.3.start=0x130000 As mtdparts specify 0x130000 as rootfs offset :-) Now it boots up fine now (below pasting looong bootup logs). Will look into the networking setup next :-) cheers, Hiren U-Boot 1.1.4.2-s594 (Dec 5 2012 - 15:23:07) Board: Ubiquiti Networks XM board (rev 1.0 e302) DRAM: 32 MB Flash: 8 MB PCIe WLAN Module found (#1). Net: eth0, eth1 Hit any key to stop autoboot: 0 ar7240> ures Setting default IP 192.168.1.20 Starting TFTP server... Using eth0 (192.168.1.20), address: 0x81000000 Waiting for connection: | Receiving file from 192.168.1.254:57971 Received 5966201 bytes Firmware Version: XM.ar7240.FreeBSD Setting U-Boot environment variables Un-Protected 1 sectors Erasing Flash.... done Erased 1 sectors Writing to Flash... done Protected 1 sectors Copying partition 'kernel' to flash memory: erasing range 0x9F050000..0x9F12FFFF: .............. done Erased 14 sectors writing to address 0x9f050000, length 0x000e0000 ... Copying partition 'rootfs' to flash memory: erasing range 0x9F130000..0x9F5FFFFF: ............................................................................. done Erased 77 sectors writing to address 0x9f130000, length 0x004d0000 ... Copying partition 'cfg' to flash memory: erasing range 0x9F6F0000..0x9F6FFFFF: . done Erased 1 sectors writing to address 0x9f6f0000, length 0x00010000 ... Firmware update complete. Resetting... U-Boot 1.1.4.2-s594 (Dec 5 2012 - 15:23:07) Board: Ubiquiti Networks XM board (rev 1.0 e302) DRAM: 32 MB Flash: 8 MB PCIe WLAN Module found (#1). Net: eth0, eth1 Hit any key to stop autoboot: 0 ## Booting image at 9f050000 ... Image Name: FreeBSD Created: 2013-08-27 11:12:34 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 892769 Bytes = 871.8 kB Load Address: 80050000 Entry Point: 80050100 Verifying Checksum ... OK Uncompressing Kernel Image ... OK Starting kernel ... CPU platform: Atheros AR7241 rev 1 CPU Frequency=390 MHz CPU DDR Frequency=390 MHz CPU AHB Frequency=195 MHz platform frequency: 390000000 CPU reference clock: 5 MHz arguments: a0 = 00000006 a1 = a1f4bfb0 a2 = a1f4c450 a3 = 00000000 Cmd line:argv is invalid 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 KDB: debugger backends: ddb KDB: current backend: ddb 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 10.0-CURRENT #6 r254676M: Tue Aug 27 11:11:27 UTC 2013 hirenp@catchbone-l7.corp.yahoo.com:/usr/home/hirenp/work/freebsd/head/obj/mipseb/mips.mips/usr/home/hirenp/work/freebsd/head/src/sys/AP91 mips gcc version 4.2.1 20070831 patched [FreeBSD] real memory = 16777216 (16384K bytes) avail memory = 12087296 (11MB) random device not loaded; using insecure entropy nexus0: clock0: on nexus0 Timecounter "MIPS32" frequency 195000000 Hz quality 800 Event timer "MIPS32" frequency 195000000 Hz quality 800 argemdio0: at mem 0x1a000000-0x1a000fff on nexus0 mdio0: on argemdio0 mdioproxy0: on mdio0 arswitch0: on mdio0 miibus0: on arswitch0 ukphy0: PHY 0 on miibus0 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto miibus1: on arswitch0 ukphy1: PHY 1 on miibus1 ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto miibus2: on arswitch0 ukphy2: PHY 2 on miibus2 ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto miibus3: on arswitch0 ukphy3: PHY 3 on miibus3 ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto etherswitch0: on arswitch0 mdio1: on arswitch0 mdioproxy1: on mdio1 apb0 at irq 4 on nexus0 uart0: <16550 or compatible> on apb0 uart0: console (115200,n,8,1) pcib0 at irq 0 on nexus0 pcib0: found EEPROM at 0x1fff1000 on 0.0.0 pcib0: EEPROM firmware: 0x1fff1000 @ 4096 bytes pcib0: device EEPROM 'pcib.0.bus.0.0.0.eeprom_firmware' registered pci0: on pcib0 pci0: at device 0.0 (no driver attached) arge0: at mem 0x19000000-0x19000fff irq 2 on nexus0 arge0: Overriding MAC from EEPROM miiproxy0: on arge0 miiproxy0: attached to target mdio1 arge0: finishing attachment, phymask 0010, proxy set miibus4: on miiproxy0 ukphy4: PHY 4 on miibus4 ukphy4: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto arge0: Ethernet address: 12:00:00:18:3c:02 arge1: at mem 0x1a000000-0x1a000fff irq 3 on nexus0 arge1: finishing attachment, phymask 0000, proxy null arge1: Ethernet address: 12:00:00:18:3c:03 spi0: at mem 0x1f000000-0x1f00000f on nexus0 spibus0: on spi0 mx25l0: at cs 0 on spibus0 mx25l0: w25q64, sector 65536 bytes, 128 sectors ar71xx_wdog0: on nexus0 ar71xx_wdog0: Previous reset was due to watchdog timeout Timecounters tick every 1.000 msec arswitch0port1: link state changed to DOWN arswitch0port2: link state changed to DOWN arswitch0port3: link state changed to DOWN arswitch0port4: link state changed to DOWN map/rootfs.uncompress: GEOM_ULZMA image found map/rootfs.uncompress: 173 x 131072 blocks Trying to mount root from ufs:/dev/map/rootfs.uncompress []... warning: no time-of-day clock registered, system time will not be set accurately Aug 27 11:11:45 init: login_getclass: unknown class 'daemon' *** Populating /var .. *** Loading configuration files .. *** Restoring from /dev/map/cfg .. gunzip: unknown compression format 0 blocks *** Completed. *** setting up hostname *** Load kernel modules random: initialized *** bringing up loopback .. *** Starting networking via /etc/rc.d/base/net sysctl: unknown oid 'dev.ath.0.txq_mcastq_maxdepth': No such file or directory sysctl: unknown oid 'dev.ath.1.txq_mcastq_maxdepth': No such file or directory *** Interface: arge0: start arge0: link state changed to UP *** Interface: arge0: done *** Interface: bridge0: start bridge0: Ethernet address: d2:c4:a8:63:0e:57 arge0: promiscuous mode enabled bridge0: link state changed to UP *** Interface: bridge0: done *** Default password/login databases .. *** inetd *** Done! FreeBSD/mips (freebsd-wifi-build) (ttyu0) login: root No home directory. Logging in with home = "/". # uname -a FreeBSD freebsd-wifi-build 10.0-CURRENT FreeBSD 10.0-CURRENT #6 r254676M: Tue Aug 27 11:11:27 UTC 2013 hirenp@catchbone-l7.corp.yahoo.com:/usr/home/hirenp/work/freebsd/head/obj/mipseb/mips.mips/usr/home/hirenp/work/freebsd/head/src/sys/AP91 mips # df -k Filesystem 1024-blocks Used Avail Capacity Mounted on /dev/map/rootfs.uncompress 21851 20633 -529 103% / devfs 1 1 0 100% /dev /dev/md0 828 8 756 1% /tmp /dev/md1 828 56 708 7% /var /dev/md2 828 436 328 57% /etc # pciconf -lv none0@pci0:0:0:0: class=0x028000 card=0xe3020777 chip=0x002a168c rev=0x01 hdr=0x00 vendor = 'Atheros Communications Inc.' device = 'AR928X Wireless Network Adapter (PCI-Express)' class = network # ifconfig arge0: flags=8943 metric 0 mtu 1500 options=80000 ether 12:00:00:18:3c:02 media: Ethernet autoselect (100baseTX ) status: active arge1: flags=8802 metric 0 mtu 1500 ether 12:00:00:18:3c:03 media: Ethernet 1000baseT status: active lo0: flags=8049 metric 0 mtu 16384 options=600003 inet 127.0.0.1 netmask 0xff000000 bridge0: flags=8843 metric 0 mtu 1500 ether d2:c4:a8:63:0e:57 inet 192.168.1.20 netmask 0xffffff00 broadcast 192.168.1.255 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: arge0 flags=143 ifmaxaddr 0 port 5 priority 128 path cost 200000 #