Home » FreeBSD » FreeBSD kernel compile (Tag: )

FreeBSD kernel compile

2012/06/29 20:54

FreeBSD を使い始めて 10 年以上経ちました。

初めて挑戦した頃のバージョンが 2.2.5 で、当時は Google 等の検索エンジンに頼ることも出来ないので、リンクを追いかけてドキュメントやコメントを見つけるか、書籍から少しずつ吸収してスキルアップを図りました。

FreeBSD との出会いがまた特殊で、私が当時出入りしていたチャットルームで仲良くなった大学生に細かく教えてもらったことがきっかけです。

インストールを紹介する書籍では、"カスタムモード" でインストールする方法はあまり見掛けたことはありませんが、教わったきっかけも関係しているのか、カスタムモードでしかインストールしたことがなく、kernel 再構築 は必ず行い続けてきました。

もちろん、バージョンが上がるにつれて kernel 再構築が必ずしも必要ではなくなることが増えてきたことも把握しています。

しかしながら、サービスで利用する機器は今でも必ず再構築して余分なデバイスやオプションはすべてカットし、シェイプアップした kernel を使用しています。GENERIC と比べれば 50 – 60% 程度のサイズと記憶しています。

ここでは、radserv 向けにカスタマイズした kernel conf ファイルを紹介します。(radserv X, radserv XG1+ 兼用 / i386 / 7.1-RELEASE)

#cpu		I486_CPU
#cpu		I586_CPU
cpu		I686_CPU
ident		radserv

# To statically compile in device wiring instead of /boot/device.hints
#hints		"GENERIC.hints"		# Default places to look for devices.

makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols

options 	SCHED_ULE		# ULE scheduler
options 	PREEMPTION		# Enable kernel thread preemption
options 	INET			# InterNETworking
options 	INET6			# IPv6 communications protocols
options 	SCTP			# Stream Control Transmission Protocol
options 	FFS			# Berkeley Fast Filesystem
options 	SOFTUPDATES		# Enable FFS soft updates support
options 	UFS_ACL			# Support for access control lists
options 	UFS_DIRHASH		# Improve performance on big directories
options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
options 	MD_ROOT			# MD is a potential root device
options 	NFSCLIENT		# Network Filesystem Client
options 	NFSSERVER		# Network Filesystem Server
options 	NFSLOCKD		# Network Lock Manager
options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
options 	MSDOSFS			# MSDOS Filesystem
options 	CD9660			# ISO 9660 Filesystem
options 	PROCFS			# Process filesystem (requires PSEUDOFS)
options 	PSEUDOFS		# Pseudo-filesystem framework
options 	GEOM_PART_GPT		# GUID Partition Tables.
options 	GEOM_LABEL		# Provides labelization
options 	COMPAT_43TTY		# BSD 4.3 TTY compat [KEEP THIS!]
options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
options 	KTRACE			# ktrace(1) support
options 	STACK			# stack(9) support
options 	SYSVSHM			# SYSV-style shared memory
options 	SYSVMSG			# SYSV-style message queues
options 	SYSVSEM			# SYSV-style semaphores
options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	ADAPTIVE_GIANT		# Giant mutex is adaptive.
options 	STOP_NMI		# Stop CPUS using NMI instead of IPI
options 	AUDIT			# Security event auditing
#options 	KDTRACE_HOOKS		# Kernel DTrace hooks

# To make an SMP kernel, the next two lines are needed
options 	SMP			# Symmetric MultiProcessor Kernel
device		apic			# I/O APIC

# CPU frequency control
device		cpufreq

options		SEMMAP=256
options		SEMMNI=256
options		SEMMNS=512
options		SEMMNU=256
options		SEMMSL=128
options		SEMOPM=128
options		SEMUME=64

options		SHMALL=32768
options		SHMMAXPGS=65536

options		IPFIREWALL
options		IPFIREWALL_VERBOSE

# Bus support.
#device		eisa
device		pci

# Floppy drives
device		fdc

# ATA and ATAPI devices
device		ata
device		atadisk		# ATA disk drives
device		ataraid		# ATA RAID drives
device		atapicd		# ATAPI CDROM drives
#device		atapifd		# ATAPI floppy drives
#device		atapist		# ATAPI tape drives
options 	ATA_STATIC_ID	# Static device numbering

# SCSI Controllers

# SCSI peripherals
device		scbus		# SCSI bus (required for SCSI)
device		da		# Direct Access (disks)
device		cd		# CD
device		pass		# Passthrough device (direct SCSI access)
device		ses		# SCSI Environmental Services (and SAF-TE)

# RAID controllers interfaced to the SCSI subsystem

