[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to build Fedora Core 3 linux kernel 2.6.9-1.681_FC3



 
    
how to build Fedora Core 3 linux kernel 2.6.9-1.681_FC3
-------------------------------------------------------

+ download and install kernel source:

[root@localhost SPECS]# pwd
/usr/src/redhat/SPECS

[root@localhost SPECS]# ls -al /tmp/kernel-2.6.9-1.681_FC3.src.rpm 
-rw-r--r--  1 root root 37592946 Nov 22 15:25 /tmp/kernel-2.6.9-1.681_FC3.src.rpm

[root@localhost SPECS]# rpm -ivh /tmp/kernel-2.6.9-1.681_FC3.src.rpm

+ untar source code and apply patches:

-bp	Executes  the  "%prep"  stage from the spec file. Normally this
	involves unpacking the sources and applying any patches.

[root@localhost SPECS]# rpmbuild -bp --target=i686 kernel-2.6.spec

+ with linuxtv dvb patches: 

I want to get my VisionPlus digital TV card DVB-T work, there is a problem with udev, dvb
devices can not be found under /dev directory.

[root@localhost linux-2.6.9]# pwd
/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9

[root@localhost linux-2.6.9]# patch -p1 < /usr/local/src/All-2.6.9-rc4.diff 

+ build it:

[root@localhost linux-2.6.9]# ls -al configs/*
-rw-r--r--  1 root root 51320 Dec 19 13:22 configs/kernel-2.6.9-i586.config
-rw-r--r--  1 root root 50722 Dec 19 13:22 configs/kernel-2.6.9-i586-smp.config
-rw-r--r--  1 root root 51266 Dec 19 13:22 configs/kernel-2.6.9-i686.config
-rw-r--r--  1 root root 50729 Dec 19 13:22 configs/kernel-2.6.9-i686-smp.config

[root@localhost linux-2.6.9]# cp configs/kernel-2.6.9-i686 .config

[root@localhost linux-2.6.9]# less Makefile 
...
EXTRAVERSION = -prep	# Give a unique name to your new Kernel
...

e.g: 

EXTRAVERSION = -1.681_FC3-dvb

[root@localhost linux-2.6.9]# make clean

[root@localhost linux-2.6.9]# make menuconfig

[root@localhost linux-2.6.9]# make

[root@localhost linux-2.6.9]# make modules_install

[root@localhost linux-2.6.9]# make install

[root@localhost linux-2.6.9]# cp .config /boot/config-2.6.9-1.681_FC3-dvb

[root@localhost linux-2.6.9]# cat /etc/grub.conf 
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.681_FC3-dvb)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-1.681_FC3-dvb ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.9-1.681_FC3-dvb.img
title Windows XP
        rootnoverify (hd1,0)
        chainloader +1
        map (hd0) (hd1)
        map (hd1) (hd0)
        # makeactive
title Fedora Core (2.6.9-1.681_FC3)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-1.681_FC3 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.9-1.681_FC3.img

you need upgrade to latest version of udev:

[root@localhost ~]# rpm -qa | grep udev
udev-039-10.FC3.6

add group "video":

[root@localhost permissions.d]# groupadd -g 102 video

add users into group video, add dvb device permission in /etc/udev/permission.d/50-udev.permissions

...
# DVB devices
dvb/adapter*:root:video:0660
...

[root@localhost linux-2.6.9]# cat /etc/modprobe.conf
...
## old version
# install dvb /sbin/modprobe --first-time videodev && { /sbin/modprobe bttv card=0x71 i2c_hw=1; /sbin/modprobe dvb-core; /sbin/modprobe v4l1-compat; /sbin/modprobe v4l2-common; /sbin/modprobe video-buf; /sbin/modprobe dst; /sbin/modprobe bt878; /sbin/modprobe dvb-bt8xx; /bin/true; }
# remove dvb { /sbin/modprobe -r dvb-bt8xx dst bt878 video-buf v4l2-common v4l1-compat dvb-core bttv videodev; }

## default: found by kudzu
alias char-major-81 bttv
## added on (Card No. 113, Twinhan DVB card)
options bttv i2c_hw=1 card=0x71
install bttv /sbin/modprobe --ignore-install bttv && /sbin/modprobe dvb-bt8xx && /sbin/modprobe dst
...

