Subject: NetBSD/evbarm kernel size issue
To: None <port-arm@netbsd.org>
From: Tonnerre LOMBARD <tonnerre@bsdprojects.net>
List: port-arm
Date: 02/24/2006 10:27:41
--JefYhWJ8RkX3aR0a
Content-Type: multipart/mixed; boundary="GcSOTaE82DYSpZPK"
Content-Disposition: inline


--GcSOTaE82DYSpZPK
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline

Salut,

I have to build a kernel for a Linksys NSLU2. I'm crossbuilding NetBSD
3.0_STABLE from NetBSD/alpha 2.1. I used the IXDP425 config as a template,
and minimized the involved components until nothing was left that I could
have taken away.

Still, the kernel image is 1.7M unstripped, or 1.4M stripped. However,
the maximum size of a kernel image on the flash is 1048560 bytes, due
to the initrd offset which starts right after that.

Also, I am not really sure whether such a minimalist kernel deserves to be
that large.

Config appended.

Ideas?

				Tonnerre

--GcSOTaE82DYSpZPK
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename=NSLU2

#	$NetBSD: IXDP425,v 1.10.2.1 2005/07/18 21:12:55 riz Exp $
#
#	IXDP425 -- Intel IXDP425/IXCDP1100 Development Platform
#

include	"arch/evbarm/conf/std.ixdp425"

#options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary

# estimated number of users

maxusers	4

# Standard system options

options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
#options 	NTP		# NTP phase/frequency locked loop

# CPU options

# For XScale systems
options 	CPU_XSCALE_IXP425	# Support the XScale core
makeoptions	CPUFLAGS="-mcpu=xscale"

# Architecture options
options 	XSCALE_CACHE_READ_WRITE_ALLOCATE
#options 	HZ=512

# Board Type
makeoptions	BOARDTYPE="ixdp425"
options 	EVBARM_BOARDTYPE=ixdp425

# File systems

file-system	FFS		# UFS
#file-system	LFS		# log-structured file system
#file-system	MFS		# memory file system
file-system	NFS		# Network file system
#file-system 	ADOSFS		# AmigaDOS-compatible file system
#file-system 	EXT2FS		# second extended file system (linux)
#file-system	CD9660		# ISO 9660 + Rock Ridge file system
#file-system	MSDOSFS		# MS-DOS file system
file-system	FDESC		# /dev/fd
file-system	KERNFS		# /kern
#file-system	NULLFS		# loopback file system
#file-system	PORTAL		# portal filesystem (still experimental)
#file-system	PROCFS		# /proc
#file-system	UMAPFS		# NULLFS + uid and gid remapping
#file-system	UNION		# union file system

# File system options
#options 	QUOTA		# UFS quotas
options 	FFS_EI		# FFS Endian Independant support
#options 	NFSSERVER
#options 	SOFTDEP
#options 	FFS_NO_SNAPSHOT	# ffs snapshots

# Networking options

#options 	GATEWAY		# packet forwarding
options 	INET		# IP + ICMP + TCP + UDP
#options 	INET6		# IPV6
#options 	IPSEC		# IP security
#options 	IPSEC_ESP	# IP security (encryption part; define w/ IPSEC)
#options 	IPSEC_NAT_T	# IPsec NAT traversal (NAT-T)
#options 	IPSEC_DEBUG	# debug for IP security
#options 	MROUTING	# IP multicast routing
#options 	PIM		# Protocol Independent Multicast
#options 	NS		# XNS
#options 	NSIP		# XNS tunneling over IP
#options 	ISO,TPIP	# OSI
#options 	EON		# OSI tunneling over IP
#options 	CCITT,LLC,HDLC	# X.25
#options 	NETATALK	# AppleTalk networking
#options 	PFIL_HOOKS	# pfil(9) packet filter hooks
#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
#options 	PPP_DEFLATE	# Deflate compression support for PPP
#options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
#options 	TCP_DEBUG	# Record last TCP_NDEBUG packets with SO_DEBUG

#options 	NFS_BOOT_BOOTP
options 	NFS_BOOT_DHCP
#options 	NFS_BOOT_BOOTPARAM

# Compatibility options

#options 	COMPAT_43	# 4.3BSD compatibility.
#options 	COMPAT_20	# NetBSD 2.0 compatibility.
#options 	COMPAT_16	# NetBSD 1.6 compatibility.
#options 	COMPAT_15	# NetBSD 1.5 compatibility.
#options 	COMPAT_14	# NetBSD 1.4 compatibility.
#options 	COMPAT_13	# NetBSD 1.3 compatibility.
#options 	COMPAT_12	# NetBSD 1.2 compatibility.
#options 	COMPAT_11	# NetBSD 1.1 compatibility.
#options 	COMPAT_10	# NetBSD 1.0 compatibility.
#options 	COMPAT_09	# NetBSD 0.9 compatibility.
#options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
#options	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.

# Shared memory options

