Date: Fri, 05 Sep 2014 21:15:42 +0200 From: Piotr Kubaj <pkubaj@riseup.net> To: hiren panchasara <hiren@freebsd.org> Cc: freebsd-mips@freebsd.org Subject: Re: WR1043ND - too big kernel Message-ID: <540A0BDE.6040605@riseup.net> In-Reply-To: <CALCpEUEZH3RtBioJ4aWcwvvHiRm1Q_rrs4mXB320g0OgHJ%2BTWw@mail.gmail.com> References: <5408BB36.5060409@riseup.net> <5408BE6A.4050500@riseup.net> <5408CE14.2090809@riseup.net> <CALCpEUHK3aDv0b8FVafqwSOEzEdO16rdF7Oim2U3GcYw79yjgA@mail.gmail.com> <CALCpEUFPhZxsfwcQj3vZGVGfUEVNgvZBQR5oAxd%2BOm4Un14YNQ@mail.gmail.com> <CALCpEUEZH3RtBioJ4aWcwvvHiRm1Q_rrs4mXB320g0OgHJ%2BTWw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Q6eh5bIqT86sdb47ik7ocAhfK7dTwFLSN Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/05/2014 19:59, hiren panchasara wrote: > On Thu, Sep 4, 2014 at 2:27 PM, hiren panchasara <hiren@freebsd.org> wr= ote: >> On Thu, Sep 4, 2014 at 1:44 PM, hiren panchasara <hiren@freebsd.org> w= rote: >>> On Thu, Sep 4, 2014 at 1:39 PM, Piotr Kubaj <pkubaj@riseup.net> wrote= : >>>> Adding following lines to kernel config shrinks size to 1750991 (on >>>> 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] kernel = img [2000794] >> >> ugh. Need to trim more. I'll see if I can find time this week to check= >> where/what we can trim. >=20 > Randomly disabled a ton of things and then I could create small enough > kernel. I'm not even sure if things will actually work. >=20 > We've grown too big, it seems :-( >=20 > Diffs against -head. >=20 > 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 >=20 > # i2c GPIO bus > -device gpioiic > +#device gpioiic > device iicbb > device iicbus > device iic > @@ -28,7 +28,7 @@ > device rtl8366rb >=20 > # read MSDOS formatted disks - USB > -options MSDOSFS > +#options MSDOSFS >=20 > # 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 >=20 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 and later, when CURRENT went up to 11. --Q6eh5bIqT86sdb47ik7ocAhfK7dTwFLSN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJUCgveAAoJEC9nKukRsfY+9M0P/3WyykkVCT2CRpu/nTXzI+od 99dQhOATVCl6fJXoRi3WsHMhKR49LfHLr68/sqOS0uWLt/Wzl6RIo6CaHSmMTRk5 F2XldcG+ZMHCGJauhzp8RJN/Hayk6X12EfM5fN5a41mgJn2BcXTdbfF1o1DppoKS 9YMSsn3lL0098Ga6FTEwYAiFhG8ml4vcPV6xVVaDBO0VLUwAQDph4Xj3QZzv9HHJ C+KYmvsc4S1YTxl+ybjGGREfgArYIFAvdXKfb68LS0Lk9StF5g/eedCS9I1hdIe+ YFaKevtUsTJy3g+cjOLSaePITOHqTDCdFzqMJee8pzlqp/l2ZUzBl9/qXOYVpyhq 1cOS8adVIlHeLPGjFViRo37JHiu8MHC9ffPAIgU7p6SnR6+MyamLMyN+czyd7TBq qkDptK+OiCqIchTzY5fmjNAaMlmrscBq7XUKJIArnISPfIi3d+J+mLjZGTWtl63Q zfMEZyHO6t3asii0gAovBCFGuuhbcfWgs28ol2qaxymCRjTHvbJRbG5PHjv/cqW6 d4mVA9doNxm0RJLTCORd30yiYTSyNLtOBOQcIqvZ6lo2Rl4bsbNxSSHjY+oC1es/ I4pkALSuQ1/BfBcs2XdCNRRQefOuUA/wSXK8QFjE7Qj9GJZNYu78anCMmXH98lSQ AAyR1tni1OnKir4/NheD =Zq3g -----END PGP SIGNATURE----- --Q6eh5bIqT86sdb47ik7ocAhfK7dTwFLSN--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?540A0BDE.6040605>