[root@localhost ~]# dmesg | less
...
Linux video capture interface: v1.00
bttv: driver version 0.9.15 loaded
bttv: using 8 buffers with 2080k (520 pages) each for capture
bttv: Bt8xx card found (0).
ACPI: PCI interrupt 0000:02:01.0[A] -> GSI 11 (level, low) -> IRQ 11
bttv0: Bt878 (rev 17) at 0000:02:01.0, irq: 11, latency: 32, mmio: 0xf6afe000
bttv0: detected: Twinhan VisionPlus DVB-T [card=113], PCI subsystem ID is 1822:0001
bttv0: using: Twinhan DST + clones [card=113,insmod option]
bttv0: gpio: en=00000000, out=00000000 in=00f96ffe [init]
bttv0: using tuner=4
tuner: Ignoring new-style parameters in presence of obsolete ones
bttv0: add subdevice "dvb0"
bt878: AUDIO driver version 0.0.0 loaded
bt878: Bt878 AUDIO function found (0).
ACPI: PCI interrupt 0000:02:01.1[A] -> GSI 11 (level, low) -> IRQ 11
bt878(0): Bt878 (rev 17) at 02:01.1, irq: 11, latency: 32, memory: 0xf6aff000
DVB: registering new adapter (bttv0).
bt878 find by dvb adap: checking "bt878 #0 [hw]"
dst_check_ci: recognize DTTDIG
DST type : terrestial TV
DST type flags :
xxx attach
DVB: registering frontend 0 (DST TERR)...
...

udev add dvb devices automatically in /dev directory:

[root@localhost ~]# find /dev/dvb
/dev/dvb
/dev/dvb/adapter0
/dev/dvb/adapter0/frontend0
/dev/dvb/adapter0/net0
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/demux0

add aliases:

alias abc='dvbstream -f 226500 -bw 7 -tm 8 -gi 8 -v 512 -a 650 -o | '
alias abchd='dvbstream -f 226500 -bw 7 -tm 8 -gi 8 -v 2307 -a 2308 -o | '
alias ch10='dvbstream -f 219500 -bw 7 -tm 8 -gi 8 -v 512 -a 650 -o | '
alias ch10hd='dvbstream -f 219500 -bw 7 -tm 8 -gi 8 -v 514 -a 672 -o | '
alias ch7='dvbstream -f 177500 -bw 7 -tm 8 -gi 8 -v 769 -a 770 -o | '
alias ch7g='dvbstream -f 177500 -bw 7 -tm 8 -gi 8 -v 865 -a 866 -o | '
alias ch7hd='dvbstream -f 177500 -bw 7 -tm 8 -gi 8 -v 833 -a 834 -o | '
alias olympic='dvbstream -f 177500 -bw 7 -tm 8 -gi 8 -v 865 -a 866 -o | '
alias ch9='dvbstream -f 191625 -bw 7 -tm 8 -gi 8 -v 519 -a 720 -o | '
alias ch9g='dvbstream -f 191625 -bw 7 -tm 8 -gi 8 -v 517 -a 700 -o | '
alias ch9hd='dvbstream -f 191500 -bw 7 -tm 8 -gi 8 -v 519 -a 720 -o | '
alias ch9hd2='dvbstream -f 191625 -bw 7 -tm 8 -gi 8 -v 519 -a 720 -o | '
alias ch9hd3='dvbstream -f 191500 -bw 7 -tm 8 -gi 8 -v 512 -a 650 -o | '
alias ch9hd4='dvbstream -f 191625 -bw 7 -tm 8 -gi 8 -v 512 -a 650 -o | '
alias sbs='dvbstream -f 536625 -bw 7 -tm 8 -gi 8 -v 161 -a 81 -o | '
alias sbsg='dvbstream -f 536625 -bw 7 -tm 8 -gi 8 -v 163 -a 85 -o | '
alias sbshd='dvbstream -f 536500 -bw 7 -tm 8 -gi 8 -v 102 -a 103 -o | '
alias sbshd2='dvbstream -f 536525 -bw 7 -tm 8 -gi 8 -v 102 -a 103 -o | '


Reference:

+ The Linux Kernel HOWTO <http://www.faqs.org/docs/Linux-HOWTO/Kernel-HOWTO.html>

+ video4linux HQ <http://dl.bytesex.org/patches/2.6.9-rc4-1/All-2.6.9-rc4.diff.gz>


Google