options 	SYSVMSG		# System V-like message queues
options 	SYSVSEM		# System V-like semaphores
#options 	SEMMNI=10	# number of semaphore identifiers
#options 	SEMMNS=60	# number of semaphores in system
#options 	SEMUME=10	# max number of undo entries per process
#options 	SEMMNU=30	# number of undo structures in system
options 	SYSVSHM		# System V-like memory sharing
options 	SHMMAXPGS=1024	# 1024 pages is the default

# Device options

#options 	MEMORY_DISK_HOOKS	# boottime setup of ramdisk
#options 	MEMORY_DISK_ROOT_SIZE=3400	# Size in blocks
#options 	MEMORY_DISK_IS_ROOT	# use memory disk as root

# Console options.  The default console is speed is 115200 baud.
options 	CONSPEED=115200		# Console speed
options 	CONUNIT=0		# Console port number

# Miscellaneous kernel options
#options 	KTRACE		# system call tracing, a la ktrace(1)
#options 	IRQSTATS	# manage IRQ statistics
#options 	LKM		# loadable kernel modules
#options 	KMEMSTATS	# kernel memory statistics
#options 	SCSIVERBOSE	# Verbose SCSI errors
#options 	PCIVERBOSE	# Verbose PCI descriptions
#options 	MIIVERBOSE	# Verbose MII autoconfuration messages
#options 	PCI_CONFIG_DUMP	# verbosely dump PCI config space
#options 	DDB_KEYCODE=0x40
#options 	USERCONF	# userconf(4) support
#options	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
#options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel

# Development and Debugging options

#options 	PERFCTRS	# performance counters
#options 	DIAGNOSTIC	# internally consistency checks
#options 	DEBUG
#options 	PMAP_DEBUG	# Enable pmap_debug_level code
#options 	IPKDB		# remote kernel debugging
#options 	VERBOSE_INIT_ARM # verbose bootstraping messages
#options 	DDB		# in-kernel debugger
#options 	DDB_HISTORY_SIZE=100	# Enable history editing in DDB
#makeoptions	DEBUG="-g"	# compile full symbol table
#options 	SYMTAB_SPACE=260000

#config		netbsd		root on ? type ?
config		netbsd		root on ? type nfs

# The main bus device
mainbus0	at root

# The boot cpu
cpu0		at mainbus?

# IXP425 slow peripheral
ixpsip0		at mainbus?

#Timer
ixpclk*		at ixpsip? addr 0xc8005000 size 0x30

# Status LEDs
ixdpled*	at ixpsip? addr 0x52000000 size 0x1000

# On-board device support
com0		at ixpsip? addr 0xc8000000 size 0x1000 index 0
com1		at ixpsip? addr 0xc8001000 size 0x1000 index 1

# IXP425 fast bus
ixpio0		at mainbus?

# PCI bus
pci0		at ixpio? bus ?

#
# Networking devices
#
#an*	at pci? dev ? function ?	# Aironet PC4500/PC4800 (802.11)
#bge*	at pci? dev ? function ?	# Broadcom 570x gigabit Ethernet
#en*	at pci? dev ? function ?	# ENI/Adaptec ATM
#ep*	at pci? dev ? function ?	# 3Com 3c59x
#epic*	at pci? dev ? function ?	# SMC EPIC/100 Ethernet
#esh*	at pci? dev ? function ?	# Essential HIPPI card
#ex*	at pci? dev ? function ?	# 3Com 90x[BC]
#fpa*	at pci? dev ? function ?	# DEC DEFPA FDDI
fxp*	at pci? dev ? function ?	# Intel EtherExpress PRO 10+/100B
#gsip*	at pci? dev ? function ?	# NS83820 Gigabit Ethernet
#le*	at pci? dev ? function ?	# PCnet-PCI Ethernet
#lmc*	at pci? dev ? function ?	# Lan Media Corp SSI/HSSI/DS3
#mtd*	at pci? dev ? function ?	# Myson MTD803 3-in-1 Ethernet
#ne*	at pci? dev ? function ?	# NE2000-compatible Ethernet
#ntwoc*	at pci? dev ? function ?	# Riscom/N2 PCI Sync Serial
#pcn*	at pci? dev ? function ?	# AMD PCnet-PCI Ethernet
#rtk*	at pci? dev ? function ?	# Realtek 8129/8139
#sf*	at pci? dev ? function ?	# Adaptec AIC-6915 Ethernet
#sip*	at pci? dev ? function ?	# SiS 900/DP83815 Ethernet
#ste*	at pci? dev ? function ?	# Sundance ST-201 Ethernet
#stge*	at pci? dev ? function ?	# Sundance/Tamarack TC9021 Gigabit
#ti*	at pci? dev ? function ?	# Alteon ACEnic gigabit Ethernet
#tl*	at pci? dev ? function ?	# ThunderLAN-based Ethernet
#tlp*	at pci? dev ? function ?	# DECchip 21x4x and clones
#vr*	at pci? dev ? function ?	# VIA Rhine Fast Ethernet
#wi*	at pci? dev ? function ?	# Intersil Prism Mini-PCI (802.11b)
wm*	at pci? dev ? function ?	# Intel 82543/82544 gigabit

