$ su - # mount /mnt/cdrom # mkkpkg /mnt/cdrom/SRPMS/kernel-2.2.14-1vl6.src.rpm executing "rpm -ivh /mnt/cdrom/SRPMS/kernel-2.2.14-1vl6.src.rpm" |
Input your Kernel Revision [current: 1vl6] 1vl6.1 Your kernel Revision is [revision: 1vl6.1]. OK? [y/n] y To edit /usr/src/redhat/SPECS/kernel-2.2.14-1vl6.1.spec, Push "Ctrl+Z" to suspend. (When finished to edit, type "fg" to continue.) |
$ su # cp ~/patch-2.2.14-irda1.gz /usr/src/redhat/SOURCES/ # cd /usr/src/redhat/SPECS # vi kernel-2.2.14-1vl6.1.spec |
Do you want to re-expand sources/patches with new SPEC file? (y/n) y |
executing "rpm -bp /usr/src/redhat/SPECS/kernel-2.2.14-1vl6.1.spec" + umask 022 + cd /usr/src/redhat/BUILD + rm -rf /var/tmp/kernel-2.2.14-1vl6.1-root + cd /usr/src/redhat/BUILD + rm -rf linux + /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/linux-2.2.14.tar.bz2 + tar -xf - (中略) + cd .. + mv emu10k1/docs Documentation/emu10k1 + exit 0 Success. Do you want to build SRPM ? (If no, only RPM will be built) (Y/n) y |
Ready for make "menuconfig" [Push enter to continue] |
Code maturity lovel options ---> [*]Prompt for development and/or incomplete code/drivers Loadable module support ---> [*] Enable loadable module support [*] Set version information on all symbols for modules [*] Kernel module loader General setup [*] Networking support Networking options <*> Packet socket [*] Kernel/User netlink socket [*] Routing messages <*> Netlink device emulation [*] Network firewalls [*] Socket Filtering <*> Unix domain sockets [*] TCP/IP networking [*] IP: multicasting [ ] IP: advanced router [ ] IP: kernel level autoconfiguration [*] IP: firewalling [*] IP: firewall packet netlink device [*] IP: transparent proxy support [*] IP: masquerading --- Protocol-specific masquerading support will be built as modules. [*] IP: ICMP masquerading --- Protocol-specific masquerading support will be built as modules. [*] IP: masquerading special modules support |
Now we are prepared for executing rpm -ba /usr/src/redhat/SPECS/kernel-2.2.14-1vl6.1.spec --target i386 . Log output goes to /tmp/kernel-rebuild.{log,err}. You can read them with following sequence: 1. Push "Ctrl+Z" to suspend the next long process. 2. Type "bg" to continue background. 3. Use "less" to print /tmp/kernel-rebuild.{log,err}. 3.1 Push "Shift+F" to "Forward forever; like tail -f". 3.2 If you want to stop, push "Ctrl+C". X. If you are using X, you can read log thru another term window. Ready for Action? [Push enter to continue] |
Building...Created: /usr/src/redhat/RPMS/i386/kernel-2.2.14-1vl6.1.i386.rpm /usr/src/redhat/RPMS/i386/kernel-doc-2.2.14-1vl6.1.i386.rpm /usr/src/redhat/RPMS/i386/kernel-headers-2.2.14-1vl6.1.i386.rpm /usr/src/redhat/RPMS/i386/kernel-ibcs-2.2.14-1vl6.1.i386.rpm /usr/src/redhat/RPMS/i386/kernel-pcmcia-cs-2.2.14-1vl6.1.i386.rpm /usr/src/redhat/RPMS/i386/kernel-source-2.2.14-1vl6.1.i386.rpm /usr/src/redhat/RPMS/i386/kernel-utils-2.2.14-1vl6.1.i386.rpm /usr/src/redhat/SRPMS/kernel-2.2.14-1vl6.1.src.rpm Do you want to clean up BUILD tree and sources? (y/n) y |
# init S # cd /root |
# rpm -ivh kernel-2.2.14-1vl6.1.i386.rpm |
# rpm -Uvh kernel-pcmcia-cs-2.2.14-1vl6.1.i386.rpm |
# mkinitrd /boot/initrd-2.2.14-1vl6.1.img 2.2.14-1vl6.1 |
boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=50 append="apm=on" default=linuxirda image=/boot/vmlinuz-2.2.14-1vl6 label=linux initrd=/boot/initrd-2.2.14-1vl6.img read-only root=/dev/hda8 image=/boot/vmlinuz-2.2.14-1vl6.1 label=linuxirda initrd=/boot/initrd-2.2.14-1vl6.1.img read-only root=/dev/hda8 |
bash# /sbin/lilo Added linux Added linuxirda * |
# rpm -Uvh kernel-headers-2.2.14-1vl6.1.i386.rpm # rpm -Uvh kernel-doc-2.2.14-1vl6.1.i386.rpm # rpm -Uvh kernel-source-2.2.14-1vl6.1.i386.rpm # rpm -Uvh kernel-utils-2.2.14-1vl6.1.i386.rpm # kernel-ibcs-2.2.14-1vl6.1.i386.rpm |
# shutdown -r now |
# modprobe irda # modprobe ircomm # modprobe ircomm-tty # /sbin/lsmod |
# cp ~/irda-utils.spec /usr/src/redhat/SPECS/ # cp ~/irda-utils-0.9.10.tar.gz /usr/src/redhat/SOURCES/ # cd /usr/src/redhat/SPECS # rpm -ba irda-utils.spec |
# rpm -ivh irda-utils-0.9.10-1.i386.rpm |
# mknod /dev/ircomm0 c 161 0 # mknod /dev/ircomm1 c 161 1 # mknod /dev/irlpt0 c 161 16 # mknod /dev/irlpt1 c 161 17 |
# IrDA over a normal serial port, or a serial port compatible IrDA port alias tty-ldisc-11 irtty # IrCOMM (for printing, PPP, Minicom etc) alias char-major-161 ircomm-tty # To be able to attach some dongles alias irda-dongle-0 tekram alias irda-dongle-1 esi alias irda-dongle-2 actisys alias irda-dongle-3 actisys alias irda-dongle-4 girbil alias irda-dongle-5 litelink alias irda-dongle-6 airport alias irda-dongle-7 old_belkin # To use the NSC driver on a Thinkpad laptop options nsc-ircc dongle_id=0x09 alias irda0 nsc-ircc |
irattach /dev/ttyS0 -d tekramCOM1 が赤外線ポートになっている場合はドングルの指定は無しでポートの指定だけで結構です。
irattach /dev/ttyS0下記では、COM2 が直接赤外線ポートである例を挙げています。
#! /bin/sh # # drivers # # Initialize and shutdown IrDA device drivers. # # This script should be invoked with two arguments. The first is the # action to be taken, either "start", "stop", or "restart". # action=$1 device=$2 case "${action:?}" in 'start') irattach /dev/ttyS1 # The COM2 serial port is an IrDA port # irattach /dev/ttyS0 -d esi # Attach a ESI dongle to the first serial port # irattach /dev/ttyS0 -d tekram # insmod pc87108 # If your machine as a pc87108 FIR chipset # modprobe uircc # Sharp UIRCC chipset ;; 'stop') killall irattach # ... or something. Currently not used ;; 'restart') /sbin/ifconfig ${device:?} down up ;; esac |
# IrDA module exec /usr/sbin/irmanager -d 1 |
# killall irattach # killall irmanager # rmmod ircomm-tty # rmmod ircomm # rmmod irtty # rmmod irda # ps ax | grep ir # lsmod | grep ir |
# /usr/sbin/irmanager -d 1 # ps ax | grep ir # lsmod | grep ir |