# RAID controllers
device		aac		# Adaptec FSA RAID
device		aacp		# SCSI passthrough for aac (requires CAM)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc		# AT keyboard controller
device		atkbd		# AT keyboard
device		psm		# PS/2 mouse

device		kbdmux		# keyboard multiplexer

device		vga		# VGA video card driver

device		splash		# Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device		sc

#device		agp		# support several AGP chipsets

# Power management support (see NOTES for more options)
#device		apm
# Add suspend/resume support for the i8254.
device		pmtimer

# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support

# Serial (COM) ports
device		sio		# 8250, 16[45]50 based serial ports

# Parallel port

# If you've got a "dumb" serial or parallel PCI card that is
# supported by the puc(4) glue driver, uncomment the following
# line to enable it (connects to sio, uart and/or ppc drivers):
#device		puc

# PCI Ethernet NICs.
device		em		# Intel PRO/1000 Gigabit Ethernet Family

# PCI Ethernet NICs that use the common MII bus controller code.

# Pseudo devices.
device		loop		# Network loopback
device		random		# Entropy device
device		ether		# Ethernet support
#device		sl		# Kernel SLIP
#device		ppp		# Kernel PPP
device		tun		# Packet tunnel.
device		pty		# Pseudo-ttys (telnet etc)
device		md		# Memory "disks"
#device		gif		# IPv6 and IPv4 tunneling
#device		faith		# IPv6-to-IPv4 relaying (translation)
device		firmware	# firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device		bpf		# Berkeley packet filter

# USB support
device		uhci		# UHCI PCI->USB interface
device		ohci		# OHCI PCI->USB interface
device		ehci		# EHCI PCI->USB interface (USB 2.0)
device		usb		# USB Bus (required)
#device		udbp		# USB Double Bulk Pipe devices
device		ugen		# Generic
device		ukbd		# Keyboard
device		umass		# Disks/Mass storage - Requires scbus and da
device		ums		# Mouse

Random Select

朝日レストラン (18)
沖縄出張 (No. 34 – 朝日レストラン Part 1) の続きです。B (小) 150g 1 人分はすでに終わり、サービスメニュー 3 人分 900g のお肉がこれから焼かれます。ま
カベール岬 (5)
久高島 (No. 1 – 安座真港 〜 到着) の続きです。久高港に降りるとすぐ坂道があり、待合所やパーラー風な建物が見えます。自転車のレンタルにみな群がるので少し待ちそうだなと思った時、
ハッシュ・ド・ビーフ (2)
ハッシュ・ド・ビーフの作り方 (No. 1) 以降 4 回に分けて紹介した作り方で、今でも最低年に 1 回はたっぷり作って堪能しています。ゴールデンウィークに久しぶりに作ろうと、牛肩ロースブロック(豪
2014/10/10 払い戻し (2)
09/19 – 09/24 はプライベートでは長期滞在に入る沖縄旅行でした。その回とは別に、去年 10 月に伊江島を訪れて 沖縄本島 (No. 6 – 打ち上げ) したメンバー
ニライカナイそばセット
沖縄そばに限らず沖縄ご飯が食べたくなる衝動が続いていて、オフィスから歩いて 3 分程度の距離の すばや には日を空けずに 2 回続けて訪れました。すばや (野菜そば)すばや (タコライス)他にも同じ様
生姜焼き定食
My Select "日本一シリーズ" 第 4 弾で真打ち登場。日本一美味しい黒豚餃子 よりも前から、それこそ確実に 20 年近く通い続けている とちぎや をご紹介。一時期お茶の水
My Select (2013/05/20)
今日から 4 ヶ月振りの沖縄出張で 2 週間滞在します。05/01 から沖縄支店 (? てぃーだスクエア) で始まった てぃーだ社員食堂 に興味津々です。開始日からしばらくはブログや facebook
エクストラコールド
今年も エクストラコールド BAR が例年通りの場所で開催されていました。普段銀座に立ち寄る場所のすぐそばでもあります。この頃は平日は 17:00 からの開店と、外観も含めて例年通りでしたがふと気が付
bistro rose ♪
今日は "ハッシュ・ド・ビーフ" の作り方をご紹介。寸胴にデミグラスソース・ケチャップ・水を開けておく。量は 1:1:1.5 程度。水は多めにして、煮込んだ後 1:1:1 になれば
つけそば 並盛 + ちゃーしゅーごはん
景色 (しょうぶ沼公園) を久しぶりに散策した後は、北綾瀬駅そばの わた井 を訪れました。足立区のみでなく、東京全体でも高評価に入る口コミに興味を引かれ、何度か訪れたことがあります。メニューは至ってシ
Valid HTML5 Valid CSS3 Another HTML Lint