# MII/PHY support
#acphy*	at mii? phy ?			# Altima AC101 and AMD Am79c874 PHYs
#amhphy*	at mii? phy ?		# AMD 79c901 Ethernet PHYs
#bmtphy*	at mii? phy ?		# Broadcom BCM5201 and BCM5202 PHYs
#brgphy*	at mii? phy ?		# Broadcom BCM5400-family PHYs
#dmphy*	at mii? phy ?			# Davicom DM9101 PHYs
#exphy*	at mii? phy ?			# 3Com internal PHYs
#gentbi*	at mii? phy ?		# Generic Ten-Bit 1000BASE-[CLS]X PHYs
#glxtphy* at mii? phy ?			# Level One LXT-1000 PHYs
#gphyter* at mii? phy ?			# NS83861 Gig-E PHY
#icsphy*	at mii? phy ?		# Integrated Circuit Systems ICS189x
inphy*	at mii? phy ?			# Intel 82555 PHYs
iophy*	at mii? phy ?			# Intel 82553 PHYs
#lxtphy*	at mii? phy ?		# Level One LXT-970 PHYs
#makphy*	at mii? phy ?		# Marvell Semiconductor 88E1000 PHYs
#nsphy*	at mii? phy ?			# NS83840 PHYs
#nsphyter* at mii? phy ?		# NS83843 PHYs
#pnaphy*	at mii? phy ?		# generic HomePNA PHYs
#qsphy*	at mii? phy ?			# Quality Semiconductor QS6612 PHYs
#sqphy*	at mii? phy ?			# Seeq 80220/80221/80223 PHYs
#tlphy*	at mii? phy ?			# ThunderLAN PHYs
#tqphy*	at mii? phy ?			# TDK Semiconductor PHYs
#urlphy*	at mii? phy ?		# Realtek RTL8150L internal PHYs
ukphy*	at mii? phy ?			# generic unknown PHYs

# Pseudo-Devices

# disk/mass storage pseudo-devices
#pseudo-device	md		1	# memory disk device (ramdisk)
#pseudo-device	vnd		4	# disk-like interface to files

# network pseudo-devices
pseudo-device	bpfilter	4	# Berkeley packet filter
pseudo-device	loop			# network loopback
#pseudo-device	kttcp			# network loopback

# miscellaneous pseudo-devices
pseudo-device	pty			# pseudo-terminals
pseudo-device	rnd			# /dev/random and in-kernel generator
pseudo-device	clockctl		# user control of clock subsystem
pseudo-device	ksyms			# /dev/ksyms

# data mover pseudo-devices
#pseudo-device	swdmover		# softare dmover(9) back-end
#pseudo-device	dmoverio		# /dev/dmover dmover(9) interface

--GcSOTaE82DYSpZPK--

--JefYhWJ8RkX3aR0a
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (NetBSD)

iQIVAwUBQ/7Rje1mMGan/TnWAQJsYxAAlx1dvbxygix9WJoR2dDj/sImcQ2D2N8d
DScIFgv6TblTJHLs04OoZpon1X2Qbp+CPSsLlKReXu0YaOzchTFTgabW9DS3bqF2
vF9oFT11MFdG+6tNFu4h1xhHHphIuYkzAIMrW1o65ATdgv4RXql8vRKQZp6J+HAN
f5NDP8lhTGqXHjBjz1WbK/YEc0zrMEkvcQ7bS96ituKWWBF0PyxBr6iYNxls80TD
aJ/8aVD1ranlUfAiVL0ytkHU+aZ5fYGcje/CIfDHMG9cIFm+CAy3GKA38CtxCYX5
xfS5aoQLdlBFB7GtALafsXkNvdUi4CMzkI9Y+IVte6gF9fuVs1xR9Wj8fw/+n9U8
QDhbC+EXe1wtrBMRUk487fbUrm31hYQqiXjESzZgVWxRMUoYoP0llMraBdRHdM5O
BrQYNFEPxh2h8k/gF6nqB3X9vEhi7kIeL6rS3xfgugoxZ5whm575Un+3kDS4DCCH
j+O4Nrbr9+PxFeDi8KLe8mdCYceXhV4BFFWdRgaCR5BxIAT6bV5vCE4WdKvYC75p
XPqGeVtChn/yaw+sCTV3RD/R49a8+2MFYkA2hlf0YVHJowP3fUlaRvT4xd6679xq
yrZaCvVZs2rMiGFY4nl/u/kaKyrFCZI5lt/N2H87vbS5Zimz0xvJXYy1ln1H6+Rw
NHgE5g9snqo=
=EQZP
-----END PGP SIGNATURE-----

--JefYhWJ8RkX3aR0a--