Pages

Showing posts with label Driver. Show all posts
Showing posts with label Driver. Show all posts

Monday, August 27, 2012

Drivers for Linux

You devices may be supported by extra kernel modules.
You can try to install kernel-modules-extra before searching a driver for your devices.

To install kernel-modules-extra
    yum install kernel-modules-extra

Reboot to take effect
    reboot

Tuesday, August 14, 2012

Compile A Kernel Module / Driver

To Install Kernel Header
yum install kernel-devel

To Install GCC
yum install gcc

<compile module source code>
make

<install your compiled module>
make install

To Generate module.dep for New Module
depmod

To Add New Module
modprobe module_name

PS: You may need to update initrd by mkinitrd for some boot devices.

Create Custom Linux Kernel

Download Kernel Source Code
    wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.5.1.tar.bz2

Extract Source Code
    tar jxvf linux-3.5.1.tar.bz2

Create Config with menuconfig
    cd linux-3.5.1

    (for full text mode)

    make menuconfig

    (for X window system)
    make xconfig

    (for GTK)
    make gconfig

PS: You can load .configuration from /usr/src/kernels/x.y.z/.config (current kernel)

Compile (4-parallel for multi-core CPU)
    make -j 4


Monday, July 30, 2012

Create Custom Linux Initrd

Extract from Initrd
gunzip < initrd.img | cpio -i --make-directories

Create Initrd
find ./ | cpio -H newc -o > initrd.cpio
gzip initrd.cpio
mv initrd.cpio.gz initrd.img




Create Initrd from System Folder
mkinitrd /boot/initrd.$(uname -r).img $(uname -r)