From owner-freebsd-embedded@FreeBSD.ORG Sun Jul 28 18:51:12 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0A9B330D; Sun, 28 Jul 2013 18:51:12 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-x236.google.com (mail-ee0-x236.google.com [IPv6:2a00:1450:4013:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5796725C0; Sun, 28 Jul 2013 18:51:11 +0000 (UTC) Received: by mail-ee0-f54.google.com with SMTP id t10so2515351eei.13 for ; Sun, 28 Jul 2013 11:51:09 -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 :cc:content-type; bh=BtcuD9C0T7oQAlZckzN6iHcBVv9dB9Vms9OLl4EcUag=; b=1D+AKKwUy1SHYaV01Zy9QD9PVtd2P2Lfr/TRJ945SkkK209nt+LmyH0g82gu9t/cki iabIoCHUGVo/fKeNvVIY/EC9lYVzPoPi6QjSAGTiOUa1/Iju8IlfIlbCDqpBERGK2BRO bANIUr9ZlhCGHJAPE1Xy++GT2TyHwLqGEAJBaZdlrRy8FgNozEW781vJVdr+IFCdV9H6 0Llaw4bmxJlQvCdwX5s/fczwHlUPBUxJaEwNZf+409dmMWRE3ydkUNwlfcVCu4Uw5wS/ bc+Q7QhQuwemuolBgmOtsSMe2EW3qSe0aa2xmjCN9C2Ooq8MLB6/DFKsq6YuR1gpbjU+ Fdww== MIME-Version: 1.0 X-Received: by 10.14.221.198 with SMTP id r46mr2786358eep.18.1375037469466; Sun, 28 Jul 2013 11:51:09 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Sun, 28 Jul 2013 11:51:09 -0700 (PDT) In-Reply-To: References: Date: Sun, 28 Jul 2013 11:51:09 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: freebsd-embedded 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: Sun, 28 Jul 2013 18:51:12 -0000 On Fri, Jul 19, 2013 at 12:41 PM, Adrian Chadd wrote: > So here's the fun bit: > > mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),5760k(rootfs),256k(cfg),64k(EEPROM) > > Now, strictly speaking, you don't _have_ to obey the kernel/rootfs > split. But the default 'boot' line executes a boot image from the > offset in flash where 'kernel' is. > > What I tend to do, if I can: > > * leave uboot and uboot-env where they are > * kernel is the first partition, good, so start it there but make it > 1.5mb so you have a chance in hell of fitting an lzma'ed uboot kernel > image in there > * you don't need a 256kb cfg partition, only 64k > * the last 64k (EEPROM) _MUST NEVER BE OVERWRITTEN_ as it contains the > calibration/config data for the wifi chip. > > So look at an existing hints file with the 'map' entries, and write up > a new set of map entries for the agreed flash layout. > > Once you've done that, post it here for sanity checking. Here is the hints file I am using: # mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(rootfs),256k(cfg),64k(EEPROM) hint.map.0.at="flash/spi0" hint.map.0.start=0x00000000 hint.map.0.end=0x00040000 # 256k u-boot hint.map.0.name="u-boot" hint.map.0.readonly=1 hint.map.1.at="flash/spi0" hint.map.1.start=0x00040000 hint.map.1.end=0x00050000 # 64k u-boot-env hint.map.1.name="u-boot-env" hint.map.1.readonly=1 hint.map.2.at="flash/spi0" hint.map.2.start=0x00050000 hint.map.2.end=0x00150000 # 1024k kernel hint.map.2.name="kernel" hint.map.2.readonly=1 hint.map.3.at="flash/spi0" hint.map.3.start=0x00150000 hint.map.3.end=0x006f0000 # 6528k rootfs hint.map.3.name="rootfs" hint.map.3.readonly=0 hint.map.4.at="flash/spi0" hint.map.4.start=0x006f0000 hint.map.4.end=0x00730000 # 256k config hint.map.4.name="config" hint.map.4.readonly=1 hint.map.5.at="flash/spi0" hint.map.5.start=0x00730000 hint.map.5.end=0x00740000 # 64k EEPROM hint.map.5.name="art" hint.map.5.readonly=1 > > (Then the next trick will be building a kernel and rootfs image that > will fit in those flash partitions.. then you write up a config file > for adrian's build scripts that enforce those size limits so you don't > generate overly large images, then we do a test erase/flash.) Kernel that is being generated is of 3.5M. Need to understand how to prepare complete image with your scripts. Thanks a lot, Hiren > > > > -adrian > > On 19 July 2013 11:13, hiren panchasara wrote: >> On Fri, Jul 19, 2013 at 12:02 AM, Adrian Chadd wrote: >>> Cool, so next is populating the MAP device fields in a kernel config >>> hints file with the relevant flash offsets. >>> >>> That way you can setup the rootfs right. >> alright!! >>> >>> What's 'printenv' from uboot show? >> ar7240> printenv >> bootdelay=1 >> baudrate=115200 >> ethaddr=00:15:6d:0d:00:00 >> mtdids=nor0=ar7240-nor0 >> partition=nor0,0 >> mtddevnum=0 >> mtddevname=u-boot >> filesize=10000 >> fileaddr=81000000 >> serverip=192.168.1.254 >> ethact=eth0 >> mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),5760k(rootfs),256k(cfg),64k(EEPROM) >> bootcmd=bootm 0x9f050000 >> bootargs=console=tty0 root=31:03 rootfstype=squashfs init=/init >> ipaddr=192.168.1.20 >> stdin=serial >> stdout=serial >> stderr=serial >> >> Environment size: 452/65532 bytes >> ar7240> >> >> Thanks for your help :-) >> >> cheers, >> Hiren >> >>> >>> >>> -adrian >>> >>> On 17 July 2013 16:54, hiren panchasara wrote: >>>> On Tue, Jul 16, 2013 at 6:48 AM, Luiz Otavio O Souza wrote: >>>>> On 16 July 2013 00:52, Adrian Chadd wrote: >>>>>> >>>>>> Right, >>>>>> >>>>>> you have to get the mdio bus configured up right, then attach arswitch to >>>>>> it. >>>>>> >>>>>> Then you tell arge0/arge1 what PHY it speaks to, via Stefan's mdioproxy >>>>>> stuff. >>>>>> >>>>>> _then_ arge0/arge1 will come up. >>>>>> >>>>>> Now, as for how you do that - i'd have to re-read the datasheet and >>>>>> write some documentation: >>>>>> >>>>>> * one of them (I think arge0) is directly glued to arswitch with no >>>>>> PHY per se - it's hard-programmed with a MIIbus mode (RMGII I think?) >>>>>> and 100/full or 1000/full >>>>> >>>>> >>>>> It's usually the arge1 which is dedicated to switch and it's hard-programmed >>>>> as 1000/full (even when the switch ports are just 10/100). >>>>> >>>>> arge0 is the 'WAN' port (using the dedicated PHY 4). >>>>> >>>>> The MDIO is at arge0 on ar7240 and at arge1 on ar7241. >>>>> >>>>> [...] >>>>>> >>>>>> >>>>>> I'll follow this up with a post explaining how the miibus, mdiobus, >>>>>> mdioproxy stuff and how arswitch is configured. Then I'll braindump >>>>>> that into the wiki. >>>>> >>>>> >>>>> Thanks Adrian! >>>>> >>>>> Stefan also has a nice documentation about how this stuff fits together: >>>>> >>>>> https://wiki.freebsd.org/StefanBethke/EtherSwitch >>>>> http://www.bsdcan.org/2012/schedule/attachments/201_BSDCan-2012-Bethke-Ethernet-Switch-Framework.pdf >>>>> >>>> >>>> Thanks a lot Adrian and Luiz for the explanation. >>>> >>>> I've built just the kernel with in-tree (-head) kernconf AP91 and >>>> hints file from Luiz: http://pastebin.com/Z647yiZh >>>> >>>> And I am seeing arge0/1 attaching: >>>> >>>> ar7240> go 80050100 >>>> ## Starting application at 0x80050100 ... >>>> 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 = 00000001 >>>> a1 = 81f4fcbc >>>> a2 = 00000010 >>>> a3 = fffffffe >>>> 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 #1 r252757M: Wed Jul 17 16:45:15 PDT 2013 >>>> root@flymockour-l7.corp.yahoo.com:/usr/home/hirenp/head/obj/mips.mips/usr/home/hirenp/head/sys/AP91 >>>> mips >>>> gcc version 4.2.1 20070831 patched [FreeBSD] >>>> real memory = 16777216 (16384K bytes) >>>> avail memory = 11968512 (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: >>> controller> 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 >>>> mdio1: on arswitch0 >>>> mdioproxy1: on mdio1 >>>> etherswitch0: on arswitch0 >>>> 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: 8e:42:00:5c:3c:04 >>>> arge1: at mem >>>> 0x1a000000-0x1a000fff irq 3 on nexus0 >>>> arge1: finishing attachment, phymask 0000, proxy null >>>> arge1: Ethernet address: 8e:42:00:5c:3c:05 >>>> 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 >>>> 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 From owner-freebsd-embedded@FreeBSD.ORG Mon Jul 29 03:09:49 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1B581DB0 for ; Mon, 29 Jul 2013 03:09:49 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D49D27D9 for ; Mon, 29 Jul 2013 03:09:48 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id hi8so595195wib.9 for ; Sun, 28 Jul 2013 20:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=mXJFIoUvTK3ZPLWnt6X1YCiNzhTRP3t+mmf1nmE+Kxc=; b=ynnLkW+446kYmdr3Sj3aOIp9obTP+mYWkBzygWk+2ylPzXHaL6xcBHYY5J0GLMDne2 IuMjjXSGntgx7e/I5g+/KxazX5a+eQIl3N9sr6lfURSXPhkS7kyc+q8Ih2s/hlf6F4tQ dXQH9fV1/3aLhsSeiedncEIqhvCpBeg4lK3+9CwpibvUnBS7ecMIURWpeD7knMzRItb7 jIszlfO1+4U1hIbSMl5UqbGiyTaS1ICbKcoZxCR0WvnIBUJUeGHXYyNx9Djj34qgCjoP 2eOHcsw+10Rf60ny3GkXsJhb4nuF+el3eYmqnC08IoQVdt7tNHOFsd5rejRbr527A8fC 1Ptw== MIME-Version: 1.0 X-Received: by 10.194.11.72 with SMTP id o8mr42400579wjb.0.1375067386335; Sun, 28 Jul 2013 20:09:46 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Sun, 28 Jul 2013 20:09:46 -0700 (PDT) In-Reply-To: References: Date: Sun, 28 Jul 2013 20:09:46 -0700 X-Google-Sender-Auth: Vss7LuGFt2M3FOxSPOYdFNZocuk Message-ID: Subject: Re: Making Picostation m2HP work From: Adrian Chadd To: hiren panchasara Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded 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: Mon, 29 Jul 2013 03:09:49 -0000 Well, if it's a ubiquiti unit, they have a firmware format (which I include the tool for in my build scripts) that you can use to generate an image. Look at the build_ubnt script. -adrian From owner-freebsd-embedded@FreeBSD.ORG Mon Jul 29 11:06:42 2013 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A6EC8186 for ; Mon, 29 Jul 2013 11:06:42 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93DDF2DC9 for ; Mon, 29 Jul 2013 11:06:42 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TB6g0j061719 for ; Mon, 29 Jul 2013 11:06:42 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6TB6goX061717 for freebsd-embedded@FreeBSD.org; Mon, 29 Jul 2013 11:06:42 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 29 Jul 2013 11:06:42 GMT Message-Id: <201307291106.r6TB6goX061717@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-embedded@FreeBSD.org Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org 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: Mon, 29 Jul 2013 11:06:42 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/177878 embedded [rtl8366rb] [patch] Update rtl8366rb switch driver to o bin/177873 embedded [patch] etherswitchcfg(): Change the per port vlangrou o bin/177872 embedded [patch] etherswitchcfg(8) crashes if called with no ar o bin/177871 embedded [patch] etherswitchcfg(8): uninitialized variable whil o kern/172968 embedded [arge] probe/attach occasionally fails to find a PHY o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c 7 problems total. From owner-freebsd-embedded@FreeBSD.ORG Mon Jul 29 12:19:27 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 54DB73BA; Mon, 29 Jul 2013 12:19:27 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 5F22A2333; Mon, 29 Jul 2013 12:19:26 +0000 (UTC) Received: from terran (unknown [192.168.99.1]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 484A6C4927; Mon, 29 Jul 2013 15:19:25 +0300 (EEST) Date: Mon, 29 Jul 2013 15:19:43 +0300 From: Aleksandr Rybalko To: hiren panchasara Subject: Re: Making Picostation m2HP work Message-Id: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> In-Reply-To: References: X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-embedded 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: Mon, 29 Jul 2013 12:19:27 -0000 On Sun, 28 Jul 2013 11:51:09 -0700 hiren panchasara wrote: > On Fri, Jul 19, 2013 at 12:41 PM, Adrian Chadd wrote: > > So here's the fun bit: > > > > mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),5760k(rootfs),256k(cfg),64k(EEPROM) > > > > Now, strictly speaking, you don't _have_ to obey the kernel/rootfs > > split. But the default 'boot' line executes a boot image from the > > offset in flash where 'kernel' is. > > > > What I tend to do, if I can: > > > > * leave uboot and uboot-env where they are > > * kernel is the first partition, good, so start it there but make it > > 1.5mb so you have a chance in hell of fitting an lzma'ed uboot kernel > > image in there > > * you don't need a 256kb cfg partition, only 64k > > * the last 64k (EEPROM) _MUST NEVER BE OVERWRITTEN_ as it contains the > > calibration/config data for the wifi chip. > > > > So look at an existing hints file with the 'map' entries, and write up > > a new set of map entries for the agreed flash layout. > > > > Once you've done that, post it here for sanity checking. > Here is the hints file I am using: > > # mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(rootfs),256k(cfg),64k(EEPROM) > > hint.map.0.at="flash/spi0" > hint.map.0.start=0x00000000 > hint.map.0.end=0x00040000 # 256k u-boot > hint.map.0.name="u-boot" > hint.map.0.readonly=1 > > hint.map.1.at="flash/spi0" > hint.map.1.start=0x00040000 > hint.map.1.end=0x00050000 # 64k u-boot-env > hint.map.1.name="u-boot-env" > hint.map.1.readonly=1 > > hint.map.2.at="flash/spi0" > hint.map.2.start=0x00050000 > hint.map.2.end=0x00150000 # 1024k kernel > hint.map.2.name="kernel" > hint.map.2.readonly=1 > > hint.map.3.at="flash/spi0" > hint.map.3.start=0x00150000 > hint.map.3.end=0x006f0000 # 6528k rootfs > hint.map.3.name="rootfs" > hint.map.3.readonly=0 > > hint.map.4.at="flash/spi0" > hint.map.4.start=0x006f0000 > hint.map.4.end=0x00730000 # 256k config > hint.map.4.name="config" > hint.map.4.readonly=1 > > hint.map.5.at="flash/spi0" > hint.map.5.start=0x00730000 > hint.map.5.end=0x00740000 # 64k EEPROM > hint.map.5.name="art" > hint.map.5.readonly=1 Looks like you have mistake somewhere. Sum of mtd sizes give us 8M, but last block you define end on 0x00740000, but must be 0x00800000 # 256k(u-boot) start=0x00000000 end=0x00040000 # 64k(u-boot-env) start=0x00040000 end=0x00050000 # 1024k(kernel) start=0x00050000 end=0x00150000 # 6528k(rootfs) start=0x00150000 end=0x007b0000 # 256k(cfg) start=0x007b0000 end=0x007f0000 # 64k(EEPROM) start=0x007f0000 end=0x00800000 Also, to not depend on kernel size limit you can back kernel and rootfs into single image, but align rootfs offset to block size (64k here) Than you will be able to replace kernel.end and rootfs.start with "search" value: hint.map.2.end="search:0x00100000:0x10000:.!/bin/sh" hint.map.3.start="search:0x00100000:0x10000:.!/bin/sh" In that case geom_map will search for ".!/bin/sh" ("." is single-char wildcard) starting at offset 0x00100000 (1MB) with 0x10000 (64k) step til end of media. kernel must be packed, but format depend on what is supported by loader. uboot can be compiled with gzip, bzip2 and lzma support, but every compressor is optional. If everything too bad with loader uncompressor, you can use un-gzip support in out trampoline. Maybe even extend it with embedded lzma which already in sys/contrib. > > > > (Then the next trick will be building a kernel and rootfs image that > > will fit in those flash partitions.. then you write up a config file > > for adrian's build scripts that enforce those size limits so you don't > > generate overly large images, then we do a test erase/flash.) > > Kernel that is being generated is of 3.5M. Need to understand how to > prepare complete image with your scripts. > > Thanks a lot, > Hiren > > > > > > > > -adrian > > > > On 19 July 2013 11:13, hiren panchasara wrote: > >> On Fri, Jul 19, 2013 at 12:02 AM, Adrian Chadd wrote: > >>> Cool, so next is populating the MAP device fields in a kernel config > >>> hints file with the relevant flash offsets. > >>> > >>> That way you can setup the rootfs right. > >> alright!! > >>> > >>> What's 'printenv' from uboot show? > >> ar7240> printenv > >> bootdelay=1 > >> baudrate=115200 > >> ethaddr=00:15:6d:0d:00:00 > >> mtdids=nor0=ar7240-nor0 > >> partition=nor0,0 > >> mtddevnum=0 > >> mtddevname=u-boot > >> filesize=10000 > >> fileaddr=81000000 > >> serverip=192.168.1.254 > >> ethact=eth0 > >> mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),5760k(rootfs),256k(cfg),64k(EEPROM) > >> bootcmd=bootm 0x9f050000 > >> bootargs=console=tty0 root=31:03 rootfstype=squashfs init=/init > >> ipaddr=192.168.1.20 > >> stdin=serial > >> stdout=serial > >> stderr=serial > >> > >> Environment size: 452/65532 bytes > >> ar7240> > >> > >> Thanks for your help :-) > >> > >> cheers, > >> Hiren > >> > >>> > >>> > >>> -adrian > >>> > >>> On 17 July 2013 16:54, hiren panchasara wrote: > >>>> On Tue, Jul 16, 2013 at 6:48 AM, Luiz Otavio O Souza wrote: > >>>>> On 16 July 2013 00:52, Adrian Chadd wrote: > >>>>>> > >>>>>> Right, > >>>>>> > >>>>>> you have to get the mdio bus configured up right, then attach arswitch to > >>>>>> it. > >>>>>> > >>>>>> Then you tell arge0/arge1 what PHY it speaks to, via Stefan's mdioproxy > >>>>>> stuff. > >>>>>> > >>>>>> _then_ arge0/arge1 will come up. > >>>>>> > >>>>>> Now, as for how you do that - i'd have to re-read the datasheet and > >>>>>> write some documentation: > >>>>>> > >>>>>> * one of them (I think arge0) is directly glued to arswitch with no > >>>>>> PHY per se - it's hard-programmed with a MIIbus mode (RMGII I think?) > >>>>>> and 100/full or 1000/full > >>>>> > >>>>> > >>>>> It's usually the arge1 which is dedicated to switch and it's hard-programmed > >>>>> as 1000/full (even when the switch ports are just 10/100). > >>>>> > >>>>> arge0 is the 'WAN' port (using the dedicated PHY 4). > >>>>> > >>>>> The MDIO is at arge0 on ar7240 and at arge1 on ar7241. > >>>>> > >>>>> [...] > >>>>>> > >>>>>> > >>>>>> I'll follow this up with a post explaining how the miibus, mdiobus, > >>>>>> mdioproxy stuff and how arswitch is configured. Then I'll braindump > >>>>>> that into the wiki. > >>>>> > >>>>> > >>>>> Thanks Adrian! > >>>>> > >>>>> Stefan also has a nice documentation about how this stuff fits together: > >>>>> > >>>>> https://wiki.freebsd.org/StefanBethke/EtherSwitch > >>>>> http://www.bsdcan.org/2012/schedule/attachments/201_BSDCan-2012-Bethke-Ethernet-Switch-Framework.pdf > >>>>> > >>>> > >>>> Thanks a lot Adrian and Luiz for the explanation. > >>>> > >>>> I've built just the kernel with in-tree (-head) kernconf AP91 and > >>>> hints file from Luiz: http://pastebin.com/Z647yiZh > >>>> > >>>> And I am seeing arge0/1 attaching: > >>>> > >>>> ar7240> go 80050100 > >>>> ## Starting application at 0x80050100 ... > >>>> 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 = 00000001 > >>>> a1 = 81f4fcbc > >>>> a2 = 00000010 > >>>> a3 = fffffffe > >>>> 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 #1 r252757M: Wed Jul 17 16:45:15 PDT 2013 > >>>> root@flymockour-l7.corp.yahoo.com:/usr/home/hirenp/head/obj/mips.mips/usr/home/hirenp/head/sys/AP91 > >>>> mips > >>>> gcc version 4.2.1 20070831 patched [FreeBSD] > >>>> real memory = 16777216 (16384K bytes) > >>>> avail memory = 11968512 (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: >>>> controller> 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 > >>>> mdio1: on arswitch0 > >>>> mdioproxy1: on mdio1 > >>>> etherswitch0: on arswitch0 > >>>> 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: 8e:42:00:5c:3c:04 > >>>> arge1: at mem > >>>> 0x1a000000-0x1a000fff irq 3 on nexus0 > >>>> arge1: finishing attachment, phymask 0000, proxy null > >>>> arge1: Ethernet address: 8e:42:00:5c:3c:05 > >>>> 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 > >>>> 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 > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org" Good luck! WBW -- Aleksandr Rybalko From owner-freebsd-embedded@FreeBSD.ORG Mon Jul 29 17:49:04 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 983D0BBA; Mon, 29 Jul 2013 17:49:04 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-x22e.google.com (mail-ee0-x22e.google.com [IPv6:2a00:1450:4013:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4F6A2540; Mon, 29 Jul 2013 17:49:03 +0000 (UTC) Received: by mail-ee0-f46.google.com with SMTP id c13so498363eek.5 for ; Mon, 29 Jul 2013 10:49:02 -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 :cc:content-type; bh=moBpmPuT2qvMn0lgaUS/trAIISbvM7oAuEcrrwpdxa4=; b=ojAJ4WRRHp+CXfwQfmyWbyC5LopNZyu85x1o6cgNLtejU/I/lPjG1Cfjegd73PTFEm XyMubtGgvIUDBWQ0pitD2euJIJY6X6kxrHb5E3LGxLP05cMoDXC3/U8Jbp3Jk3v/zQ56 yHefQ2sYDYqIawFYhMuK2Kj/Hev3XtxCNgH+qCj8J2NwE5OQagLhA4uJDICAOUhC9i08 6GfN0YYm4dXivEdhnAfOpc5oDWPKAwhgXgIHswlb07Mz7PQ0vMnZfndfv4CjvAnbzzRh gJKSPp7WR9e+HRburd+gC/0p/1saMncYlEg+y6jcCFtZ1rFXPsUB3cv33MRJFprwGvkK HD6w== MIME-Version: 1.0 X-Received: by 10.15.42.72 with SMTP id t48mr60680883eev.105.1375120142260; Mon, 29 Jul 2013 10:49:02 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Mon, 29 Jul 2013 10:49:02 -0700 (PDT) In-Reply-To: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> Date: Mon, 29 Jul 2013 10:49:02 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Aleksandr Rybalko , Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: freebsd-embedded 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: Mon, 29 Jul 2013 17:49:04 -0000 On Mon, Jul 29, 2013 at 5:19 AM, Aleksandr Rybalko wrote: > On Sun, 28 Jul 2013 11:51:09 -0700 > hiren panchasara wrote: > >> On Fri, Jul 19, 2013 at 12:41 PM, Adrian Chadd wrote: >> > So here's the fun bit: >> > >> > mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),5760k(rootfs),256k(cfg),64k(EEPROM) >> > >> > Now, strictly speaking, you don't _have_ to obey the kernel/rootfs >> > split. But the default 'boot' line executes a boot image from the >> > offset in flash where 'kernel' is. >> > >> > What I tend to do, if I can: >> > >> > * leave uboot and uboot-env where they are >> > * kernel is the first partition, good, so start it there but make it >> > 1.5mb so you have a chance in hell of fitting an lzma'ed uboot kernel >> > image in there >> > * you don't need a 256kb cfg partition, only 64k >> > * the last 64k (EEPROM) _MUST NEVER BE OVERWRITTEN_ as it contains the >> > calibration/config data for the wifi chip. >> > >> > So look at an existing hints file with the 'map' entries, and write up >> > a new set of map entries for the agreed flash layout. >> > >> > Once you've done that, post it here for sanity checking. >> Here is the hints file I am using: >> >> # mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(rootfs),256k(cfg),64k(EEPROM) >> >> hint.map.0.at="flash/spi0" >> hint.map.0.start=0x00000000 >> hint.map.0.end=0x00040000 # 256k u-boot >> hint.map.0.name="u-boot" >> hint.map.0.readonly=1 >> >> hint.map.1.at="flash/spi0" >> hint.map.1.start=0x00040000 >> hint.map.1.end=0x00050000 # 64k u-boot-env >> hint.map.1.name="u-boot-env" >> hint.map.1.readonly=1 >> >> hint.map.2.at="flash/spi0" >> hint.map.2.start=0x00050000 >> hint.map.2.end=0x00150000 # 1024k kernel >> hint.map.2.name="kernel" >> hint.map.2.readonly=1 >> >> hint.map.3.at="flash/spi0" >> hint.map.3.start=0x00150000 >> hint.map.3.end=0x006f0000 # 6528k rootfs >> hint.map.3.name="rootfs" >> hint.map.3.readonly=0 >> >> hint.map.4.at="flash/spi0" >> hint.map.4.start=0x006f0000 >> hint.map.4.end=0x00730000 # 256k config >> hint.map.4.name="config" >> hint.map.4.readonly=1 >> >> hint.map.5.at="flash/spi0" >> hint.map.5.start=0x00730000 >> hint.map.5.end=0x00740000 # 64k EEPROM >> hint.map.5.name="art" >> hint.map.5.readonly=1 > > Looks like you have mistake somewhere. Sum of mtd sizes give us 8M, but > last block you define end on 0x00740000, but must be 0x00800000 Thanks for catching that. I've updated that. > > # 256k(u-boot) > start=0x00000000 > end=0x00040000 > # 64k(u-boot-env) > start=0x00040000 > end=0x00050000 > # 1024k(kernel) > start=0x00050000 > end=0x00150000 > # 6528k(rootfs) > start=0x00150000 > end=0x007b0000 > # 256k(cfg) > start=0x007b0000 > end=0x007f0000 > # 64k(EEPROM) > start=0x007f0000 > end=0x00800000 > > Also, to not depend on kernel size limit you can back kernel and rootfs > into single image, but align rootfs offset to block size (64k here) > Than you will be able to replace kernel.end and rootfs.start with > "search" value: > hint.map.2.end="search:0x00100000:0x10000:.!/bin/sh" > hint.map.3.start="search:0x00100000:0x10000:.!/bin/sh" > > In that case geom_map will search for ".!/bin/sh" ("." is single-char > wildcard) starting at offset 0x00100000 (1MB) with 0x10000 (64k) step > til end of media. > > kernel must be packed, but format depend on what is supported by loader. > uboot can be compiled with gzip, bzip2 and lzma support, but every > compressor is optional. > > If everything too bad with loader uncompressor, you can use un-gzip > support in out trampoline. Maybe even extend it with embedded lzma which > already in sys/contrib. I am not completely following you here (as I do not understand very many things :-)) But currently I am trying to use adrian's scripts to generate image. I have following things: 1) AP91.initial.img - filesystem img 6.2M (generated by ubnt-mkfwimage/mkfwimage.c) 2) mfsroot-ap91.img.ulzma - mfsroot img 4.8M 3) kernel.AP91 - the kernel 3.5M Where/how should I load these files? Thanks, Hiren > >> > >> > (Then the next trick will be building a kernel and rootfs image that >> > will fit in those flash partitions.. then you write up a config file >> > for adrian's build scripts that enforce those size limits so you don't >> > generate overly large images, then we do a test erase/flash.) >> >> Kernel that is being generated is of 3.5M. Need to understand how to >> prepare complete image with your scripts. >> >> Thanks a lot, >> Hiren From owner-freebsd-embedded@FreeBSD.ORG Mon Jul 29 18:52:12 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 02B352E3; Mon, 29 Jul 2013 18:52:12 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-x234.google.com (mail-ee0-x234.google.com [IPv6:2a00:1450:4013:c00::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B5642886; Mon, 29 Jul 2013 18:52:11 +0000 (UTC) Received: by mail-ee0-f52.google.com with SMTP id c41so2348012eek.39 for ; Mon, 29 Jul 2013 11:52:09 -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 :cc:content-type; bh=ZM6TxqQ/PkKUWw7qcv5ICDSR+gPGVplBEzoWFcZo6rY=; b=A1b6NMmAmadVY5WyoHKtVV9yVgnZsn1R1+zHrcRnqpclc5lWgVcxU8DAqT6CNvVB17 2uOMxXJH8JYoaSwmVAnw+TU+1AJZVA/OjeSAQ09+2nzrvasHCQhA1JCuN99HU6FmROFC oWmidthqHMJ7xB+p7C/Sdk/jLrZUkvCxJBt30zaSXG5SYT82bFiMmjpQKLdH0lcd9sui SdYw+NW60cJpcqhoW9rrnOgNeaKGYsui7CtlMZzgCBhksj3iPX2Jul/ik/8cd6vuG12Q ahibUMIug8bp1RDx4yKtbzcnjEyDob+8zNpTvg+bae4znjfXcTFhl8vL+smAz3LFBmGL D1EA== MIME-Version: 1.0 X-Received: by 10.15.74.199 with SMTP id j47mr8883301eey.154.1375123929565; Mon, 29 Jul 2013 11:52:09 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Mon, 29 Jul 2013 11:52:09 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> Date: Mon, 29 Jul 2013 11:52:09 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Aleksandr Rybalko , Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: freebsd-embedded 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: Mon, 29 Jul 2013 18:52:12 -0000 On Mon, Jul 29, 2013 at 10:49 AM, hiren panchasara wrote: > I have following things: > 1) AP91.initial.img - filesystem img 6.2M (generated by > ubnt-mkfwimage/mkfwimage.c) > 2) mfsroot-ap91.img.ulzma - mfsroot img 4.8M > 3) kernel.AP91 - the kernel 3.5M > > Where/how should I load these files? As adrian suggested I reset the board (by holding the reset key) and the put board into "urescue" mode which then starts tftp server and waits for you to transfer the firmware image. I connected to the board from my laptop via "tftp 192.168.1.20" and transferred the image but on the board, it failed with following error: "Firmware check failed! (-2)" Any clue what could be wrong here? Thanks, Hiren > > Thanks, > Hiren From owner-freebsd-embedded@FreeBSD.ORG Tue Jul 30 10:40:40 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 42AEF122 for ; Tue, 30 Jul 2013 10:40:40 +0000 (UTC) (envelope-from milu@dat.pl) Received: from jab.dat.pl (dat.pl [80.51.155.34]) by mx1.freebsd.org (Postfix) with ESMTP id EC3F025FC for ; Tue, 30 Jul 2013 10:40:39 +0000 (UTC) Received: from jab.dat.pl (jsrv.dat.pl [127.0.0.1]) by jab.dat.pl (Postfix) with ESMTP id 4DC589E; Tue, 30 Jul 2013 12:40:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at dat.pl Received: from jab.dat.pl ([127.0.0.1]) by jab.dat.pl (jab.dat.pl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QXOkzGaDybKq; Tue, 30 Jul 2013 12:40:31 +0200 (CEST) Received: from [10.0.6.80] (unknown [212.69.68.42]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by jab.dat.pl (Postfix) with ESMTPSA id 1EEE55F; Tue, 30 Jul 2013 12:40:31 +0200 (CEST) Message-ID: <51F7983C.5090309@dat.pl> Date: Tue, 30 Jul 2013 12:41:00 +0200 From: Maciej Milewski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: hiren panchasara Subject: Re: Making Picostation m2HP work References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-embedded 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, 30 Jul 2013 10:40:40 -0000 On 29.07.2013 20:52, hiren panchasara wrote: > Firmware check failed! AFAIR I had such info when I tried to flash image from RouterStation Pro to Routerstation. I think that it must be something with firmware header or firmware format. -- Pozdrawiam, Maciej Milewski From owner-freebsd-embedded@FreeBSD.ORG Tue Jul 30 11:29:44 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4E1A824C for ; Tue, 30 Jul 2013 11:29:44 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-oa0-x229.google.com (mail-oa0-x229.google.com [IPv6:2607:f8b0:4003:c02::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FD882AAD for ; Tue, 30 Jul 2013 11:29:44 +0000 (UTC) Received: by mail-oa0-f41.google.com with SMTP id j6so6327862oag.14 for ; Tue, 30 Jul 2013 04:29:43 -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 :cc:content-type; bh=gdfGMf3GhO5TR7Tg5owSZ7qNDhJCB3+ksb9aA9Vdx88=; b=kKPZABhtTgaBStn8AFjakPPMdl409n5OlW26uAi9wRl9F2m9/ojdbgJ0cgardBiiJE X+oeJotnkqkT1bZegDvqqK54r8KAJ1XfgfAeluvJGkSAsQ5XQkr6hGypVDAT5OPenB+x +fjBAd3UVYgNEpwt821Rqs4VymB6TJ++mhQb16ZTLqvVeqQNi9wbqmOkivMEgMdgI78g EC/J68YQCw8kvcnDYXdr7wfDA8NiTbI2+DFb8pw0ncLLqwrrwBpnXbtA/0d9PAPEourm k3sBqPgPI+rNUwg6MYfcvogSTcXFAnvNN30n9Rzidac1dSBB8pfqLjmu21WfYGk3Q8IR yRcA== MIME-Version: 1.0 X-Received: by 10.60.102.238 with SMTP id fr14mr3039973oeb.95.1375183783362; Tue, 30 Jul 2013 04:29:43 -0700 (PDT) Received: by 10.76.90.197 with HTTP; Tue, 30 Jul 2013 04:29:42 -0700 (PDT) In-Reply-To: <51F7983C.5090309@dat.pl> References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Tue, 30 Jul 2013 07:29:42 -0400 Message-ID: Subject: Re: Making Picostation m2HP work From: Outback Dingo To: Maciej Milewski Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded 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, 30 Jul 2013 11:29:44 -0000 On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski wrote: > On 29.07.2013 20:52, hiren panchasara wrote: > >> Firmware check failed! >> > AFAIR I had such info when I tried to flash image from RouterStation Pro > to Routerstation. I think that it must be something with firmware header or > firmware format. > > I believe its the headers, there is something different about the 2HP that required padding, im digging through data from 4 years ago to find it from when we deployed a ton of these based on OpenWRT, they are different then all others, same with the RS/RSPRO, its possible it was different offsets so that the mkfirmware image had to be modified to build the correct image > -- > Pozdrawiam, > Maciej Milewski > > > ______________________________**_________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/**mailman/listinfo/freebsd-**embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@** > freebsd.org " > From owner-freebsd-embedded@FreeBSD.ORG Tue Jul 30 14:02:50 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 2CDDF9E6 for ; Tue, 30 Jul 2013 14:02:50 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-oa0-x22d.google.com (mail-oa0-x22d.google.com [IPv6:2607:f8b0:4003:c02::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E0EB8259A for ; Tue, 30 Jul 2013 14:02:49 +0000 (UTC) Received: by mail-oa0-f45.google.com with SMTP id m1so6050656oag.32 for ; Tue, 30 Jul 2013 07:02:49 -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 :cc:content-type; bh=ztstTblEynTLwfIb9IwSu6Rpc0PFrdewnnLR02828bY=; b=b1HGO3XY9icoedbFs5kXL47lDaXJTLkpVKMWLHgf5YY3U7Nv31DL7VkkNsbT8ycTKS U1pQgRrtW8uaD0N2lDQMAUDlchcOQI/3eVBbjaRZA2MO8qvSE00wZlj/yVa/fd0tNvLw YSUS0vFZ0Ha0zGgDOSvRisCBU99qCmhttHys6UcZA4g9DPm+QUzHRGPd/pVOoRrZScM7 kUSLim1p+lHyVf2URhbRFW9iMeJPTmUZ5cPCuSigmuUCeciKi5R2KmGJXL0eea868gAL KmibKXuktGPrEUPGbHvjXXny0bgcMs+bBpz7NPgiNXC4/dLDwv9KngAB/Udz2OIdG1Cb RK+g== MIME-Version: 1.0 X-Received: by 10.182.50.200 with SMTP id e8mr57709428obo.35.1375192969247; Tue, 30 Jul 2013 07:02:49 -0700 (PDT) Received: by 10.76.90.197 with HTTP; Tue, 30 Jul 2013 07:02:49 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Tue, 30 Jul 2013 10:02:49 -0400 Message-ID: Subject: Re: Making Picostation m2HP work From: Outback Dingo To: Maciej Milewski Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded 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, 30 Jul 2013 14:02:50 -0000 On Tue, Jul 30, 2013 at 7:29 AM, Outback Dingo wrote: > > > > On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski wrote: > >> On 29.07.2013 20:52, hiren panchasara wrote: >> >>> Firmware check failed! >>> >> AFAIR I had such info when I tried to flash image from RouterStation Pro >> to Routerstation. I think that it must be something with firmware header or >> firmware format. >> >> I believe its the headers, there is something different about the 2HP > that required padding, im digging through data from 4 years ago to find it > from when we deployed a ton of these based on OpenWRT, they are different > then all others, same with the RS/RSPRO, > > Warning, my brain is dealing with 4 year old information again, YMMV..... but maybe some insight will help... I could be offbase, Adrian would know best what his mkfwimage supports. its possible it was different offsets so that the mkfirmware image had to be modified to build the correct image, the image you are building requires XS2-8 to be correct, I believe the ap91 image is using XS2 and not XS2-8 ....... Adrian again will have to validate AP91 configuration for XS2-8, or create a config that uses it. Okay digging back through this a bit in the UBNT SDK, Yes I still have one..... it shows -$(STAGING_DIR_HOST)/bin/mkfwimage \ -B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \ -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \ -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \ -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin and XS2-8 is for PicosStations built with mkfwimage -i XS2-8.txt -v XS2.ar2316.OpenWRT-kamikaze -o openwrt-picostation2-squashfs.bin which required a file called XS2-8.txt kernel 0x01 0xA8030000 0x000D0000 0x80041000 0x80041000 openwrt-vmlinux.lzma rootfs 0x02 0xA8100000 0x006C0000 0x00000000 0x00000000 .openwrt-vmlinux.squashfs > -- >> Pozdrawiam, >> Maciej Milewski >> >> >> ______________________________**_________________ >> freebsd-embedded@freebsd.org mailing list >> http://lists.freebsd.org/**mailman/listinfo/freebsd-**embedded >> To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@** >> freebsd.org " >> > > From owner-freebsd-embedded@FreeBSD.ORG Tue Jul 30 16:57:07 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 496A4F42 for ; Tue, 30 Jul 2013 16:57:07 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x229.google.com (mail-ea0-x229.google.com [IPv6:2a00:1450:4013:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB0092F7D for ; Tue, 30 Jul 2013 16:57:06 +0000 (UTC) Received: by mail-ea0-f169.google.com with SMTP id z7so1520662eaf.0 for ; Tue, 30 Jul 2013 09:57:05 -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 :cc:content-type; bh=G+zkReDZqP0049YdpA+xJSNmdG4LynDWRDO91yNxw9U=; b=I7pH8F1RESYA9hCNvS9TZhmqfkfBIGs125ElzKvA+ApLO7XEsGH/GGnSN7A/7VD7Cw mVmTF96VRX3K5nzYH6P31im+ptzwaiC2EFqfVKwfzJuefCygqFGCQVL36Ij13bRix/z4 5+drmS76+ENg4S7DgST0aCfHUy9S+8liMM9pyFvBd8EpHSkZz5212QfT4wSf+mqSFMXv /Y49PO125IOtfKAzQDEKzgD4TZiuGYL/7rT1Qi2zwZqN8DHnyvzY1T1WOXAXVMGKTvQ8 cYMCFz6OTPy2p9VJ+tiQYzjesKCDuw3NoT4Ih9iEozWQV5BQUpLhPxFpvXmJWX4+gW2Z /Cqg== MIME-Version: 1.0 X-Received: by 10.15.42.72 with SMTP id t48mr65227100eev.105.1375203425197; Tue, 30 Jul 2013 09:57:05 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Tue, 30 Jul 2013 09:57:05 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Tue, 30 Jul 2013 09:57:05 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Outback Dingo Content-Type: text/plain; charset=UTF-8 Cc: freebsd-embedded 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, 30 Jul 2013 16:57:07 -0000 On Tue, Jul 30, 2013 at 7:02 AM, Outback Dingo wrote: > > > > On Tue, Jul 30, 2013 at 7:29 AM, Outback Dingo > wrote: >> >> >> >> >> On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski wrote: >>> >>> On 29.07.2013 20:52, hiren panchasara wrote: >>>> >>>> Firmware check failed! >>> >>> AFAIR I had such info when I tried to flash image from RouterStation Pro >>> to Routerstation. I think that it must be something with firmware header or >>> firmware format. >>> >> I believe its the headers, there is something different about the 2HP that >> required padding, im digging through data from 4 years ago to find it >> from when we deployed a ton of these based on OpenWRT, they are different >> then all others, same with the RS/RSPRO, >> >> > > > Warning, my brain is dealing with 4 year old information again, YMMV..... > but maybe some insight will help... I could be offbase, > Adrian would know best what his mkfwimage supports. > > its possible it was different offsets so that the mkfirmware image had to be > modified to build the correct image, the image you are building requires > XS2-8 to be correct, I believe the ap91 image is using XS2 and not XS2-8 > ....... Adrian again will have to validate AP91 configuration for XS2-8, or > create a config that uses it. I _think_ the difference would be how the board has different things laid out and we can specify with the hints? > > > Okay digging back through this a bit in the UBNT SDK, Yes I still have > one..... it shows > -$(STAGING_DIR_HOST)/bin/mkfwimage \ > -B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \ > -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \ > -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \ > -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin > > > and XS2-8 is for PicosStations built with > mkfwimage -i XS2-8.txt -v XS2.ar2316.OpenWRT-kamikaze -o > openwrt-picostation2-squashfs.bin Yes, I found the same thing in openwrt build scripts. Now, I need to map this to how we are generating image in Adrian's scripts. > > > which required a file called XS2-8.txt > > kernel 0x01 0xA8030000 0x000D0000 0x80041000 > 0x80041000 openwrt-vmlinux.lzma > rootfs 0x02 0xA8100000 0x006C0000 0x00000000 > 0x00000000 .openwrt-vmlinux.squashfs Yes, I found this reference also as you are describing but this is part of the SDK and I could not find openwrt build scripts using this. mkfwimage in the SDK takes this file as an argument and does its job accordingly. Thanks a lot for your inputs, Hiren /me back to mkfwimage.c From owner-freebsd-embedded@FreeBSD.ORG Tue Jul 30 21:14:51 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 574E736F for ; Tue, 30 Jul 2013 21:14:51 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 179DF2B87 for ; Tue, 30 Jul 2013 21:14:51 +0000 (UTC) Received: by mail-ob0-f178.google.com with SMTP id ef5so5328533obb.23 for ; Tue, 30 Jul 2013 14:14:50 -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 :cc:content-type; bh=Y7xS/HsdkdxxH+W2clkhVb+/fGpWx+3l8Fca1f4mBCs=; b=ql6DaEggcR2XvRAviJS3vJZEaaBrFcgU4t/jyRCDuIjjmv0htYR/pMlfMXXsNmqR0C PTU2nnYWFFwJQ+uSYOxfANW5TlBqFKE8UVhEg+LMIzzeGSF94nBhyo3Awr+9t63zZJLR w7g1JtHIZwTtDDJmeCR247QDhQff2GONV+M+lFgNPW7t0XMC6ujNAu3PkA8FyyYJA8F9 F/ED71M3+zzmG5W7EpV3xxXbW+jYPARtoREmA9cOjvidpIYY7l9bOlRkrO0goESfCQEC GF0SayuSePrwb/3is9NLKocQj2V3GPEDVrIv/IIZvU2st1OlCF9501ULnOWvQEe9GIbg 8ahQ== MIME-Version: 1.0 X-Received: by 10.182.120.132 with SMTP id lc4mr58474944obb.22.1375218890394; Tue, 30 Jul 2013 14:14:50 -0700 (PDT) Received: by 10.76.90.197 with HTTP; Tue, 30 Jul 2013 14:14:50 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Tue, 30 Jul 2013 17:14:50 -0400 Message-ID: Subject: Re: Making Picostation m2HP work From: Outback Dingo To: hiren panchasara Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded 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, 30 Jul 2013 21:14:51 -0000 On Tue, Jul 30, 2013 at 12:57 PM, hiren panchasara < hiren.panchasara@gmail.com> wrote: > On Tue, Jul 30, 2013 at 7:02 AM, Outback Dingo > wrote: > > > > > > > > On Tue, Jul 30, 2013 at 7:29 AM, Outback Dingo > > wrote: > >> > >> > >> > >> > >> On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski wrote: > >>> > >>> On 29.07.2013 20:52, hiren panchasara wrote: > >>>> > >>>> Firmware check failed! > >>> > >>> AFAIR I had such info when I tried to flash image from RouterStation > Pro > >>> to Routerstation. I think that it must be something with firmware > header or > >>> firmware format. > >>> > >> I believe its the headers, there is something different about the 2HP > that > >> required padding, im digging through data from 4 years ago to find it > >> from when we deployed a ton of these based on OpenWRT, they are > different > >> then all others, same with the RS/RSPRO, > >> > >> > > > > > > Warning, my brain is dealing with 4 year old information again, YMMV..... > > but maybe some insight will help... I could be offbase, > > Adrian would know best what his mkfwimage supports. > > > > its possible it was different offsets so that the mkfirmware image had > to be > > modified to build the correct image, the image you are building requires > > XS2-8 to be correct, I believe the ap91 image is using XS2 and not XS2-8 > > ....... Adrian again will have to validate AP91 configuration for XS2-8, > or > > create a config that uses it. > I _think_ the difference would be how the board has different things > laid out and we can specify with the hints? > > > > > > Okay digging back through this a bit in the UBNT SDK, Yes I still have > > one..... it shows > > -$(STAGING_DIR_HOST)/bin/mkfwimage \ > > -B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \ > > -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \ > > -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \ > > -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin > > > > > > and XS2-8 is for PicosStations built with > > mkfwimage -i XS2-8.txt -v XS2.ar2316.OpenWRT-kamikaze -o > > openwrt-picostation2-squashfs.bin > > Yes, I found the same thing in openwrt build scripts. Now, I need to > map this to how we are generating image in Adrian's scripts. > > > > > > which required a file called XS2-8.txt > > > > kernel 0x01 0xA8030000 0x000D0000 0x80041000 > > 0x80041000 openwrt-vmlinux.lzma > > rootfs 0x02 0xA8100000 0x006C0000 0x00000000 > > 0x00000000 .openwrt-vmlinux.squashfs > > Yes, I found this reference also as you are describing but this is > part of the SDK and I could not find openwrt build scripts using this. > mkfwimage in the SDK takes this file as an argument and does its job > accordingly. > > Thanks a lot for your inputs, > I think Adrian would know best, according to his post, his ported version of ubnt-mkfwimage should support the XS2-8 > Hiren > > /me back to mkfwimage.c > From owner-freebsd-embedded@FreeBSD.ORG Tue Jul 30 22:41:08 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 822D22B6 for ; Tue, 30 Jul 2013 22:41:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [IPv6:2a00:1450:400c:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C09D2E88 for ; Tue, 30 Jul 2013 22:41:07 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id q55so5708587wes.30 for ; Tue, 30 Jul 2013 15:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=LHTK9k1xAmN2lKjbBQiZUiSseEi44MfnLhV+YXJebxg=; b=0HJpa2XEB+GGpH+WIb5uqNLSUt9hYeos1Rc2+1FY1Ku1AtXfpMY41OHxgjiJLAYu5W i41YdPY2yqzORNCkAEm41T1wDNoon7JZMNYvMoggBPfUSWzjMuFbTuuCt6Ftxs4JGdoY ST0GkuNmqjPp847mUkv9F1QJ0iwJSd3aFLpB0mzGikk39mPF1dexA/I0q+Zp4Dw+pq5G fwDIRLsEd19YhvLGnGHK0jDegRPm6terb9CzkBlsD8KrwTX+hpPi+q8WxUY6l2OvHVWb I5s4lvPS3evDlJo2e2n1VWk6DxOxO/lXMUrmHJ4/nJIcP21ghKRyLnBJp+Tqsp6qer01 KPuQ== MIME-Version: 1.0 X-Received: by 10.180.14.105 with SMTP id o9mr2411568wic.30.1375224066213; Tue, 30 Jul 2013 15:41:06 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Tue, 30 Jul 2013 15:41:06 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Tue, 30 Jul 2013 15:41:06 -0700 X-Google-Sender-Auth: qk-TD0aCMYgFSkFMOHXQkGEfGgk Message-ID: Subject: Re: Making Picostation m2HP work From: Adrian Chadd To: Outback Dingo Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded 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, 30 Jul 2013 22:41:08 -0000 Don't look at me, I'm just the wifi hacker. :) Hiren, we need to figure out which particular board type is applicable for your flash image... -adrian On 30 July 2013 14:14, Outback Dingo wrote: > On Tue, Jul 30, 2013 at 12:57 PM, hiren panchasara < > hiren.panchasara@gmail.com> wrote: > >> On Tue, Jul 30, 2013 at 7:02 AM, Outback Dingo >> wrote: >> > >> > >> > >> > On Tue, Jul 30, 2013 at 7:29 AM, Outback Dingo >> > wrote: >> >> >> >> >> >> >> >> >> >> On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski wrote: >> >>> >> >>> On 29.07.2013 20:52, hiren panchasara wrote: >> >>>> >> >>>> Firmware check failed! >> >>> >> >>> AFAIR I had such info when I tried to flash image from RouterStation >> Pro >> >>> to Routerstation. I think that it must be something with firmware >> header or >> >>> firmware format. >> >>> >> >> I believe its the headers, there is something different about the 2HP >> that >> >> required padding, im digging through data from 4 years ago to find it >> >> from when we deployed a ton of these based on OpenWRT, they are >> different >> >> then all others, same with the RS/RSPRO, >> >> >> >> >> > >> > >> > Warning, my brain is dealing with 4 year old information again, YMMV..... >> > but maybe some insight will help... I could be offbase, >> > Adrian would know best what his mkfwimage supports. >> > >> > its possible it was different offsets so that the mkfirmware image had >> to be >> > modified to build the correct image, the image you are building requires >> > XS2-8 to be correct, I believe the ap91 image is using XS2 and not XS2-8 >> > ....... Adrian again will have to validate AP91 configuration for XS2-8, >> or >> > create a config that uses it. >> I _think_ the difference would be how the board has different things >> laid out and we can specify with the hints? >> > >> > >> > Okay digging back through this a bit in the UBNT SDK, Yes I still have >> > one..... it shows >> > -$(STAGING_DIR_HOST)/bin/mkfwimage \ >> > -B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \ >> > -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \ >> > -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \ >> > -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin >> > >> > >> > and XS2-8 is for PicosStations built with >> > mkfwimage -i XS2-8.txt -v XS2.ar2316.OpenWRT-kamikaze -o >> > openwrt-picostation2-squashfs.bin >> >> Yes, I found the same thing in openwrt build scripts. Now, I need to >> map this to how we are generating image in Adrian's scripts. >> > >> > >> > which required a file called XS2-8.txt >> > >> > kernel 0x01 0xA8030000 0x000D0000 0x80041000 >> > 0x80041000 openwrt-vmlinux.lzma >> > rootfs 0x02 0xA8100000 0x006C0000 0x00000000 >> > 0x00000000 .openwrt-vmlinux.squashfs >> >> Yes, I found this reference also as you are describing but this is >> part of the SDK and I could not find openwrt build scripts using this. >> mkfwimage in the SDK takes this file as an argument and does its job >> accordingly. >> >> Thanks a lot for your inputs, >> > > I think Adrian would know best, according to his post, his ported version > of ubnt-mkfwimage should support the XS2-8 > > > >> Hiren >> >> /me back to mkfwimage.c >> > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org" From owner-freebsd-embedded@FreeBSD.ORG Tue Jul 30 22:48:50 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F310435C; Tue, 30 Jul 2013 22:48:49 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-oa0-x230.google.com (mail-oa0-x230.google.com [IPv6:2607:f8b0:4003:c02::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A51632EBC; Tue, 30 Jul 2013 22:48:49 +0000 (UTC) Received: by mail-oa0-f48.google.com with SMTP id f4so17704867oah.35 for ; Tue, 30 Jul 2013 15:48:49 -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 :cc:content-type; bh=n17ee90OQA6lukyJKrm+NcgRKtecH+T/MPF66lJ9Q80=; b=iL/9pGR7UnGAL/dx8IaHK/MSB7fXqhFw7RR6yIl9oXrlSQ8Y4lrtw6v3ZiX0xRKPgu RR1d5F6YyWPSVGMWREXoqVQfXn7HoFx2C2M1fcVx0BuVtI1zz2tl9OWd+EXkPaHBRLAl KVvjDouIiJq/RHQmFa7YACOmYBofQLvoPzIFmGUKlHdFVYWQ63odJAMQureybdIEt2tN 6S/sa9nOIWd/eJTff+N3rHTzRc2Sfox7GdZy6jgrHSuySJQimXZBgm13BLwVSZsMkNwD QyREulLpgRpKcNFuE0cBye4/dtCGQkdsJdGWpAZpOgmIQC6B9CCpp65eHdVAnvLMUAZH vXUA== MIME-Version: 1.0 X-Received: by 10.60.15.227 with SMTP id a3mr11872487oed.75.1375224528854; Tue, 30 Jul 2013 15:48:48 -0700 (PDT) Received: by 10.76.90.197 with HTTP; Tue, 30 Jul 2013 15:48:48 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Tue, 30 Jul 2013 18:48:48 -0400 Message-ID: Subject: Re: Making Picostation m2HP work From: Outback Dingo To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded 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, 30 Jul 2013 22:48:50 -0000 On Tue, Jul 30, 2013 at 6:41 PM, Adrian Chadd wrote: > Don't look at me, I'm just the wifi hacker. :) > didnt you write the build scripts?? :P I think if he can run mkfwimage manually with the proper -i XS2-8.txt and the rest needed, he might come put with a properly formatted image that the Pico will accept and checksum properly > > Hiren, we need to figure out which particular board type is applicable > for your flash image... > > > > -adrian > > On 30 July 2013 14:14, Outback Dingo wrote: > > On Tue, Jul 30, 2013 at 12:57 PM, hiren panchasara < > > hiren.panchasara@gmail.com> wrote: > > > >> On Tue, Jul 30, 2013 at 7:02 AM, Outback Dingo > >> wrote: > >> > > >> > > >> > > >> > On Tue, Jul 30, 2013 at 7:29 AM, Outback Dingo < > outbackdingo@gmail.com> > >> > wrote: > >> >> > >> >> > >> >> > >> >> > >> >> On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski > wrote: > >> >>> > >> >>> On 29.07.2013 20:52, hiren panchasara wrote: > >> >>>> > >> >>>> Firmware check failed! > >> >>> > >> >>> AFAIR I had such info when I tried to flash image from RouterStation > >> Pro > >> >>> to Routerstation. I think that it must be something with firmware > >> header or > >> >>> firmware format. > >> >>> > >> >> I believe its the headers, there is something different about the 2HP > >> that > >> >> required padding, im digging through data from 4 years ago to find it > >> >> from when we deployed a ton of these based on OpenWRT, they are > >> different > >> >> then all others, same with the RS/RSPRO, > >> >> > >> >> > >> > > >> > > >> > Warning, my brain is dealing with 4 year old information again, > YMMV..... > >> > but maybe some insight will help... I could be offbase, > >> > Adrian would know best what his mkfwimage supports. > >> > > >> > its possible it was different offsets so that the mkfirmware image had > >> to be > >> > modified to build the correct image, the image you are building > requires > >> > XS2-8 to be correct, I believe the ap91 image is using XS2 and not > XS2-8 > >> > ....... Adrian again will have to validate AP91 configuration for > XS2-8, > >> or > >> > create a config that uses it. > >> I _think_ the difference would be how the board has different things > >> laid out and we can specify with the hints? > >> > > >> > > >> > Okay digging back through this a bit in the UBNT SDK, Yes I still have > >> > one..... it shows > >> > -$(STAGING_DIR_HOST)/bin/mkfwimage \ > >> > -B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \ > >> > -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \ > >> > -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \ > >> > -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin > >> > > >> > > >> > and XS2-8 is for PicosStations built with > >> > mkfwimage -i XS2-8.txt -v XS2.ar2316.OpenWRT-kamikaze -o > >> > openwrt-picostation2-squashfs.bin > >> > >> Yes, I found the same thing in openwrt build scripts. Now, I need to > >> map this to how we are generating image in Adrian's scripts. > >> > > >> > > >> > which required a file called XS2-8.txt > >> > > >> > kernel 0x01 0xA8030000 0x000D0000 0x80041000 > >> > 0x80041000 openwrt-vmlinux.lzma > >> > rootfs 0x02 0xA8100000 0x006C0000 0x00000000 > >> > 0x00000000 .openwrt-vmlinux.squashfs > >> > >> Yes, I found this reference also as you are describing but this is > >> part of the SDK and I could not find openwrt build scripts using this. > >> mkfwimage in the SDK takes this file as an argument and does its job > >> accordingly. > >> > >> Thanks a lot for your inputs, > >> > > > > I think Adrian would know best, according to his post, his ported version > > of ubnt-mkfwimage should support the XS2-8 > > > > > > > >> Hiren > >> > >> /me back to mkfwimage.c > >> > > _______________________________________________ > > freebsd-embedded@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > > To unsubscribe, send any mail to " > freebsd-embedded-unsubscribe@freebsd.org" > From owner-freebsd-embedded@FreeBSD.ORG Tue Jul 30 23:20:56 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 1FFFC6C6; Tue, 30 Jul 2013 23:20:56 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x22c.google.com (mail-ea0-x22c.google.com [IPv6:2a00:1450:4013:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D5662F94; Tue, 30 Jul 2013 23:20:55 +0000 (UTC) Received: by mail-ea0-f172.google.com with SMTP id r16so9031ead.17 for ; Tue, 30 Jul 2013 16:20:53 -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 :cc:content-type; bh=pDyZI+cC24Nr0BxU0h8leR9br+BARsXR/bRMWbvrJuQ=; b=JIcjzxBcJjpgx6gJMauarT7QSWd8aZJH3h3oRLjSVCZ1yEiCCAgbAocXhlHBMCYwiN scv6kzaR7FBIJy94t2msOyxxQP/ePi1c+HH0EreY/1oubHRwr5Pbm1uqaFnkb8tRhnl3 xTGjfzSONPtYrh471+7IsRvnexYcdDtOWnvwsiH21nd+h5cvR5s9RfTCeNcuLBXggYCF aokVHdEUVfKjqqRX4148gftc89vlBcYsnt5ebcnFsX5/NgNXDNXSl9M8L3dh98V7+92r Psn2iXKOPYFxeN6Yu8L28dqGb9bleFnsSQgfnr3bD6FJ9TBKCBNyvJ69xeqiCq5/00j5 6U9A== MIME-Version: 1.0 X-Received: by 10.14.1.70 with SMTP id 46mr66601209eec.82.1375226453627; Tue, 30 Jul 2013 16:20:53 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Tue, 30 Jul 2013 16:20:53 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Tue, 30 Jul 2013 16:20:53 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Outback Dingo Content-Type: text/plain; charset=UTF-8 Cc: freebsd-embedded 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, 30 Jul 2013 23:20:56 -0000 On Tue, Jul 30, 2013 at 3:48 PM, Outback Dingo wrote: > > > > On Tue, Jul 30, 2013 at 6:41 PM, Adrian Chadd wrote: >> >> Don't look at me, I'm just the wifi hacker. :) haha. > > > didnt you write the build scripts?? :P I think if he can run mkfwimage > manually with the proper -i XS2-8.txt and the > rest needed, he might come put with a properly formatted image that the Pico > will accept and checksum properly I tried setting board = XS2-8 and that did not help so I am trying to find out what other utilities are doing or how the picostation is expecting the image header/format to be. > >> >> >> Hiren, we need to figure out which particular board type is applicable >> for your flash image... Yes, whenever its convenient. No hurry. I am just dumping here what I am doing and how I am progressing so that any outright stupid thing can be detected right away. Thanks for all the inputs and for also letting me rant here :-) cheers, Hiren >> >> >> -adrian >> >> On 30 July 2013 14:14, Outback Dingo wrote: >> > On Tue, Jul 30, 2013 at 12:57 PM, hiren panchasara < >> > hiren.panchasara@gmail.com> wrote: >> > >> >> On Tue, Jul 30, 2013 at 7:02 AM, Outback Dingo >> >> wrote: >> >> > >> >> > >> >> > >> >> > On Tue, Jul 30, 2013 at 7:29 AM, Outback Dingo >> >> > >> >> > wrote: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski >> >> >> wrote: >> >> >>> >> >> >>> On 29.07.2013 20:52, hiren panchasara wrote: >> >> >>>> >> >> >>>> Firmware check failed! >> >> >>> >> >> >>> AFAIR I had such info when I tried to flash image from >> >> >>> RouterStation >> >> Pro >> >> >>> to Routerstation. I think that it must be something with firmware >> >> header or >> >> >>> firmware format. >> >> >>> >> >> >> I believe its the headers, there is something different about the >> >> >> 2HP >> >> that >> >> >> required padding, im digging through data from 4 years ago to find >> >> >> it >> >> >> from when we deployed a ton of these based on OpenWRT, they are >> >> different >> >> >> then all others, same with the RS/RSPRO, >> >> >> >> >> >> >> >> > >> >> > >> >> > Warning, my brain is dealing with 4 year old information again, >> >> > YMMV..... >> >> > but maybe some insight will help... I could be offbase, >> >> > Adrian would know best what his mkfwimage supports. >> >> > >> >> > its possible it was different offsets so that the mkfirmware image >> >> > had >> >> to be >> >> > modified to build the correct image, the image you are building >> >> > requires >> >> > XS2-8 to be correct, I believe the ap91 image is using XS2 and not >> >> > XS2-8 >> >> > ....... Adrian again will have to validate AP91 configuration for >> >> > XS2-8, >> >> or >> >> > create a config that uses it. >> >> I _think_ the difference would be how the board has different things >> >> laid out and we can specify with the hints? >> >> > >> >> > >> >> > Okay digging back through this a bit in the UBNT SDK, Yes I still >> >> > have >> >> > one..... it shows >> >> > -$(STAGING_DIR_HOST)/bin/mkfwimage \ >> >> > -B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \ >> >> > -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \ >> >> > -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \ >> >> > -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin >> >> > >> >> > >> >> > and XS2-8 is for PicosStations built with >> >> > mkfwimage -i XS2-8.txt -v XS2.ar2316.OpenWRT-kamikaze -o >> >> > openwrt-picostation2-squashfs.bin >> >> >> >> Yes, I found the same thing in openwrt build scripts. Now, I need to >> >> map this to how we are generating image in Adrian's scripts. >> >> > >> >> > >> >> > which required a file called XS2-8.txt >> >> > >> >> > kernel 0x01 0xA8030000 0x000D0000 0x80041000 >> >> > 0x80041000 openwrt-vmlinux.lzma >> >> > rootfs 0x02 0xA8100000 0x006C0000 0x00000000 >> >> > 0x00000000 .openwrt-vmlinux.squashfs >> >> >> >> Yes, I found this reference also as you are describing but this is >> >> part of the SDK and I could not find openwrt build scripts using this. >> >> mkfwimage in the SDK takes this file as an argument and does its job >> >> accordingly. >> >> >> >> Thanks a lot for your inputs, >> >> >> > >> > I think Adrian would know best, according to his post, his ported >> > version >> > of ubnt-mkfwimage should support the XS2-8 >> > >> > >> > >> >> Hiren >> >> >> >> /me back to mkfwimage.c >> >> >> > _______________________________________________ >> > freebsd-embedded@freebsd.org mailing list >> > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded >> > To unsubscribe, send any mail to >> > "freebsd-embedded-unsubscribe@freebsd.org" > > From owner-freebsd-embedded@FreeBSD.ORG Wed Jul 31 18:25:01 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 394AE36F for ; Wed, 31 Jul 2013 18:25:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B06122173 for ; Wed, 31 Jul 2013 18:25:00 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id f14so3695187wiw.2 for ; Wed, 31 Jul 2013 11:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=AmGM4CV6lc4kF1FirMQaCRmhvAMBwzJGmOr0WFMesHg=; b=qEpdVbC71iAosIZROMaeCJBJbSo/v/2RuMkugwmOobU4GRAcaJaFBOCIDq9MfOGLh8 q3KRrzJHeDZJHAMeuIU4nuRtsSbIaUbC4z8GVYbGJo6INdM4f43iStW37ZclH2tVYd0T zqH9Vl3kA2q+aqYppaIXQ2C9gOTHE73VD7+EiPjBzzOuAtmrioC4UQ6rrim7Jlg9DAYT LTcbvcvhN6Z58gYGvS9xTA2LJ6ZDle/H1NG1hxeu/6BaGTgdwEinGicBHZAJdZeEplFG 9fae8j8pWm1GMifo82D7u4smTC7TDa0fo7OCdwsbqBEQJ7v65RoI1LAwD/fcoE8Ohbs6 ykCQ== MIME-Version: 1.0 X-Received: by 10.194.201.202 with SMTP id kc10mr11437881wjc.1.1375295098866; Wed, 31 Jul 2013 11:24:58 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Wed, 31 Jul 2013 11:24:58 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Wed, 31 Jul 2013 11:24:58 -0700 X-Google-Sender-Auth: 0ktY5phYVBKROaOqPk5YabTAkYY Message-ID: Subject: Re: Making Picostation m2HP work From: Adrian Chadd To: Outback Dingo Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded 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: Wed, 31 Jul 2013 18:25:01 -0000 On 30 July 2013 15:48, Outback Dingo wrote: > > > > On Tue, Jul 30, 2013 at 6:41 PM, Adrian Chadd wrote: >> >> Don't look at me, I'm just the wifi hacker. :) > > > didnt you write the build scripts?? :P I think if he can run mkfwimage > manually with the proper -i XS2-8.txt and the > rest needed, he might come put with a properly formatted image that the Pico > will accept and checksum properly Yup! But I haven't made it work for that picostation! ALthough for some odd reason, the recent images that I'm building don't actually work on the routerstation pro. I don't know why; maybe the images got too big. I'll go investigate when I'm back in San Jose. -adrian From owner-freebsd-embedded@FreeBSD.ORG Wed Jul 31 21:23:37 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 55A2D3F8 for ; Wed, 31 Jul 2013 21:23:37 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-x22e.google.com (mail-ee0-x22e.google.com [IPv6:2a00:1450:4013:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D24D7281D for ; Wed, 31 Jul 2013 21:23:36 +0000 (UTC) Received: by mail-ee0-f46.google.com with SMTP id c13so598179eek.19 for ; Wed, 31 Jul 2013 14:23:35 -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 :cc:content-type; bh=Z9q2BTwF8LTUqPP9Gt2lHHDYifTOsPmHkO43WKlRRZg=; b=SPOu/AJkT7C3x9xxRYODPrGKS11Rn3YeicdBdDxesGZT/vubU7Q3gmVdMJEYXrwpL7 ikUd+RouiGgE8Va0kY1J4UIJo4T6cV0FRQ97Flgl7NHEzPu1tu6utVK2LrOu1gYLGZx2 4ADxX0JsQRTJ0/9ri8U5lIdoBzn8I2rb7tiMB74w9K9nXIBgpJu4ZVgCeq0GsQ6Hoeh8 77VAMDHwLmYJtVCbweea6ZLeBjgbv2jqNsG9Ml42HoHtSJOMghVIO9N7HujWpBGH1l7/ ZxdR2FKe0WE8wcDviUzZShEBc2CxdN3SOgYGd2y6VamcqUdqWcOvIX+LtxvkyLqh0Fb0 ecJA== MIME-Version: 1.0 X-Received: by 10.14.149.141 with SMTP id x13mr70784503eej.77.1375305814902; Wed, 31 Jul 2013 14:23:34 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Wed, 31 Jul 2013 14:23:34 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Wed, 31 Jul 2013 14:23:34 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Outback Dingo Content-Type: text/plain; charset=UTF-8 Cc: freebsd-embedded 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: Wed, 31 Jul 2013 21:23:37 -0000 On Tue, Jul 30, 2013 at 7:02 AM, Outback Dingo wrote: > > > > On Tue, Jul 30, 2013 at 7:29 AM, Outback Dingo > wrote: >> >> >> >> >> On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski wrote: >>> >>> On 29.07.2013 20:52, hiren panchasara wrote: >>>> >>>> Firmware check failed! >>> >>> AFAIR I had such info when I tried to flash image from RouterStation Pro >>> to Routerstation. I think that it must be something with firmware header or >>> firmware format. >>> >> I believe its the headers, there is something different about the 2HP that >> required padding, im digging through data from 4 years ago to find it >> from when we deployed a ton of these based on OpenWRT, they are different >> then all others, same with the RS/RSPRO, >> >> > > > Warning, my brain is dealing with 4 year old information again, YMMV..... > but maybe some insight will help... I could be offbase, > Adrian would know best what his mkfwimage supports. > > its possible it was different offsets so that the mkfirmware image had to be > modified to build the correct image, the image you are building requires > XS2-8 to be correct, I believe the ap91 image is using XS2 and not XS2-8 > ....... Adrian again will have to validate AP91 configuration for XS2-8, or > create a config that uses it. > > > Okay digging back through this a bit in the UBNT SDK, Yes I still have > one..... it shows > -$(STAGING_DIR_HOST)/bin/mkfwimage \ > -B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \ > -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \ > -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \ > -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin > > > and XS2-8 is for PicosStations built with > mkfwimage -i XS2-8.txt -v XS2.ar2316.OpenWRT-kamikaze -o > openwrt-picostation2-squashfs.bin > > > which required a file called XS2-8.txt > > kernel 0x01 0xA8030000 0x000D0000 0x80041000 > 0x80041000 openwrt-vmlinux.lzma > rootfs 0x02 0xA8100000 0x006C0000 0x00000000 > 0x00000000 .openwrt-vmlinux.squashfs So I looked at this file. (I found similar references of using this file too). So here is what it says: name index baseaddr size memaddr entryaddr file kernel 0x01 0xA8030000 0x000D0000 0x80041000 0x80041000 openwrt-vmlinux.lzma rootfs 0x02 0xA8100000 0x006C0000 0x00000000 0x00000000 openwrt-vmlinux.squashfs In the image I am generating (with adrian's scripts), the baseaddr for kernel is as mentioned above 0xA8030000. But the baseaddr for rootfs is calculated as: rootfs->partition_baseaddr = kernel->partition_baseaddr + kernel->partition_length; which is not 0xA8100000. but a little higher than that. So I thought kernel is a bit too big. So I trimmed down the kernel a bit and hard coded the value like: rootfs->partition_baseaddr = 0xA8100000; But no success. And the kernel I am using is lzma'ed. I am not sure if the rootfs has to be squashfs'ed? cheers, Hiren Journey continues.... > > > >>> >>> -- >>> Pozdrawiam, >>> Maciej Milewski >>> >>> >>> _______________________________________________ >>> freebsd-embedded@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded >>> To unsubscribe, send any mail to >>> "freebsd-embedded-unsubscribe@freebsd.org" >> >> > From owner-freebsd-embedded@FreeBSD.ORG Wed Jul 31 21:52:06 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 677C48BB for ; Wed, 31 Jul 2013 21:52:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA0582926 for ; Wed, 31 Jul 2013 21:52:05 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id j13so1048942wgh.2 for ; Wed, 31 Jul 2013 14:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=MvlxVKta8cyxnhIhYk0lhTpFtdML7drz0InE4KkJxaA=; b=s4WZcz7BLP1AzZZT7UrXCD/ahgTEGA3fysjAkEvMTXNS+9H2ksdBerESIFbZyCanWu S15erq7TWu3iddj9JgDdlRZ7OCBD1hntQfOOQ8olwDhgGdm6n0zFqoHBJB4byemk7BIW MD22OlL4AOQM3NsHbG1uMlwJFKmoe9AOf1hxhW0lWn/dXOGEZhM3gB0+uL8QStyY85Cd OduXflo7ph0GuBWmr1K0jx26b0f26+kbCb3cfsOP2zh4GmhSb3iVirqCqdpYSuVVj0+a aDBCXPT7VJ3+Qzf8LHOBq03pIXHnuidKTat/vSjMbIjNNId5o0mIcss7hEEhg4HvOBBX Jggw== MIME-Version: 1.0 X-Received: by 10.180.160.165 with SMTP id xl5mr5628874wib.46.1375307524121; Wed, 31 Jul 2013 14:52:04 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Wed, 31 Jul 2013 14:52:04 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Wed, 31 Jul 2013 14:52:04 -0700 X-Google-Sender-Auth: -n7bZJ61vUDy-WF8L9BZ4K-f4lg Message-ID: Subject: Re: Making Picostation m2HP work From: Adrian Chadd To: hiren panchasara Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded 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: Wed, 31 Jul 2013 21:52:06 -0000 Are you using the right flags to the _ports_ lzma to create an image that uboot can actually decode? -adrian On 31 July 2013 14:23, hiren panchasara wrote: > On Tue, Jul 30, 2013 at 7:02 AM, Outback Dingo wrote: >> >> >> >> On Tue, Jul 30, 2013 at 7:29 AM, Outback Dingo >> wrote: >>> >>> >>> >>> >>> On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski wrote: >>>> >>>> On 29.07.2013 20:52, hiren panchasara wrote: >>>>> >>>>> Firmware check failed! >>>> >>>> AFAIR I had such info when I tried to flash image from RouterStation Pro >>>> to Routerstation. I think that it must be something with firmware header or >>>> firmware format. >>>> >>> I believe its the headers, there is something different about the 2HP that >>> required padding, im digging through data from 4 years ago to find it >>> from when we deployed a ton of these based on OpenWRT, they are different >>> then all others, same with the RS/RSPRO, >>> >>> >> >> >> Warning, my brain is dealing with 4 year old information again, YMMV..... >> but maybe some insight will help... I could be offbase, >> Adrian would know best what his mkfwimage supports. >> >> its possible it was different offsets so that the mkfirmware image had to be >> modified to build the correct image, the image you are building requires >> XS2-8 to be correct, I believe the ap91 image is using XS2 and not XS2-8 >> ....... Adrian again will have to validate AP91 configuration for XS2-8, or >> create a config that uses it. >> >> >> Okay digging back through this a bit in the UBNT SDK, Yes I still have >> one..... it shows >> -$(STAGING_DIR_HOST)/bin/mkfwimage \ >> -B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \ >> -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \ >> -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \ >> -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin >> >> >> and XS2-8 is for PicosStations built with >> mkfwimage -i XS2-8.txt -v XS2.ar2316.OpenWRT-kamikaze -o >> openwrt-picostation2-squashfs.bin >> >> >> which required a file called XS2-8.txt >> >> kernel 0x01 0xA8030000 0x000D0000 0x80041000 >> 0x80041000 openwrt-vmlinux.lzma >> rootfs 0x02 0xA8100000 0x006C0000 0x00000000 >> 0x00000000 .openwrt-vmlinux.squashfs > > So I looked at this file. (I found similar references of using this > file too). So here is what it says: > > name index baseaddr size memaddr entryaddr file > > kernel 0x01 0xA8030000 0x000D0000 0x80041000 0x80041000 openwrt-vmlinux.lzma > rootfs 0x02 0xA8100000 0x006C0000 0x00000000 0x00000000 openwrt-vmlinux.squashfs > > In the image I am generating (with adrian's scripts), the baseaddr for > kernel is as mentioned above 0xA8030000. But the baseaddr for rootfs > is calculated as: > rootfs->partition_baseaddr = kernel->partition_baseaddr + > kernel->partition_length; > > which is not 0xA8100000. but a little higher than that. So I thought > kernel is a bit too big. So I trimmed down the kernel a bit and hard > coded the value like: > rootfs->partition_baseaddr = 0xA8100000; > > But no success. And the kernel I am using is lzma'ed. I am not sure if > the rootfs has to be squashfs'ed? > > cheers, > Hiren > > Journey continues.... > >> >> >> >>>> >>>> -- >>>> Pozdrawiam, >>>> Maciej Milewski >>>> >>>> >>>> _______________________________________________ >>>> freebsd-embedded@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded >>>> To unsubscribe, send any mail to >>>> "freebsd-embedded-unsubscribe@freebsd.org" >>> >>> >> > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org"