From owner-freebsd-small@FreeBSD.ORG Mon Jun 9 11:02:15 2008 Return-Path: Delivered-To: freebsd-small@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EE19106567A for ; Mon, 9 Jun 2008 11:02:15 +0000 (UTC) (envelope-from rajkumars@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id 63E088FC25 for ; Mon, 9 Jun 2008 11:02:13 +0000 (UTC) (envelope-from rajkumars@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so1024299ywe.13 for ; Mon, 09 Jun 2008 04:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=TlCY4wrbmypfzP9IMpBzdeugunFUKBn3lOp2J0aTRH4=; b=cvWIl/yWBUKGGJixfVlWUo2P7L9ZJ/KXAUlq6d63aogB/WwKBEaUiWx5d2WCrtdL4g wT/9r9R3PnhD6ncYr2xawYFNKHE8DLvP5vMBu/v5kKCWrLKpYWroCOthh865NeeL+VEy GOo+x/iI5f6z2vXcIBAIG1Pj8Ft9aWuYeIvgQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=WNoNHkra/MwFXo7/1NMW1IYdwbAwBwzofBvtb3vyyocB8vzC9GrqEP7l2aEUZ+2mUZ NFdOWraKtPKqQimrafyOvIBMExSGGqAIxaymySfxKdNgE+CL0Vwmirck33ouz64BToJR ZUBU04MIA2UVBYMhLyHwedYA7cFzeQ5eEQsN4= Received: by 10.151.42.9 with SMTP id u9mr6124550ybj.83.1213009328242; Mon, 09 Jun 2008 04:02:08 -0700 (PDT) Received: by 10.150.190.8 with HTTP; Mon, 9 Jun 2008 04:02:08 -0700 (PDT) Message-ID: <64de5c8b0806090402r3ae692bbif265d49815d1cc5a@mail.gmail.com> Date: Mon, 9 Jun 2008 16:32:08 +0530 From: "Rajkumar S" To: freebsd-small@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Trimming down FreeBSD X-BeenThere: freebsd-small@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2008 11:02:15 -0000 Hi, I am testing with NanoBSD with configuration appended at end of this mail. Currently the image is about 68M. When I checked there are about 11M in /usr/include, and another 11M in /usr/share/. in that 2.5M /usr/share/groff_font, 1.5M /usr/share/examples etc could be trimmed. Which options needs to be given to remove these directories from the build? Does't NO_TOOLCHAIN take care of /usr/include ? with regards, raj My current build configs are: NANO_NAME=custom NANO_SRC=/usr/src NANO_KERNEL=MYCONF NANO_IMAGES=2 CONF_BUILD=' ' CONF_INSTALL=' ' CONF_WORLD=' NO_ATM=YES NO_BIND=YES NO_BIND_DNSSEC=YES NO_BIND_ETC=YES NO_BIND_LIBS_LWRES=YES NO_BIND_MTREE=YES NO_BIND_NAMED=YES NO_BIND_UTILS=YES NO_BLUETOOTH=YES NO_CVS=YES NO_DICT=YES NO_FORTRAN=YES NO_GAMES=YES NO_GCOV=YES NO_GDB=YES NO_GPIB=YES NO_HESIOD_LIBC=YES NO_HTML=YES NO_I4B=YES NO_INFO=YES NO_IPFILTER=YES NO_KERBEROS=YES NO_KLDLOAD=YES NO_LPR=YES NO_MAILWRAPPER=YES NO_MAN=YES NO_MODULES=YES NO_NIS=YES NO_OBJC=YES NO_P1003_1B=YES NO_PAM=YES NO_PROFILE=YES NO_TOOLCHAIN=YES NO_USB=YES NO_VINUM=YES NO_SENDMAIL=YES NO_SHAREDOCS=YES NO_RESCUE=YES IPFIREWALL_DEFAULT_TO_ACCEPT=yes IP6FIREWALL_DEFAULT_TO_ACCEPT=yes ' FlashDevice SanDisk 1G cust_nobeastie() ( touch ${NANO_WORLDDIR}/boot/loader.conf echo "beastie_disable=\"YES\"" >> ${NANO_WORLDDIR}/boot/loader.conf ) customize_cmd cust_comconsole customize_cmd cust_install_files customize_cmd cust_allow_ssh_root customize_cmd cust_nobeastie From owner-freebsd-small@FreeBSD.ORG Mon Jun 9 15:03:53 2008 Return-Path: Delivered-To: freebsd-small@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E4AE1065671 for ; Mon, 9 Jun 2008 15:03:53 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id C90508FC1D for ; Mon, 9 Jun 2008 15:03:52 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id m59F3nbT004693; Mon, 9 Jun 2008 23:03:49 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id m59F3mvu004691; Mon, 9 Jun 2008 23:03:48 +0800 (KRAST) (envelope-from eugen) Date: Mon, 9 Jun 2008 23:03:48 +0800 From: Eugene Grosbein To: Rajkumar S Message-ID: <20080609150348.GA3421@svzserv.kemerovo.su> References: <64de5c8b0806090402r3ae692bbif265d49815d1cc5a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <64de5c8b0806090402r3ae692bbif265d49815d1cc5a@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-small@freebsd.org Subject: Re: Trimming down FreeBSD X-BeenThere: freebsd-small@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2008 15:03:53 -0000 On Mon, Jun 09, 2008 at 04:32:08PM +0530, Rajkumar S wrote: > I am testing with NanoBSD with configuration appended at end of this > mail. Currently the image is about 68M. When I checked there are about > 11M in /usr/include, and another 11M in /usr/share/. in that 2.5M > /usr/share/groff_font, 1.5M /usr/share/examples etc could be > trimmed. Which options needs to be given to remove these directories > from the build? Does't NO_TOOLCHAIN take care of /usr/include ? Just make another custom script or function that removes what you do not need. I use following commands to trim both base system and files installed with packages by scripts called earlier. Thus, NanoBSD plus 12 installed packages occupied 48Mb only. cd "$NANO_WORLDDIR" rm -rf usr/include/* usr/lib/*.a \ usr/share/examples/* \ usr/share/misc/pcvtfonts/* usr/share/syscons/fonts/* \ usr/share/syscons/keymaps/* usr/share/info/* \ usr/local/etc/joe/doc/* usr/local/etc/joe/*.dist \ usr/local/include/* usr/local/info/* usr/local/lib/*.a \ usr/local/man/* \ usr/local/share/aclocal/* usr/local/share/doc/* \ usr/local/share/examples/* usr/local/share/info/* \ usr/local/share/mc/syntax/* usr/local/share/mc/mc.hlp.* # prevent Midnight Commander (installed via package) from complaining touch usr/local/share/mc/syntax/Syntax # Remove all locale data except of Russian that I use find usr/local/share/locale -maxdepth 1 | fgrep -v ru | xargs rm -rf # replace binary /usr/sbin/nologin with small shell script # that runs under 'sh -p' and says 'This account is currently not available' ln -f -s /usr/local/nologin usr/sbin/nologin # remove largest binaries I never use cd usr/bin rm -f openssl vi ex view nvi nex nview make makeinfo info vacation cd ../sbin rm -f iasl acpidb hostapd amd wpa_supplicant # EOF Eugene Grosbein