From owner-freebsd-mips@FreeBSD.ORG Sat Sep 6 17:43:02 2014 Return-Path: Delivered-To: freebsd-mips@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 ESMTPS id 3075BABF; Sat, 6 Sep 2014 17:43:02 +0000 (UTC) Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.riseup.net", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 071931081; Sat, 6 Sep 2014 17:43:01 +0000 (UTC) Received: from plantcutter.riseup.net (plantcutter-pn.riseup.net [10.0.1.121]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Gandi Standard SSL CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id C1A714F7A3; Sat, 6 Sep 2014 10:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1410025374; bh=lipZhwLZG5Z15dykKCDelLWiL/IS7GnymT0+To3QhTA=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=fG04w0Bg/nguPevGQdQqjRVGvwXUXOxlxK5rTBPUN9YzRbvMJNampv1jsD4UGkTiq hP0s7/BF7bYNitzoZo33cBkx39eb1/ay8dJiFFI3/OO0gLNcmnS6JtmFZivmL4tY6m L3DLqFw7YBngztq8kuyZ4Wbf0edvzrdaSEQ8u/7I= Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: pkubaj) with ESMTPSA id 1085D225FB Message-ID: <540B479B.10809@riseup.net> Date: Sat, 06 Sep 2014 19:42:51 +0200 From: Piotr Kubaj User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: hiren panchasara Subject: Re: WR1043ND - too big kernel References: <5408BB36.5060409@riseup.net> <5408BE6A.4050500@riseup.net> <5408CE14.2090809@riseup.net> <540A0BDE.6040605@riseup.net> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TMgugTGdpJhsSdODitcvga7fSPhbQULiM" X-Virus-Scanned: clamav-milter 0.98.4 at mx1 X-Virus-Status: Clean Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 17:43:02 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TMgugTGdpJhsSdODitcvga7fSPhbQULiM Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/05/2014 22:46, hiren panchasara wrote: > On Fri, Sep 5, 2014 at 12:15 PM, Piotr Kubaj wrote:= >> On 09/05/2014 19:59, hiren panchasara wrote: >>> On Thu, Sep 4, 2014 at 2:27 PM, hiren panchasara = wrote: >>>> On Thu, Sep 4, 2014 at 1:44 PM, hiren panchasara = wrote: >>>>> On Thu, Sep 4, 2014 at 1:39 PM, Piotr Kubaj wro= te: >>>>>> Adding following lines to kernel config shrinks size to 1750991 (o= n >>>>>> releng/10.0): >>>>>> makeoptions INLINE_LIMIT=3D768 >>>>>> nomakeoptions DEBUG >>>>>> nomakeoptions ALQ >>>>>> nooptions INET6 >>>>>> options NO_SWAPPING >>>>>> nooptions HWPMC_HOOKS >>>>>> nodevice hwpmc >>>>>> nodevice hwpmc_mips24k >>>>>> nooptions KDB >>>>>> >>>>>> Any ideas what else I can remove? :P >>>>> >>>>> I see you already have r255656. >>>>> Let me try to build for -head and see. >>>> >>>> >>>>> [mktplinkfw] *** error: kernel image is too big. Max[1572352] kerne= l img [2000794] >>>> >>>> ugh. Need to trim more. I'll see if I can find time this week to che= ck >>>> where/what we can trim. >>> >>> Randomly disabled a ton of things and then I could create small enoug= h >>> kernel. I'm not even sure if things will actually work. >>> >>> We've grown too big, it seems :-( >>> >>> Diffs against -head. >>> >>> Index: sys/mips/conf/TP-WN1043ND >>> =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 >>> --- sys/mips/conf/TP-WN1043ND (revision 271137) >>> +++ sys/mips/conf/TP-WN1043ND (working copy) >>> @@ -16,7 +16,7 @@ >>> options AR71XX_REALMEM=3D32*1024*1024 >>> >>> # i2c GPIO bus >>> -device gpioiic >>> +#device gpioiic >>> device iicbb >>> device iicbus >>> device iic >>> @@ -28,7 +28,7 @@ >>> device rtl8366rb >>> >>> # read MSDOS formatted disks - USB >>> -options MSDOSFS >>> +#options MSDOSFS >>> >>> # Enable the uboot environment stuff rather then the >>> # redboot stuff. >>> @@ -57,3 +57,29 @@ >>> nooptions WITNESS_SKIPSPIN >>> nooptions DEBUG_REDZONE >>> nooptions DEBUG_MEMGUARD >>> + >>> +nooptions DDB >>> +nooptions KDB >>> +nooptions ALQ >>> +nooptions HWPMC_HOOKS >>> +nodevice hwpmc >>> +nodevice hwpmc_mips24k >>> +nooptions INET6 #InterNETworking >>> + >>> +nooptions ATH_DEBUG >>> +nooptions AH_DEBUG >>> +nooption AH_DEBUG_ALQ >>> +nooptions IEEE80211_DEBUG >>> +nooptions IEEE80211_SUPPORT_MESH >>> +nooptions IEEE80211_SUPPORT_TDMA >>> +nooptions IEEE80211_ALQ # 802.11 ALQ logging support >>> + >>> +nodevice usb >>> +nooptions USB_EHCI_BIG_ENDIAN_DESC >>> +nooptions USB_DEBUG >>> +nooptions USB_HOST_ALIGN >>> +nodevice umass >>> +nodevice ehci >>> + >>> +nodevice gpio >>> +nodevice gpioled >>> >> I could've done it myself, but I need usb and GPIO is required for usb= , >> so that needs to stay. That said, I removed PSEUDOFS (I don't need >> /proc) and some of what you mailed, so now it's smaller, but still too= >> large (1682325). Here are the contents (still on releng/10.0) >> # Force the board memory - 64mb >> options AR71XX_REALMEM=3D64*1024*1024 >> >> makeoptions INLINE_LIMIT=3D768 >> nomakeoptions DEBUG >> nomakeoptions ALQ >> nooptions INET6 >> options NO_SWAPPING >> nooptions HWPMC_HOOKS >> nodevice hwpmc >> nodevice hwpmc_mips24k >> nooptions USB_DEBUG >> nooptions IEEE80211_DEBUG >> nooptions PSEUDOFS >> nooptions ATH_DEBUG >> nooptions AH_DEBUG >> nooption AH_DEBUG_ALQ >> nooptions IEEE80211_SUPPORT_MESH >> nooptions IEEE80211_SUPPORT_TDMA >> nooptions IEEE80211_ALQ # 802.11 ALQ logging support >> >> # i2c GPIO bus >> device gpioiic >> device iicbb >> device iicbus >> device iic >> >> # ethernet switch device >> device etherswitch >> >> # RTL8366RB support >> device rtl8366rb >> >> # Enable the uboot environment stuff rather then the >> # redboot stuff. >> options AR71XX_ENV_UBOOT >> >> # uncompress - to boot natively from flash >> device geom_uncompress >> options GEOM_UNCOMPRESS >> >> # Used for the static uboot partition map >> device geom_map >> >> # Boot off of the rootfs, as defined in the geom_map setup. >> options ROOTDEVNAME=3D\"ufs:map/rootfs.uncompress\" >> >> # We bite the performance overhead for now; the kernel won't >> # fit if the mutexes are inlined. >> options MUTEX_NOINLINE >> options RWLOCK_NOINLINE >> options SX_NOINLINE >> >> # Remove everything we don't need. We need a _really_ small kernel! >> nooptions INVARIANTS >> nooptions INVARIANT_SUPPORT >> nooptions WITNESS >> nooptions WITNESS_SKIPSPIN >> nooptions DEBUG_REDZONE >> nooptions DEBUG_MEMGUARD >> nooptions DDB >> nooptions KDB >> >> It doesn't need to be much smaller now, but what made it so large? Why= >> did it work a year ago with 10.0-CURRENT? Since 10.0-RELEASE is too >> large and there are working images with 10.0-CURRENT from August 2013 = at >> http://www.strugglingcoder.info/pkgs/TP-WN1043ND.factory.bin (it seems= >> to be actually generated by you), something must have happened then a= nd >> later, when CURRENT went up to 11. >=20 > "More code" happened :-) >=20 > This clearly is not a good sign. I'll try to spend some time to narrow > the source down. > We _should_ at least be able to "not-include" that portion. >=20 > cheers, > Hiren >=20 Since I'm going to anyway run it with a pendrive, isn't it possible to install only /boot to flash and the rest of rootfs to that pendrive? That would make it possible for the kernel to have a bigger size. --TMgugTGdpJhsSdODitcvga7fSPhbQULiM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJUC0ebAAoJEC9nKukRsfY+HtQP/3k+7zTUfxXP/FDkfFmzx6v0 s9Qr1RSkE54PGGS2aL0gPYtH4RSfXZCYH78x60i//cILfVB2gTQVN1iw5MoMnBO5 2kkliguTzYqxFdXlw7tza2+weyvCEN70QwQpvKd1sTQuns2+S2kaVzd81ZPnqV68 JlW4N3xAkFEFrhhROe/N848jzv0WVvDXxxXcEUWxVQ4nFcHbdihfIgB732qMenu3 7QPffgTU6bIH6WZJig3shBDIqqcseTMFKYMtT8XfXTa2Q5OFA/LIqXoo7vtVCOsK mH9X7qpBdarVraX9T/84Wqbx+hiEeMJNIkOwIdXn8sIEtB4PrIEiQ1Y4relmcACV TFfslcv1k7l/0+OBo12S15K0iXNZWTBky1xLpx8zvO9d6lGECXU8iMHUIL+zMnmO FDaGtd0AokBoMOUQik/bTbtraNuiFBy4xrhq7nIjkY55bWd0VZa3qrfCgkCdfK9w MD4ur9YULTizs7N1BLw320KFitW2LqLjiZJKgv8dUCas+laXJDGN6+u5F+e9YbcD MIsDEG53pnKbLdRu9Uk/4UcxEGEQbpkz/KVWzhwThlzcLayISeMFxUWpm2xx9RfJ wKiih3DgP0mtz0xI835zVtu5QOatmjfRe1YyYvd6+YboimfXgQ7404qParkYg6co Sk0tMJqCxKzDNXmVpV3s =V4SJ -----END PGP SIGNATURE----- --TMgugTGdpJhsSdODitcvga7fSPhbQULiM--