From owner-freebsd-mips@FreeBSD.ORG  Thu Aug 29 22:51:51 2013
Return-Path: <owner-freebsd-mips@FreeBSD.ORG>
Delivered-To: freebsd-mips@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 EC21623B
 for <freebsd-mips@freebsd.org>; Thu, 29 Aug 2013 22:51:51 +0000 (UTC)
 (envelope-from imp@bsdimp.com)
Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com
 [209.85.214.182])
 (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
 (No client certificate requested)
 by mx1.freebsd.org (Postfix) with ESMTPS id AFDB0208C
 for <freebsd-mips@freebsd.org>; Thu, 29 Aug 2013 22:51:51 +0000 (UTC)
Received: by mail-ob0-f182.google.com with SMTP id wo10so1173107obc.41
 for <freebsd-mips@freebsd.org>; Thu, 29 Aug 2013 15:51:50 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:mime-version:content-type:from
 :in-reply-to:date:cc:content-transfer-encoding:message-id:references
 :to; bh=RkCBA6TdHsbJOAmdiaTP5Clf3p0yK19wutCfNK9WEjc=;
 b=JvlLbz0KonNd74Cdgql3AR9tAN2tAbIUq+zspFNd7+e1kJKwYC/ihlfbDsoCFmh+ld
 gV+rQMsicP08fUAYYTBHB8pwgeQDt5dKDn+BHoQeJvwpqJcSpX4l70mA1GTPwelG/Fsn
 rdClS5UqcWMsyTxPW27S/18CwDIP7AJ62TgSSzGsZhRG3BZESQ4FgpFpvK/gJ9RLwFx/
 xqcJ6qfuM/mIyQzkcYewZVUpKxQ51ZWakbK35zuJUwAVWA3O86jjnjTm9fkV1gD5fbmv
 JbU0kB2oash1EwG0v/sfAlWe8XOyfJt99hUN+0dPlyAyTC9pi+qIPHgKVr6GU3hvM9AW
 La5A==
X-Gm-Message-State: ALoCoQnS2nY3a7GgDuDtLEPKzAH7Q5Rwrt0f3Pr0MdbUTWHKionVliVFfJOX3977ZSEe1hIgVmgq
X-Received: by 10.182.104.36 with SMTP id gb4mr4494733obb.43.1377816710508;
 Thu, 29 Aug 2013 15:51:50 -0700 (PDT)
Received: from monkey-bot.int.fusionio.com ([209.117.142.2])
 by mx.google.com with ESMTPSA id s9sm30691839obu.4.1969.12.31.16.00.00
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Thu, 29 Aug 2013 15:51:49 -0700 (PDT)
Sender: Warner Losh <wlosh@bsdimp.com>
Subject: Re: TP-Link 1043ND - its tme :)
Mime-Version: 1.0 (Apple Message framework v1085)
Content-Type: text/plain; charset=us-ascii
From: Warner Losh <imp@bsdimp.com>
X-Priority: 3 (Normal)
In-Reply-To: <8FFD8F5B-FCE4-4062-B6B7-7A46943E91AE@bsdimp.com>
Date: Thu, 29 Aug 2013 16:51:46 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: <CFBA86E3-7776-48E1-B2BC-FE662EB37338@bsdimp.com>
References: <fff374ff14148d1fb43d22455e2f068f.squirrel@arroway.org>
 <CAJ-VmokmrJW4cKd3kXnvezhynh0Pic9hswpFngsG8mAjmJVDSQ@mail.gmail.com>
 <CAB=2f8xyHYEYcJSnmEaxz2KVLCa=kYOYDEt0CNP4eWwMMx-oQg@mail.gmail.com>
 <f1c2b01c75e04235197a4a766580e82c.squirrel@arroway.org>
 <04dc16e8adc42b571915e7fc51ec9a57.squirrel@arroway.org>
 <8FFD8F5B-FCE4-4062-B6B7-7A46943E91AE@bsdimp.com>
To: Warner Losh <imp@bsdimp.com>
X-Mailer: Apple Mail (2.1085)
Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
X-BeenThere: freebsd-mips@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Porting FreeBSD to MIPS <freebsd-mips.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-mips>,
 <mailto:freebsd-mips-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-mips>
List-Post: <mailto:freebsd-mips@freebsd.org>
List-Help: <mailto:freebsd-mips-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-mips>,
 <mailto:freebsd-mips-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Aug 2013 22:51:52 -0000


On Aug 29, 2013, at 4:06 PM, Warner Losh wrote:

>=20
>> [mktplinkfw] *** error: rootfs image is too big
>=20
> OK. This isn't for root image, but to make the uncompressed kernel =
~685k smaller. So maybe 200k smaller after compression.
>=20
> http://people.freebsd.org/~imp/smalller-mips

I've moved this to http://people.freebsd.org/~imp/smaller-mips.diff for =
nicer downloading, and the original link had too many l's in it...

> basically it does EXTRA_FLAGS+=3D-fno-inline -Wno-inline -Os =
-Wno-strict-aliasing while setting the inline limit to 0 and adding some =
libkern functions that need it. Plus adding the canonical =
MUTEX/RWLOCK/SX_NOINLINE options.
>=20
>   text	   data	    bss	    dec	    hex	filename
> 3598994 270588	 153056	4022638 3d616e	kernel.debug	with =
patch
> 4285106 270632 153056 4708794 47d9ba kernel.debug		built =
without
>=20
> Comments?

Btw, the extra initialization is for a few places where -Os produces =
different (and I think spurious) warnings vs -O2. That's also the =
purpose of the MIPS_SMALL_HACK option, so the three shift routines that =
are normally inlined by the compiler have definitions. But those few =
bytes may not be worth optimizing...

Warner


> Warner
>=20
> P.S. Don't have this hardware, so no test boots.
>=20