From owner-freebsd-embedded@FreeBSD.ORG Thu Nov 24 08:13:03 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA8A7106564A for ; Thu, 24 Nov 2011 08:13:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9A8178FC08 for ; Thu, 24 Nov 2011 08:13:03 +0000 (UTC) Received: by vbbfa15 with SMTP id fa15so3126475vbb.13 for ; Thu, 24 Nov 2011 00:13:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=WVEKKG1Xi/isUE/eUKBV351LlelqR58jf8fX4uvul7Y=; b=q09qgjYaGYREVTdHLsxq7DAJKdfJtGKKn0KF7UvE2yqJgWazCOZvRljl/wTi+qfRtb CZjj6p6uk2q1sHQrfgeH5bSZua4pDpZodRO+6RWrfPJi11uWav2dxaxcowSLcfGm3xsD xRQQlAl6M5JdkRFZGiwD1CfW9NVYyEC+VNxdc= MIME-Version: 1.0 Received: by 10.52.174.193 with SMTP id bu1mr28618725vdc.71.1322120876266; Wed, 23 Nov 2011 23:47:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.182.134 with HTTP; Wed, 23 Nov 2011 23:47:56 -0800 (PST) Date: Thu, 24 Nov 2011 15:47:56 +0800 X-Google-Sender-Auth: DwIS1SqP4c2IKhZic3Y-tpuPrUs Message-ID: From: Adrian Chadd To: freebsd-wireless@freebsd.org, freebsd-embedded@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: tplink TL-WR1043ND access point is now ready (was Re: svn commit: r227926 - head/sys/mips/conf) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2011 08:13:03 -0000 And with this particular commit, all the bits needed to get FreeBSD-HEAD running natively on this unit are now in the tree. The process is documented here: http://code.google.com/p/freebsd-wifi-build/wiki/TpLinkTLWR1043ND I haven't yet tried building and testing a sysupgrade image, so please don't ask me how to update it via the default firmware webui. So to play this game you'll (for now) require a serial console. I do however have the unit running as a 2.4ghz 11n hostap, natively booting from flash with a 64k flash partition to store configuration data on. My work here is done. :-) Adrian On 24 November 2011 15:37, Adrian Chadd wrote: > Author: adrian > Date: Thu Nov 24 07:37:19 2011 > New Revision: 227926 > URL: http://svn.freebsd.org/changeset/base/227926 > > Log: > =A0Now that I've brought up FreeBSD via flash, I've discovered that > =A0the second-last 64k seems to be the default firmware board configurati= on > =A0area. > > =A0Since I have no idea whether uboot uses it or not - and it's prefixed > =A0with an atheros eeprom signature (0xaa55), I figure the safest thing > =A0to do is mark it as read-only. > > =A0I've modified my local tplink firmware building program to generate > =A0a board configuration section - which is separate to this partition. > =A0It's located in the 64k _before_ this particular 64k. > > =A0The firmware build program from OpenWRT never initialises those > =A0values and the firmware images from tplink also leave it 0x0, so I > =A0don't currently know what the exact, correct details should be. > > Modified: > =A0head/sys/mips/conf/TP-WN1043ND.hints > > Modified: head/sys/mips/conf/TP-WN1043ND.hints > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/conf/TP-WN1043ND.hints =A0 =A0 =A0 =A0Thu Nov 24 07:33:= 41 2011 =A0 =A0 =A0 =A0(r227925) > +++ head/sys/mips/conf/TP-WN1043ND.hints =A0 =A0 =A0 =A0Thu Nov 24 07:37:= 19 2011 =A0 =A0 =A0 =A0(r227926) > @@ -26,7 +26,8 @@ hint.ath.0.eepromaddr=3D0x1fff1000 > =A0# 128k: uboot > =A0# 1024k: kernel > =A0# 4096k: rootfs > -# 2880k: unknown > +# 2816: unknown > +# 64k: board config? > =A0# 64k: ART > =A0# > =A0# from printenv: > @@ -37,8 +38,9 @@ hint.ath.0.eepromaddr=3D0x1fff1000 > =A0# So: > =A0# 128k: uboot > =A0# 2048k: kernel > -# 5888k: rootfs > -# (todo: 64k: config) > +# 5824k: rootfs > +# 64k: config > +# 64k: board config? > =A0# 64k: ART > > =A0hint.map.0.at=3D"flash/spi0" > @@ -55,19 +57,38 @@ hint.map.1.readonly=3D1 > > =A0hint.map.2.at=3D"flash/spi0" > =A0hint.map.2.start=3D0x00220000 > -#hint.map.2.end=3D0x007e0000 > -hint.map.2.end=3D0x007f0000 > +hint.map.2.end=3D0x007c0000 > =A0hint.map.2.name=3D"rootfs" > =A0hint.map.2.readonly=3D1 > > -#hint.map.3.at=3D"flash/spi0" > -#hint.map.3.start=3D0x007e0000 > -#hint.map.3.end=3D0x007f0000 > -#hint.map.3.name=3D"cfg" > -#hint.map.3.readonly=3D1 > +hint.map.3.at=3D"flash/spi0" > +hint.map.3.start=3D0x007c0000 > +hint.map.3.end=3D0x007d0000 > +hint.map.3.name=3D"cfg" > +hint.map.3.readonly=3D0 > > +# I'm not sure what this is! > +# > +# It does however start with "55 aa" which is an AR5416 EEPROM > +# magic value, followed by what looks like a set of ethernet > +# MAC addresses, then a bunch of what looks like my local firmware > +# board configuration. > +# > +# For now, I'm going to leave this particular chunk of flash > +# alone. > +# > =A0hint.map.4.at=3D"flash/spi0" > -hint.map.4.start=3D0x007f0000 > -hint.map.4.end=3D0x00800000 > -hint.map.4.name=3D"art" > +hint.map.4.start=3D0x007d0000 > +hint.map.4.end=3D0x007e0000 > +hint.map.4.name=3D"unknown" > =A0hint.map.4.readonly=3D1 > + > +# This is radio calibration section. =A0It is (or should be!) unique > +# for each board, to take into account thermal and electrical difference= s > +# as well as the regulatory compliance data. > +# > +hint.map.5.at=3D"flash/spi0" > +hint.map.5.start=3D0x007f0000 > +hint.map.5.end=3D0x00800000 > +hint.map.5.name=3D"art" > +hint.map.5.readonly=3D1 >