From owner-freebsd-mips@FreeBSD.ORG Tue Apr 12 08:00:54 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3684D106564A; Tue, 12 Apr 2011 08:00:54 +0000 (UTC) (envelope-from freebsd-mips@dino.sk) Received: from loki.netlab.sk (ns3.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id D44078FC0C; Tue, 12 Apr 2011 08:00:53 +0000 (UTC) Received: from atom.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: LOGIN milan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by loki.netlab.sk with ESMTPSA; Tue, 12 Apr 2011 10:00:27 +0200 id 00033C15.4DA4069B.000170F6 Date: Tue, 12 Apr 2011 10:00:41 +0200 From: Milan Obuch To: Aleksandr Rybalko Message-ID: <20110412100041.00cfe100@atom.dino.sk> In-Reply-To: <20110411124159.8b93df20.ray@dlink.ua> References: <20110331101554.68171eed@atom.dino.sk> <20110331142640.07f2101b@atom.dino.sk> <20110401005733.3598e82c.ray@ddteam.net> <20110408095712.1fc36066@atom.dino.sk> <20110408113132.3c1df0a8.ray@dlink.ua> <20110409142931.3d1884a9@atom.dino.sk> <20110411124159.8b93df20.ray@dlink.ua> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; amd64-portbld-freebsd8.2) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC X-Face: ak5rwz4-aUa>hPFZlcg,bXxn.(TN}e9DGFrKU\.i_'B[&5=pAd9o"j)5VSUYW:BRQG#^42Ev$Il|; Ztn=,C X-Operating-System: FreeBSD/amd64 8.2-STABLE Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Aleksandr Rybalko , freebsd-mips@freebsd.org Subject: Re: [RFC] Re: TP link MR3220 status, boot from flash via u-boot question X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2011 08:00:54 -0000 On Mon, 11 Apr 2011 12:41:59 +0300, Aleksandr Rybalko wrote: > On Sat, 9 Apr 2011 14:29:31 +0200 > Milan Obuch wrote: > > >> On Fri, 8 Apr 2011 11:31:32 +0300, Aleksandr Rybalko > >> wrote: > >> > >> > On Fri, 8 Apr 2011 09:57:12 +0200 > >> > Milan Obuch wrote: > >> > [ snip ] > >> For lzma, u-boot told 'bad gzip data, must reset'. No joy. I have > >> no idea on old lzma method, will try xz, but I have little hope it > >> will be any better. > >> > > oldlzma is a lzma tool 4.17 > You can use my copy (Makefile reorganized to simple BSD Makefile) > http://my.ddteam.net/files/oldlzma.tar.gz > I will try, but not too hard :) (see below) [ snip ] > >> Will try with -O binary, actually I am using it now without this > >> option. > Don't forget to use objcopy of mips toolchain (somewhere > in /usr/obj/mips.mipsel) > Yes, naturally - all tools are cross build ones... [ snip ] > >> > >> On a side note, there is one thing to be addressed. As my > >> > >> device has only 4 MB flash, I still need to shrink the image > >> > >> I would like to use there. I could put there working kernel, > >> > >> when flash boot issue is solved, but root fs not yet, > >> > >> together they do not fit. I still need to save as much as 600 > >> > >> kB of space... Do you have any tips to share? In some older > >> > >> mails here I saw you managed to do it for other device... > >> > > >> > 1. compile with NOSHARED=no > >> > 2. delete .h, .a, .o and many other docs and unused binary's (I > >> > think that step you know :) ) 3. mkulzma+geom_uncompress instead > >> > mkuzip+geom_uzip > >> > > >> > >> There are following files at http://my.ddteam.net page: > >> > >> 2011-01-19_add_contrib_xz-embedded.patch > >> 2011-01-19_geom_ulzma_and_mkulzma.patch > >> 2011-01-21_geom_ulzma_and_uzip.diff > >> 2011-01-23_geom_uncompress.diff > >> 2011-01-23_geom_uncompress.patch > >> 2011-01-24_mkulzma.patch > >> > >> Which one should I use? There is no mkulzma in base now... > >> > >> Regards, > >> Milan > > Use please: > mkulzma utility - http://my.ddteam.net/files/2011-01-24_mkulzma.patch > geom_uncompress(uzip/ulzma) - > http://my.ddteam.net/files/2011-01-23_geom_uncompress.patch > xz-embedded decompressor - > http://my.ddteam.net/files/2011-01-19_add_contrib_xz-embedded.patch > Looks like my guess was right. It works and I am able to create combined kernel + root fs fitting in 4 MB flash, kernel is gzipped as u-boot seems support only that and rootfs lzma-compressed. Trouble is u-boot does not like my images, so I need to investigate that, which does not seems to be easy now... Has anybody some experience in this area? There is GPL compliance tarball from TP-link with some u-boot directory in it, but is it possible to build it somehow under FreeBSD? All in this tarball seems to be 'just Linux'... Regards, Milan