From owner-freebsd-embedded@FreeBSD.ORG Tue Oct 30 14:05:43 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97C0A88C for ; Tue, 30 Oct 2012 14:05:43 +0000 (UTC) (envelope-from jack.mclauren@yahoo.com) Received: from nm15-vm4.bullet.mail.ne1.yahoo.com (nm15-vm4.bullet.mail.ne1.yahoo.com [98.138.91.175]) by mx1.freebsd.org (Postfix) with ESMTP id B58038FC08 for ; Tue, 30 Oct 2012 14:05:42 +0000 (UTC) Received: from [98.138.90.57] by nm15.bullet.mail.ne1.yahoo.com with NNFMP; 30 Oct 2012 14:05:42 -0000 Received: from [98.138.89.252] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 30 Oct 2012 14:05:41 -0000 Received: from [127.0.0.1] by omp1044.mail.ne1.yahoo.com with NNFMP; 30 Oct 2012 14:05:41 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 983823.64192.bm@omp1044.mail.ne1.yahoo.com Received: (qmail 87738 invoked by uid 60001); 30 Oct 2012 14:05:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1351605941; bh=Xd/T0fC7ITQgilwTxVKUCmnL2QPJtH+Ms53AHQnFlO4=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=sPD+182cpR9y1kQ7HuD9+tv6pcKGYIhFg0ZGPXRtXYjyEuXpwEY8Tf0g5dIxYqI5tAx0U31Q7eNCja9wM9fRwiEOLeVfZ+xkc/u7vSFYwYK5bmzwuwDljp83sy+Lr0FbiSwd9FKxEOiEhxSEqKW/1dta0+d1zO18SMjmh6dSmVs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=xiCYif807iN+BH20sE5pqcOOT6Rjfl5Nw8VbQUos7/31+6XvWJwU2F8INxrWiVNjGE7ErjIMwPDHWDx/8XJOiKylxxvE0rmEKdFf+Vds9trIIucqLcdN3JbltvuCN3QntRjVImVdheeiMHp8cJzobhwLqhWKOz+dvTUN48NhAkw=; X-YMail-OSG: SeIxRBYVM1mH4ekJPz3a90jnX5ReMcb05rSOL.Z2Vip7gmg xc3dnN5gLm.rrsII5knlIpxLXLJvH3HOzTPER0pPEvMCuMTT3JIZN_h1knsz Zvrk5_Y.ixZLjgwW5w2QPCQStDqEbADHJ_vpzPtFYjwWhm_fezJPuITAaxE7 yx8j_ao4CP5vHvw1v1nSz1Hk3aQxAYZymmWbabj8pzAqxEn5Kyq0xhlv9_Xt XWXxR21_orMJqSx1v84bksuQ9yCMojhaS4.ZPHQPp6nEFjtLlmS6Ewa8Gz5c 6WwclcxzImz.AvXSZi7QvI6hsZnTzz91X.5Vx0kmD3bcGL4mmxiyx_EpLfaS OToFgbuTX45u1CiFylb49O3adLe8d1mcWkxT5YR1sp68arQ8Bl_ArTh_Zb_D TK7_7fzQyiNPR2Sim.uDSLPy0wLeItTarahIO8xct6jpvDggs1v0- Received: from [89.165.120.140] by web126002.mail.ne1.yahoo.com via HTTP; Tue, 30 Oct 2012 07:05:41 PDT X-Rocket-MIMEInfo: 001.001, SGVsbG8KCkRvZXMgY3VzdG9taXppbmcgKGNvbW1lbnRpbmcgdW51c2VkIGRldmljZXMgaW4gR0VORVJJQykga2VybmVsIGluIC91c3Ivc3JjL2FtZDY0L2NvbmYgY2F1c2UgbmFub2JzZCBpbWFnZSBnZXQgbGlnaHRlciA_PwEwAQEBAQ-- X-Mailer: YahooMailWebService/0.8.123.460 Message-ID: <1351605941.79450.YahooMailNeo@web126002.mail.ne1.yahoo.com> Date: Tue, 30 Oct 2012 07:05:41 -0700 (PDT) From: Jack Mc Lauren Subject: GENERIC kernel configuraion To: "freebsd-embedded@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jack Mc Lauren List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 14:05:43 -0000 Hello Does customizing (commenting unused devices in GENERIC) kernel in /usr/src/amd64/conf cause nanobsd image get lighter ?? From owner-freebsd-embedded@FreeBSD.ORG Tue Oct 30 14:50:35 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 973AAB17 for ; Tue, 30 Oct 2012 14:50:35 +0000 (UTC) (envelope-from freebsd@psconsult.nl) Received: from mx1.psconsult.nl (unknown [IPv6:2001:7b8:30f:e0::5059:ee8a]) by mx1.freebsd.org (Postfix) with ESMTP id 45D878FC0C for ; Tue, 30 Oct 2012 14:50:32 +0000 (UTC) Received: from mx1.psconsult.nl (mx1.hvnu.psconsult.nl [46.44.189.154]) by mx1.psconsult.nl (8.14.5/8.14.4) with ESMTP id q9UEoOMX017534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 30 Oct 2012 15:50:29 +0100 (CET) (envelope-from freebsd@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.5/8.14.4/Submit) id q9UEoOFc017533 for freebsd-embedded@freebsd.org; Tue, 30 Oct 2012 15:50:24 +0100 (CET) (envelope-from freebsd@psconsult.nl) X-Authentication-Warning: mx1.psconsult.nl: paul set sender to freebsd@psconsult.nl using -f Date: Tue, 30 Oct 2012 15:50:24 +0100 From: Paul Schenkeveld To: freebsd-embedded@freebsd.org Subject: Re: GENERIC kernel configuraion Message-ID: <20121030145024.GA16785@psconsult.nl> References: <1351605941.79450.YahooMailNeo@web126002.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1351605941.79450.YahooMailNeo@web126002.mail.ne1.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 14:50:35 -0000 On Tue, Oct 30, 2012 at 07:05:41AM -0700, Jack Mc Lauren wrote: > Hello > > Does customizing (commenting unused devices in GENERIC) kernel in /usr/src/amd64/conf cause nanobsd image get lighter ?? Here are two amd64 NanoBSD kernels I've archived: # ls -ls kernel1 kernel2 15 -r-xr-xr-x 1 root wheel 15572950 Apr 9 2012 kernel1 7 -r-xr-xr-x 1 root wheel 6921921 Jul 25 11:27 kernel1 # size kernel1 kernel2 text data bss dec hex filename 12011364 1331748 1137248 14480360 dcf3e8 kernel1 5155629 513459 637256 6306344 603a28 kernel2 The first one is FreeBSD 9.0, the second one FreeBSD 8.3 but 9.0 is not twice as big as 8.3. So yes, trimming /usr/src/amd64/conf can make a big difference! If memory is your constraint, trim the kernel as much as possible, don't forget to strip things like SCTP, NFS*, INET6, MAC etc. if you don't need them and leave "makeoptions DEBUG=-g" out too. If it's the size of your flash image you worry about, put in a line like makeoptions MODULES_OVERRIDE="" to not build/install kernel modules or include only those that you really need. /boot/kernel takes almost 50% of the space in a NanoBSD image with a generic kernel and all modules built. Another thing that can save a lot of space on your flash image is tuning CONF_WORLD, CONF_BUILD and CONF_INSTALL (see src/tools/build/options/ for an explanation of each option). This may take several iterations before you get it right though because sometimes it's not immediately visible which options are required by other ones (eg. if you build with INET6 enabled, you appear to need KVM and KVM_SUPPORT too). HTH Paul Schenkeveld