Search This Blog


Compile Fedora 9 kernel

Fedora 9 installation does not install kernel source by default. Due to my cheap notebook sound chip is MagicMedia 256AV revision 20, in a HP OmniBook 4150, so far nobody successfully get it working in this notebook model. This cheap dual purpose audio and VGA chipset is used in several cheap HP notebook, Dell, and Sony as well. They are some sucess on those who use HP OmniBook 900, Dell and Sony, but all of them seem to encounter a lots of struggle in getting sound to work, internal mic, or external mic to work.

After 2 days of struggling in Google, and Yahoo, plus old info posted by people from Fedora 6, Debian, Fedora Forum, RedHat 5 Forum, etc. I have no success to get the sound working, except the chip is recognize as a valid PCI device (shown in lspci command).

With my knowledge of Linux since 1995 (Slackware), Fedora 3-9, digital interfacing, low level interfacing, computer architecture, and understanding of ALSA replacement of OSS sound layer, I believe it should starts from kernel source.


1. Get all necessary tools

$ yum install make m4 unifdef rpm-build glibc-2.8-8 glibc-devel-2.8-8 kernel-headers- glibc-headers-2.8-8 gcc-4.3.0-8 glibc-common-2.8-8 gcc-4.3.0-8 ncurses-devel

The version number is optional. yum will auto download latest version

I want to use GTK graphical menu to configure kernel options, so I will install additional modules:
$ yum install gtk2-devel libglade2-devel

It will:
Auto install: atk-devel, autoconf, automake, cairo-devel, docbook-style-dssssl, docbook-style-xsl, docbook-utils, glib2-devel, gtk-doc, imake, libXcomposite-devel, libXfixes-devel, libXi-devel, pango-devel, perl-SGMLSpm, pixman-devel
Auto update: glib2, gtk2, pango

2. Download source code

$ yumdownloader --source kernel
This will download kernel-, or current kernel that my Fedora 9 is using. File will be download into current directory

3. Create parent directories

$ mkdir -p /usr/src/redhat

4. Install kernal source codes into /usr/src

$ rpm -i kernel-

5. Build platform specify file. For my notebook, the platform is i686, which shown by command uname -m. It will uncompress files into /usr/src/redhat/BUILDS directory

$ rpmbuild -bp --target=$(uname -m) /usr/src/redhat/SPECS/kernel.spec

6. Configure using graphical interface
cd /usr/src/redhat/BUILD/kernel-2.6.25/linux-2.6.25.i686
make gconfig (if wants to use text base interface, then use "make menuconfig." It will needs ncurses-devel package to install, by using yum install ncurses-devel)

7. In the configuration, I select to embeded following 2 device driver into kernel
7.1. Cisco Aeronet 340 card wireless network card
7.2. NeoMagic Magic Media 256 AV sound card

8. Compile vmlinuz binary file
make bzImage

9. It will create file /usr/src/redhat/BUILD/kernel-2.6.25/linux-2.6.25.i686/arch/x86/boot/bzImage

10. Copy the file to here and call /boot/vmlinuz080830. I will use grub boot menu to load this kernel for testing instead of replacing old vmlinuz file

11. Continue to compile loadable modules. Due to my PC is a Intel Core 2 Duo quad core, I compile this in parallel while compiling bzImage file. This will takes longer than bzImage compilation due to it needs to compile many device drivers

make modules

12. Install modules into /lib/module using following command

make modules_install

13. To test this kernel, I reboot my PC. On the grub menu, I press space bar to stop the boot loader. Then I edit the boot command and replace the vmlinuz- as vmlinuz080830. Press "b" to boot using this option. If I like the kernel, then I will replace it in /boot directory, else I will compile again with different options
Update ALSA Files

yum install alsa-oss alsa-tools alsa-lib alsa-firmware alsa-mixergui alsa-plugins alsa-utils

Testing: /usr/bin/speaker-test, /usr/bin/alsa-info

No comments:

Blog Archive