Making Picostation m2HP work
Adrian Chadd
adrian at freebsd.org
Tue Aug 27 18:38:53 UTC 2013
Hi!
Great work! feel free to commit the config and hints file for this thing!
When using lzma, did you use /usr/bin/lzma, or /usr/local/bin/lzma from
ports? Did they both fail?
-adrian
On 27 August 2013 11:30, hiren panchasara <hiren.panchasara at gmail.com>wrote:
> On Mon, Aug 26, 2013 at 10:55 PM, John-Mark Gurney <jmg at funkthat.com>
> 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:
> > > <fstype>:<device> [options]
> > > Mount <device> using filesystem <fstype>
> > > 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)
> > > <empty line> 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<PerfCount,WatchRegs,MIPS16,EJTAG>
> 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 at 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: <MIPS32 root nexus>
> clock0: <Generic MIPS32 ticker> on nexus0
> Timecounter "MIPS32" frequency 195000000 Hz quality 800
> Event timer "MIPS32" frequency 195000000 Hz quality 800
> argemdio0: <Atheros AR71xx built-in ethernet interface, MDIO controller> at
> mem 0x1a000000-0x1a000fff on nexus0
> mdio0: <MDIO> on argemdio0
> mdioproxy0: <MII/MDIO proxy, MDIO side> on mdio0
> arswitch0: <Atheros AR7240 Ethernet Switch> on mdio0
> miibus0: <MII bus> on arswitch0
> ukphy0: <Generic IEEE 802.3u media interface> PHY 0 on miibus0
> ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
> 1000baseT-FDX, 1000baseT-FDX-master, auto
> miibus1: <MII bus> on arswitch0
> ukphy1: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
> ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
> 1000baseT-FDX, 1000baseT-FDX-master, auto
> miibus2: <MII bus> on arswitch0
> ukphy2: <Generic IEEE 802.3u media interface> PHY 2 on miibus2
> ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
> 1000baseT-FDX, 1000baseT-FDX-master, auto
> miibus3: <MII bus> on arswitch0
> ukphy3: <Generic IEEE 802.3u media interface> PHY 3 on miibus3
> ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
> 1000baseT-FDX, 1000baseT-FDX-master, auto
> etherswitch0: <Switch controller> on arswitch0
> mdio1: <MDIO> on arswitch0
> mdioproxy1: <MII/MDIO proxy, MDIO side> 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: <PCI bus> on pcib0
> pci0: <network> at device 0.0 (no driver attached)
> arge0: <Atheros AR71xx built-in ethernet interface> at mem
> 0x19000000-0x19000fff irq 2 on nexus0
> arge0: Overriding MAC from EEPROM
> miiproxy0: <MII/MDIO proxy, MII side> on arge0
> miiproxy0: attached to target mdio1
> arge0: finishing attachment, phymask 0010, proxy set
> miibus4: <MII bus> on miiproxy0
> ukphy4: <Generic IEEE 802.3u media interface> 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: <Atheros AR71xx built-in ethernet interface> 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: <AR71XX SPI> at mem 0x1f000000-0x1f00000f on nexus0
> spibus0: <spibus bus> on spi0
> mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
> mx25l0: w25q64, sector 65536 bytes, 128 sectors
> ar71xx_wdog0: <Atheros AR71XX watchdog timer> 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: <Software, Yarrow> 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 at 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 at 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<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0
> mtu 1500
> options=80000<LINKSTATE>
> ether 12:00:00:18:3c:02
> media: Ethernet autoselect (100baseTX <full-duplex>)
> status: active
> arge1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
> ether 12:00:00:18:3c:03
> media: Ethernet 1000baseT <full-duplex>
> status: active
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
> options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
> inet 127.0.0.1 netmask 0xff000000
> bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
> ifmaxaddr 0 port 5 priority 128 path cost 200000
> #
> _______________________________________________
> freebsd-embedded at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> To unsubscribe, send any mail to "freebsd-embedded-unsubscribe at freebsd.org
> "
>
More information about the freebsd-embedded
mailing list