Re: [ANNOUNCE] 2.6.0-tiny1 tree for small systems

From: Willy Tarreau
Date: Sun Dec 28 2003 - 05:37:22 EST


On Sat, Dec 27, 2003 at 03:56:06PM -0600, Matt Mackall wrote:
> This is the second release of the -tiny kernel tree. The aim of this
> tree is to collect patches that reduce kernel disk and memory
> footprint as well as tools for working on small systems. Target users
> are things like embedded systems, small or legacy desktop folks, and
> handhelds.

Hi Matt,

This looks very interesting. I could produce a small "bloated" kernel
which I use for kexec and remote recovery on a VIA C3-based system :

text data bss dec hex filename
1328734 118955 52016 1499705 16e239 vmlinux

This was with gcc-3.3.1 which is more efficient than its predecessors
on -Os.

I changed -march=c3 to -march=i386, which generally gives me better
numbers :

text data bss dec hex filename
1287578 118955 52016 1458549 164175 vmlinux

=> this is 40 kB saved. I simply changed this :

--- ./arch/i386/Makefile Sun Dec 28 10:35:23 2003
+++ ./arch/i386/Makefile Sun Dec 28 11:16:10 2003
@@ -44,7 +44,7 @@
cflags-$(CONFIG_MWINCHIPC6) += $(call check_gcc,-march=winchip-c6,-march=i586)
cflags-$(CONFIG_MWINCHIP2) += $(call check_gcc,-march=winchip2,-march=i586)
cflags-$(CONFIG_MWINCHIP3D) += $(call check_gcc,-march=winchip2,-march=i586)
-cflags-$(CONFIG_MCYRIXIII) += $(call check_gcc,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
+cflags-$(CONFIG_MCYRIXIII) += -march=i386 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
cflags-$(CONFIG_MVIAC3_2) += $(call check_gcc,-march=c3-2,-march=i686)

CFLAGS += $(cflags-y)


So it might be interesting to have an option to drop back to the smallest
common arch during compilation. Note that this is not the same as choosing
i386 as the target system, since this kernel still has C3 features. Perhaps
the simplest and most portable way would be to create a new config entry
which would override default cflags ?

Cheers,
Willy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/