ReCompile Kernel FreeBSD

13 12 2006

recompile kernel?, awalnya sih…ngeri juga, takut kalo gagal hancur dech installasinya :D. Tapi mau nda mau beberapa hardware tidak berfungsi dengan baik. setelah baca-baca di manual freebsd ternyata, hal ini bertujuan untuk optimalisasi kernel, aktifin AGP, soundcard dan USB.

Selain itu juga untuk mengaktifkan fungsi-fungsi penting seperti Firewall dan masih banyak lagi. Memang ada cara lain selain melakukan recompile kernel secara manual. Untuk yg punya koneksi internet cepat, bisa dengan cara melakukan update source tree (CVSUP). Disini saya coba melakukan secara manual. alhamdulillah berhasil setelah awalnya rada khawatir juga ;))

  1. Copy source dari CD instalasi, bisa pake sysinstall, atau kalo males, pake aja command (FreeBSD Handbook):

# mount /cdrom
# mkdir -p /usr/src/sys
# ln -s /usr/src/sys /sys
# cat /cdrom/src/ssys.[a-d]* | tar -xzv

2. Edit konfigurasi kernel untuk aktifin beberapa driver.

# cd /usr/src/sys/i386/conf
# copy GENERIC KERNELMENDEM
# vi KERNELMENDEM

3. Pertama, saya cari jenis prosessor saya, caranya pake command:

# dmesg | head
Copyright (c) 1992-2005 The FreeBSD Project.

CPU: AMD Athlon(TM) XP 2000+ (1666.74-MHz 686-class CPU)
Origin = “AuthenticAMD” Id = 0×681 Stepping = 1

nah, tinggal ganti di konfigurasi kernel nya:

machine i386
#cpu I486_CPU
#cpu I586_CPU
cpu I686_CPU
ident KERNELMENDEM

kemudian aku hapus beberapa opsi device yang ngga dibutuhkan semacam SCSI controller, RAID controller, dan FireWire. Cuman aku sisain device SCSI peripherals, karena USB perlu opsi ini. Opsi USB yang aku sisain:

device scbus
device da
device pass
device uhci
device ohci
device usb
device umas

Buat display nya, aku biarin opsi:

device vga
device agp

Untuk aktifin soundcard, aku tambahin opsi:

device sound
device snd_via8233

snd_viaXXXX ini aku deteksi dari cara jalanin command:

# kldload snd_driver
# cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: at io 0xe000 irq 22 …

Kemudian aku cari opsinya di /usr/src/sys/conf/NOTES, ketemunya: snd_via8233
4. Compile kernelnya, dan install. jangan lupa, edit /etc/make.conf biar proses kompilasi cepat dan hasilnya optimal. Kalau filenya ngga ada, kopi aja dari /etc/defaults/make.conf, kemudian edit:

CPUTYPE=athlon-xp
CFLAGS= -O2 -pipe
COPTFLAGS= -O2 -pipe

(kutipan dari artikel “Optimising FreeBSD and it’s Kernel” by Avleen Vig)
5. Mulai compile hasil editan anda. Lakukan command:

# cd /usr/src
# make buildkernel KERNCONF=KERNELMENDEM

tunggu sampai selesai, bisa ditinggal ngopi, ngerokok atau nonton sinetron ;)). Kalau sudah selesai, tinggal install kernelnya.

# make installkernel KERNCONF=KERNELMENDEM

Langkah2 nya sudah semua, silahkan test kernel baru anda, silahkan reboot komputer anda. Deteksi hardware2 baru anda dengan command dmesg

Semoga berhasil


Actions

Informations

RSS feed | Trackback URI

Komentar »

Belum ada komentar.

Nama (wajib)
E-mail (required - never shown publicly)
URI
Komentar Anda (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Trackback responses to this post