From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 13:48:56 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 032C2106564A for ; Wed, 30 Nov 2011 13:48:56 +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 B3E948FC15 for ; Wed, 30 Nov 2011 13:48:55 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so556098vbb.13 for ; Wed, 30 Nov 2011 05:48:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=d1YgHEKk0l2tTkX2QL0BN2w9yK1i8Rih6/abngLtshU=; b=gVIjiTlgC9AD4qee1ENXUY/wA32LLWpaK3iHegzE+pjcZ9RozcdAppSnaLH4ZSgEUC j2r+rMyQW8x8v+E9J6YJDVPtV5at8umID72kAxdkFlWuswVFwMUSxE22QSP4X0FlPG+l XIjR0L1jBoexlWre0G3Y9hl1BIHPXmMCT51Zk= MIME-Version: 1.0 Received: by 10.52.33.69 with SMTP id p5mr1988658vdi.78.1322660934930; Wed, 30 Nov 2011 05:48:54 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Wed, 30 Nov 2011 05:48:54 -0800 (PST) In-Reply-To: <10FF4425-2A77-4A91-A656-645188929E16@lassitu.de> References: <20111130094212.GA76927@psconsult.nl> <10FF4425-2A77-4A91-A656-645188929E16@lassitu.de> Date: Wed, 30 Nov 2011 21:48:54 +0800 X-Google-Sender-Auth: 9nvHfMWxTOfXyS1Unpp-OE1DIlo Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: 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: Wed, 30 Nov 2011 13:48:56 -0000 +1 on the serial console. Yes, you can revert to the original firmware. Well, I haven't yet tftp -uploaded- what's in the flash, but what I suggest you do is this: * modify my tplink config file to have an mdroot of 6 meg (and change the rootfs to be /dev/md0.uzip * when building the firmware, build "buildkernel installkernel mfsroot fsimage netboot" - that'll blit the uzip mfsroot into the kernel, leaving you with TP-WN1043ND.netboot * you can then netboot the kernel: > tftpboot 0x80050000 kernel.TP-WN1043ND.netboot > go 0x80050100 .. then use dd and netcat to take a complete flash backup, something like: # dd if=/dev/flash/spi0 bs=64k | nc That should leave you with an 8 megabyte image. Finally, the trick to restoring the original firmware is to trim out the first 128k and the last 64k of the firmware image. You can likely use dd to do that. I haven't the time to think of the way to do it, but something like this. * skip the first 128k - that's uboot * skip the last 128k - that's the config partition (ignore) and the last 64k there is the radio calibration data $ dd if=backup-image.bin of=firmware.bin bs=64k skip=2 count=124 .. I think that's right. That should leave you with an image you can reflash later on: > erase 0xbf020000 +7c0000 # I _think_ this is right, check with the openwrt wiki! > tftpboot 0x81000000 backup-image.bin > cp.b 0x81000000 0xbf020000 +7c0000 > bootm 0xbf020000 I -think- that's right. I'd appreciate it if someone else would double-check my figures. But I've done that in the past so I have a complete copy of the flash contents, including the radio calibration data, in case I somehow screw it up. Good luck! Adrian