Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2006 11:55:54 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        embedded@freebsd.org
Subject:   Compile time options vs size
Message-ID:  <20060724.115554.-957769887.imp@bsdimp.com>

next in thread | raw e-mail | index | archive | help
Thought everyone would like to see the differences that compile time
options make:

     text     data      bss       dec     hex filename
2,291,548   90,028   82,388 2,463,964  2598dc kernel.0
1,844,380   90,028   82,388 2,016,796  1ec61c kernel.1
1,813,953   89,896   82,376 1,986,225  1e4eb1 kernel.2
1,795,753   89,896   82,376 1,968,025  1e0799 kernel.3
1,735,352   87,208   82,280 1,904,840  1d10c8 kernel.4

kernel.0:
	No attempt to reduce size.
kernel.1:
	Added MUTEX_NOINLINE	(net savings is 447,168 bytes)
kernel.2:
	Added NO_FFS_SNAPSHOT	(net savings is 30,571 bytes)
kernel.3:
	Added NO_SYSCTL_DESCR	(net savings is 18,200 bytes)
kernel.4:
	Used only the phy that we have on the board
				(net savings is 63,185 bytes)

This was on a custom version of the KB920X config file for the
at91rm9200 based board of the same name.  I'm thinking of adding a
NO_NFS4 config variable.  This would save another 50-60k in size, I
think.  Of course, eliminating nfs altogheter would save another 100k,
but I need it to boot at the moment :-)

Anyway, I've just started looking at ways of making the kernel
smaller.  I thought I'd share them here.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060724.115554.-957769887.imp>