# Minimize size of kernel executable



## freemason (Nov 6, 2012)

Hi all there!

I am just wondering how is it possible to make kernel 1-2 Meg in size as it is said in handbook. Now mine is still 5-6 Meg: without debug symbols, firmwares, extra filesystems, etc.

Here is whole config:

```
cpu I686_CPU

options SMP , SCHED_ULE , PREEMPTION , _KPOSIX_PRIORITY_SCHEDULING
options INET
options FFS , SOFTUPDATES , UFS_ACL , UFS_DIRHASH , GEOM_LABEL
options SYSVSHM , SYSVMSG , SYSVSEM
options PRINTF_BUFR_SIZE=128
options KBD_INSTALL_CDEV
options HWPMC_HOOKS
options ATA_CAM , ATA_STATIC_ID , SCSI_NO_OP_STRINGS , SCSI_DELAY=500
options IEEE80211_AMPDU_AGE , IEEE80211_SUPPORT_MESH
options SC_NO_SYSMOUSE , SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)

devices acpi , apic , cpufreq , pci , pmtimer
devices ahci , cd , ctl , da , scbus , pass
devices atkbdc , atkbd , psm
devices vga , sc
device firmware
devices bpf , loop , ether
devices miibus , re
device iwn
devices wlan , wlan_wep , wlan_ccmp , wlan_tkip , wlan_amrr
devices usb , ehci
devices sound , snd_hda
device random
```
What else can I remove from there?

Thanks.


----------



## SirDice (Nov 6, 2012)

I'm guessing it's an old part of the handbook, the kernel has grown considerably in the past few years.


----------



## freemason (Nov 7, 2012)

4.4 MB without wlan, sound and usb


----------

