· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Booyo LiveCD/Add Package

BooyoLiveCD/AddPackage


부여 beta 버전에 필요한 패키지를 추가하는 과정

yum


  • FC3 에서 다음 rpm 다운로드 (libxml2-python 은 update 에서 하고, yum 은 update 에서 하지 말 것.
update 된 yum 은 groupinstall 을 하지 못함)
  • libxml2-2.6.14-2.i386.rpm
  • libxml2-python-2.6.14-2.i386.rpm
  • yum-2.1.11-3.noarch.rpm
  • yum 은 libxml2-python 을 필요로 하고, libxml2-python 은 libxml2 을 필요로 한다.

  • 관련 파일 수정
    • yum.conf
      • distroverpkg=booyo-release
      • gpgcheck=0
    • gpgcheck 을 1 로 둘 경우, 필요한 gpg key 를 다운로드 받아 놓아야 한다.
    • distroverpkg=booyo-release 로 수정하지 않으면, yum groupinstall 이 동작하지 않는다.
    • fedora.repo
[base]
name=Fedora Core 3 - i386 - Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
baseurl=ftp://ftp.kaist.ac.kr/pub/fedora/linux/core/3/i386/os/
enabled=1
gpgcheck=0
  • 필요없는 부분은 enabled 를 0 으로 만든다.
  • 명령에서 변경할 수 있다.

totem gstreamer plug-in 추가

  • totem 은 gstreamer 을 기반으로 하는 것과, xine 을 기반으로 하는 것이 있다.
  • fedora 는 gstreamer 을 기반으로 하는 totem 이 설치되어 있다.
  • plug-in 을 추가하는 방법은 두가지가 있는 것 같다.
  • http://gstreamer.freedesktop.org/download/fedora.html 의 방식을 사용하였지만, 성공하지 못하였음. 다시 해 볼 것
  • http://mpeters.us/linux/fc3_gstreamer.php
    • 다음 파일들을 /etc/yum.repos.d/ 밑에 만들 것
      • fedora-extras.repo
[fedora-extras]
name=Fedora Extras
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/3/i386/
enabled=1
gpgcheck=0
  • livna.repo
[livna-stable]
name=Livna.org Fedora Compatible Packages (stable)
baseurl=http://rpm.livna.org/fedora/3/i386/RPMS.stable
enabled=1
gpgcheck=0

[livna-testing]
name=Livna.org Fedora Compatible Packages (testing)
baseurl=http://rpm.livna.org/fedora/3/i386/RPMS.testing
enabled=1
gpgcheck=0

[livna-unstable]
name=Livna.org Fedora Compatible Packages (unstable)
baseurl=http://rpm.livna.org/fedora/3/i386/RPMS.unstable
enabled=1
gpgcheck=0
  • yjl.repo
[yjl-packages]
name=YJL Fedora Compatible Packages
baseurl=http://mpeters.us/yum/fedora/3/i386/RPMS.yjl
enabled=1
gpgcheck=0
  • yum groupinstall gst-plugins-extras

wireless card

  • http://bellet.info/laptop/airo_mpi.HOWTO.txt /lib/modules/airo-mpi/airo_mpi.o
  • linux-wlan-ng /lib/modules/extra
  • madwifi /lib/modules/extra
  • ipw2100 /lib/modules/2.6.9/net/wireless/ipw2100

  • # CONFIG_4KSTACKS is not set
    • Kernel hacking -> Use 4Kb for
  • # CONFIG_REGPARM is not set
    • Processor type and features ->Use register argu
  • ipw2100 http://ipw2100.sourceforge.net/INSTALL
    • CONFIG_NET_RADIO=y
    • CONFIG_CRYPTO_ARC4
    • CONFIG_CRC32
  • ipw2100 WPA
    • CONFIG_CRYPTO_MICHAEL_MIC
    • CONFIG_CRYPTO_AES_586
[root@localhost linux]# diff .config .config.old
4c4
< # Wed Jun 22 07:46:42 2005
---
> # Wed Jun 22 07:26:40 2005
30c30,31
< # CONFIG_AUDIT is not set
---
> CONFIG_AUDIT=y
> CONFIG_AUDITSYSCALL=y
138c139
< # CONFIG_REGPARM is not set
---
> CONFIG_REGPARM=y
2249,2251c2250
< CONFIG_NTFS_FS=m
< # CONFIG_NTFS_DEBUG is not set
< # CONFIG_NTFS_RW is not set
---
> # CONFIG_NTFS_FS is not set
2407c2406
< # CONFIG_4KSTACKS is not set
---
> CONFIG_4KSTACKS=y

  • atmel-firmware 1.1-1 Firmware for Atmel at76c50x wireless network
  • bridge-utils 1.0.4-1 Utilities for configuring the Linux ethernet
  • ipw2100-module 0.51-1+2.4.27+ Intel PRO/Wireless 2100 Driver for Linux
  • ipw2100-module 0.51-1+2.6.9+1 Intel PRO/Wireless 2100 Driver for Linux
  • ipw2100-nonfre 1.2-1 IPW2100 wireless device firmware files from
  • knoppix-ndiswr 0.1-2 NdisWrapper GUI for KNOPPIX
  • linux-wlan-ng 0.2.1pre21-1 utilities for wireless prism2 cards
  • linux-wlan-ng- +0.2.1pre21-1 drivers for wireless prism2 cards
  • madwifi 20030910-1 Setup to use atheros wireless cards
  • madwifi-module 20040308-2 Device driver modules for madwifi wireless c
  • madwifi-source 20040308-2 Source of the madwifi kernel module
  • ndiswrapper 0.8-1 Userspace utilities for ndiswrapper
  • ndiswrapper-mo 0.8-1 Ndiswrapper linux kernel module
  • ndiswrapper-mo 0.8-1 Ndiswrapper linux kernel module
  • orinoco 0.15rc2-1 Orinoco and Prism 2 wireless card driver wit
  • prism54 0.1-4 Prism54 wireless card drivers
  • prism54-nonfre 0.1-1 Prism54 wireless card firmware files
  • wireless-tools 27-1 Tools for manipulating Linux Wireless Extens
  • wlcardconfig-k 0.5-4 Minimalistic ncurses/dialog-based WLAN confi

    • atmelwlandriver_3.2.4.4-1.tar.gz
    • linux-wlan-ng_0.2.1pre21.orig.tar.gz
    • orinoco_0.15rc2-1.tar.gz
    • prism54_0.1-1.tar.gz
    • wlcardconfig-knoppix_0.5-6.tar.gz

    • MADWIFI: Multiband Atheros Driver for WiFi, Linux driver for 802.11a/b/g universal NIC cards - Cardbus, PCI, or miniPCI - using Atheros chip sets.
    • linux-wlan: linux-wlan-ng, The goal of the linux-wlan(tm) Project is to develop a complete, standards based, wireless LAN system using the GNU/Linux operating system. What differentiates this project from the Linux wireless extensions and other Linux wireless projects is that everything is based on the IEEE 802.11 standard.
    • NdisWrapper: Some vendors do not release specifications of the hardware or provide a linux driver for their wireless network cards. This project provides a linux kernel module that loads and runs Ndis (Windows network driver API) drivers supplied by the vendors.
    • ipw2100: This project was created by Intel to enable support for the Intel PRO/Wireless 2100 Network Connection mini PCI adapter. This project (IPW2100) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)



    • bluez-firmware 1.0-2 Firmware for Bluetooth devices
    • bluez-pin 0.24-1 Bluetooth PIN helper with D-BUS support
    • bluez-utils 2.10-5 Bluetooth tools and daemons

=== ndiswrapper===
[root@localhost ndiswrapper]# pwd
/etc/ndiswrapper
[root@localhost ndiswrapper]# ls
net5211
[root@localhost ndiswrapper]# cd net5211/
[root@localhost net5211]# ls
168C:0012.5.conf            168C:0013.5.conf            168C:0017.5.conf
168C:0012:144F:7005.5.conf  168C:0013:144F:7005.5.conf  168C:0018.5.conf
168C:0012:168C:1021.5.conf  168C:0014.5.conf            168C:0019.5.conf
168C:0012:168C:1022.5.conf  168C:0015.5.conf            ar5211.sys
168C:0012:168C:2022.5.conf  168C:0016.5.conf            net5211.inf
  • 152 ndiswrapper -l
[root@localhost net5211]# ndiswrapper -l
Installed ndis drivers:
net5211 driver present
  • 153 modprobe ndiswrapper
    • 관련 파일 및 메모리 init
    • 드라이버를 먼저 올리고, 디바이스 register 하는 것이 맞지 않을까?
[root@localhost net5211]# /sbin/lsmod
Module                  Size  Used by
ndiswrapper           148788  0
nls_utf8                2176  1

[root@localhost net5211]# dmesg
Linux version 2.6.10-prep (root@localhost.localdomain) (gcc version 3.4.2 20041017 (Booyo Desktop 3.4.2-6.1by.1)) #1 Wed Jun 22 07:53:23 KST 2005
BIOS-provided physical RAM map:

NTFS volume version 3.1.
ndiswrapper version 1.2 loaded (preempt=yes,smp=no)

linux-wlan

  • kernel source 가 있어야 함.
  • ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/ 에서 다운로드
  • cp -Rp /etc/pcmcia /etc/pcmcia.org
  • 222 tar zxvf linux-wlan-ng-0.2.1-pre26.tar.gz
  • 224 cd linux-wlan-ng-0.2.1-pre26
  • 228 make config
  • 229 make all
  • 230 make install

ipw2100

/usr/lib/hotplug/firmware -> /lib/firmware

atmel

http://thekelleys.org.uk/atmel/
  393  rpm -ivh atmel-firmware-1.3-1fc3.noarch.rpm
[root@localhost firmware]# cd /lib/firmware/
[root@localhost firmware]# ls
atmel_at76c502-wpa.bin              atmel_at76c503-rfmd-acc.bin
atmel_at76c502.bin                  atmel_at76c503-rfmd.bin
atmel_at76c502_3com-wpa.bin         atmel_at76c504.bin
atmel_at76c502_3com.bin             atmel_at76c504_2958-wpa.bin
atmel_at76c502d-wpa.bin             atmel_at76c504a_2958-wpa.bin
atmel_at76c502d.bin                 atmel_at76c504c-wpa.bin
atmel_at76c502e-wpa.bin             atmel_at76c505-rfmd.bin
atmel_at76c502e.bin                 atmel_at76c505-rfmd2958.bin
atmel_at76c503-i3861.bin            atmel_at76c505a-rfmd2958.bin
atmel_at76c503-i3863.bin            atmel_at76c506-wpa.bin
atmel_at76c503-rfmd-0.90.2-140.bin  atmel_at76c506.bin

captive

/root/captive-1.1.5/src/install/acquire

/root/gnome-vfs-httpcaptive-2.3.8captive2/modules http-method.c

root@localhost include# ln -s libxml2/libxml libxml root@localhost include# ln -s libgnome-2.0 libgnome root@localhost include# ln -s libgnomeui-2.0 libgnomeui root@localhost include# ln -s gtk-2.0 gtk

knoppix

/usr/lib/hotplug/firmware
[tcheun1@localhost firmware]$ ls
atmel_at76c502-wpa.bin              atmel_at76c505a-rfmd2958.bin
atmel_at76c502.bin                  atmel_at76c506-wpa.bin
atmel_at76c502_3com-wpa.bin         atmel_at76c506.bin
atmel_at76c502_3com.bin             ipw-2.2-boot.fw
atmel_at76c502d-wpa.bin             ipw-2.2-bss.fw
atmel_at76c502d.bin                 ipw-2.2-bss_ucode.fw
atmel_at76c502e-wpa.bin             ipw-2.2-ibss.fw
atmel_at76c502e.bin                 ipw-2.2-ibss_ucode.fw
atmel_at76c503-i3861.bin            ipw2100-1.2-i.fw
atmel_at76c503-i3863.bin            ipw2100-1.2-p.fw
atmel_at76c503-rfmd-0.90.2-140.bin  ipw2100-1.2.fw
atmel_at76c503-rfmd-acc.bin         ipw2100-1.3-i.fw
atmel_at76c503-rfmd.bin             ipw2100-1.3-p.fw
atmel_at76c504.bin                  ipw2100-1.3.fw
atmel_at76c504_2958-wpa.bin         ipw2100.fw.LICENSE
atmel_at76c504a_2958-wpa.bin        ipw2200.fw.LICENSE
atmel_at76c504c-wpa.bin             isl3877
atmel_at76c505-rfmd.bin             isl3890
atmel_at76c505-rfmd2958.bin

/usr/share/applnk/Knoppix/Net
[tcheun1@localhost Net]$ ls
gprsconnect.desktop          kppp.desktop           pppoeconf.desktop
isdn-config.desktop          kwifi.desktop          wlcardconfig.desktop
isdntool-knoppix.desktop     modemlink.desktop
knoppix-ndiswrapper.desktop  netcardconfig.desktop

/usr/sbin/ndiswrapper.sh
sudo kwifimanager -caption "%c" %i %m
/usr/sbin/wlcardconfig


부여에 설치되어 있는 것 wireless-tools-27-2.2.0.fc3.1by.1 madwifi-0.0.20050217-1.1by madwifi-module-0.0.20050217-1_2.6.10_1.770.bone11.desktop

Patch for sysconfig/network-scripts/ifup

Adds support for device type 'wlanng', which uses wlan-ng setup scripts instead of the wireless setup script.

Add additional device type to network-functions

Adds device type 'wlanng' to the device list in network-functions.

/root/linux-wlan-ng-0.2.1-pre26/src/p80211 /lib/modules/2.6.10-prep/linux-wlan-ng cp *.ko /lib/modules/2.6.10-prep/linux-wlan-ng

/root/linux-wlan-ng-0.2.1-pre26/src/prism2 mkdir -p /etc/wlan cp shared.prism2 /etc/wlan mkdir -p /etc/wlan/ cp *pda /etc/wlan/ for x in *.hex ; do \
if -f "$x" ; then \
cp $x /etc/wlan//prism2_echo $x | cut -c1-2.hex ; \
fi; \
done

/root/linux-wlan-ng-0.2.1-pre26/src/prism2/driver cp prism2_cs.ko /lib/modules/2.6.10-prep/linux-wlan-ng

/root/linux-wlan-ng-0.2.1-pre26/src/prism2/download mkdir -p /sbin cp prism2dl /sbin

/root/linux-wlan-ng-0.2.1-pre26/src/wlanctl mkdir -p /sbin cp -f wland /sbin/wland

/root/linux-wlan-ng-0.2.1-pre26/src/nwepgen mkdir -p /sbin cp nwepgen /sbin

/root/linux-wlan-ng-0.2.1-pre26/src/wlancfg cp wlancfg /sbin

/root/linux-wlan-ng-0.2.1-pre26/src/wlancfg /sbin/depmod -a

/root/linux-wlan-ng-0.2.1-pre26/etc/pcmcia mkdir -p /etc/pcmcia ; \ if -f /etc/pcmcia/wlan-ng ; then \
mv -f /etc/pcmcia/wlan-ng /etc/pcmcia/wlan-ng.O ; \
fi ; \ cp wlan-ng /etc/pcmcia ; \ chmod +x /etc/pcmcia/wlan-ng ; \ if -f /etc/pcmcia/wlan-ng.conf ; then \
mv -f /etc/pcmcia/wlan-ng.conf /etc/pcmcia/wlan-ng.conf.O ; \
fi ; \ cp wlan-ng.conf /etc/pcmcia ; \ if -f /etc/pcmcia/config ; then \ if ! grep -sq 'source.*\.\/\*\.conf$' /etc/pcmcia/config ; then \
if ! grep -sq 'source \.\/wlan-ng.conf' /etc/pcmcia/config ; then \
mv -f /etc/pcmcia/config /etc/pcmcia/config.O ; \ ( echo "source ./wlan-ng.conf"; cat /etc/pcmcia/config.O) > /etc/pcmcia/config ; \
fi ; \
fi ; \ fi

/root/linux-wlan-ng-0.2.1-pre26/etc/wlan mkdir -p /etc/wlan if ! -f /etc/wlan/wlan.conf ; then \
cp wlan.conf /etc/wlan/wlan.conf ; \
fi cp shared wlancfg-DEFAULT \
/etc/wlan
chmod 700 /etc/wlan/wlancfg-* echo FIRMWARE_DIR=/etc/wlan/ >> /etc/wlan/shared

if ! -d /etc/rc.d/init.d ; then \
mkdir -p /etc/rc.d/init.d; \
fi; \ cp rc.wlan /etc/rc.d/init.d/wlan; \ chmod 755 /etc/rc.d/init.d/wlan ;\ if -d /etc/hotplug ; then \
cp wlan.agent /etc/hotplug; \ rm -f /etc/hotplug/usb/prism2_usb; \
rm -f /etc/hotplug/pci/prism2_pci; \ rm -f /etc/hotplug/pci/prism2_plx; \
fi

Transaction Listing:
Install: gstreamer-ffmpeg.i386 0:0.8.3-0.0.yjl.1 Install: gstreamer-plugins-a52dec.i386 0:0.8.7-0.0.yjl.1 Install: gstreamer-plugins-aac.i386 0:0.8.7-0.0.yjl.1 Install: gstreamer-plugins-aasink.i386 0:0.8.7-0.0.yjl.1 Install: gstreamer-plugins-audio.i386 0:0.8.7-0.0.yjl.1 Install: gstreamer-plugins-dvdsupport.i386 0:0.8.7-0.0.yjl.1 Install: gstreamer-plugins-libshout2.i386 0:0.8.7-0.0.yjl.1 Install: gstreamer-plugins-libvisual.i386 0:0.8.7-0.0.yjl.1 Install: gstreamer-plugins-mp3.i386 0:0.8.7-0.0.yjl.1 Install: gstreamer-plugins-mpeg.i386 0:0.8.7-0.0.yjl.1 Install: gstreamer-plugins-xvid.i386 0:0.8.7-0.0.yjl.1
Performing the following to resolve dependencies:
Install: a52dec.i386 0:0.7.4-0.lvn.7.3 Install: aalib.i386 0:1.4.0-0.rc5.3 Install: faac.i386 0:1.24-0.0.yjl.2 Install: faad2.i386 0:2.0-0.lvn.5.3 Install: ffmpeg.i386 0:0.4.9-0.lvn.0.15.20050427.3 Install: gsm.i386 0:1.0.10-0.lvn.7.3 Install: imlib2.i386 0:1.2.0-7.fc3 Install: ladspa.i386 0:1.12-3 Install: lame.i386 0:3.96.1-0.lvn.1.3 Install: libdvdcss.i386 0:1.2.8-0.lvn.5.3 Install: libdvdnav.i386 0:0.1.10-0.lvn.1.3 Install: libdvdread.i386 0:0.9.4-0.lvn.1.3 Install: libid3tag.i386 0:0.15.1-1.b Install: libmad.i386 0:0.15.1-0.lvn.1.b.3 Install: libquicktime.i686 0:0.9.7-0.lvn.4.3 Install: libshout.i386 0:1.0.9-1 Install: libshout2.i386 0:2.0-0.0.yjl.1 Install: libsidplay.i386 0:1.36.59-0.0.yjl.0 Install: libsndfile.i386 0:1.0.11-1 Install: libvisual.i386 0:0.2.0-2 Install: libvisual-plugins.i386 0:0.2.0-1.fc3 Install: mjpegtools.i386 0:1.6.3-0.lvn.0.1.rc1.3 Install: mjpegtools-libs.i386 0:1.6.3-0.lvn.0.1.rc1.3 Install: mpeg2dec.i386 0:0.4.0-0.lvn.3.b.3 Install: xvidcore.i386 0:1.0.3-0.lvn.1.3

  • linux-wlan-ng-0.2.1-pre26
  • edit Configure file
# if [ ! -f $LINUX_SRC/include/linux/version.h ] ; then
if [ ! -f /usr/include/linux/version.h ] ; then

# VERSION_CODE=`grep LINUX_VERSION_CODE $LINUX_SRC/include/linux/version.h | \
VERSION_CODE=`grep LINUX_VERSION_CODE /usr/include/linux/version.h | \
  • cd scripts
  • edit Makefile
    • @if ! -f $(KERNEL_SOURCE)/include/linux/version.h ; then \

커널 make 를 한 것과 안 한 것은 차이가 있다. 어떤 차이? make 후에 include/linux 에는 compile.h 와 version.h 가 생성됨.

Only in etc: group- Only in etc: gshadow- Only in /mnt/sda8/etc: gtk Only in etc/hotplug: wlan.agent Only in etc/init.d: wlan Only in etc: passwd- Only in etc/pcmcia: atmel.conf Only in etc/pcmcia: wlan-ng Only in etc/pcmcia: wlan-ng.conf Only in etc: pcmcia.org Only in /mnt/sda8/etc: prelink.cache Only in etc/rc.d/init.d: wlan Only in etc: shadow- Only in etc: wlan

Only in lib/firmware: atmel_at76c502-wpa.bin Only in lib/firmware: atmel_at76c502.bin Only in lib/firmware: atmel_at76c502_3com-wpa.bin Only in lib/firmware: atmel_at76c502_3com.bin Only in lib/firmware: atmel_at76c502d-wpa.bin Only in lib/firmware: atmel_at76c502d.bin Only in lib/firmware: atmel_at76c502e-wpa.bin Only in lib/firmware: atmel_at76c502e.bin Only in lib/firmware: atmel_at76c503-i3861.bin Only in lib/firmware: atmel_at76c503-i3863.bin Only in lib/firmware: atmel_at76c503-rfmd-0.90.2-140.bin Only in lib/firmware: atmel_at76c503-rfmd-acc.bin Only in lib/firmware: atmel_at76c503-rfmd.bin Only in lib/firmware: atmel_at76c504.bin Only in lib/firmware: atmel_at76c504_2958-wpa.bin Only in lib/firmware: atmel_at76c504a_2958-wpa.bin Only in lib/firmware: atmel_at76c504c-wpa.bin Only in lib/firmware: atmel_at76c505-rfmd.bin Only in lib/firmware: atmel_at76c505-rfmd2958.bin Only in lib/firmware: atmel_at76c505a-rfmd2958.bin Only in lib/firmware: atmel_at76c506-wpa.bin Only in lib/firmware: atmel_at76c506.bin Only in lib/modules/2.6.10-livecd: linux-wlan-ng Only in lib/modules/2.6.10-livecd: misc

Only in sbin: loadndisdriver Only in sbin: nwepgen Only in sbin: prism2dl Only in sbin: wlancfg Only in sbin: wlanctl-ng Only in sbin: wland

Only in /mnt/sda8/usr/bin: Xdialog Only in /mnt/sda8/usr/bin: cvs Only in /mnt/sda8/usr/bin: cvsbug Only in /mnt/sda8/usr/bin: diet Only in /mnt/sda8/usr/bin: rcs2log Only in usr: doc Only in /mnt/sda8/usr/lib: dietlibc Only in /mnt/sda8/usr/lib: gdk-pixbuf Only in /mnt/sda8/usr/lib: libgdk-1.2.so.0 Only in /mnt/sda8/usr/lib: libgdk-1.2.so.0.9.1 Only in /mnt/sda8/usr/lib: libgdk_pixbuf.so.2 Only in /mnt/sda8/usr/lib: libgdk_pixbuf.so.2.0.0 Only in /mnt/sda8/usr/lib: libgdk_pixbuf_xlib.so.2 Only in /mnt/sda8/usr/lib: libgdk_pixbuf_xlib.so.2.0.0 Only in /mnt/sda8/usr/lib: libgtk-1.2.so.0 Only in /mnt/sda8/usr/lib: libgtk-1.2.so.0.9.1 Only in usr/local: man Only in usr: man Only in usr/sbin: atmel_fwl Only in usr/sbin: ndiswrapper Only in usr/sbin: ndiswrapper-buginfo

ndiswrapper


wrapper_init (wrapper.c)

  • misc_funcs_init || ntoskernel_init || ndis_init || usb_init
  • wq 와 scheduler 설정
  • ndiswrapper_procfs_init
  • loader_init
  • call_usermodhelper("/sbin/loadndisdriver", argv, env, 1);
    • argv: loadndisdriver, debuglevel, utilversion, -a

init

int misc_funcs_init(void)
{
	InitializeListHead(&wrap_allocs);
	kspin_lock_init(&wrap_allocs_lock);
	return 0;
}

int ntoskernel_init(void)
{
	struct timeval now;

	kspin_lock_init(&nt_event_lock);
	kspin_lock_init(&ntoskernel_lock);
	kspin_lock_init(&wrap_work_item_list_lock);
	kspin_lock_init(&kdpc_list_lock);
	kspin_lock_init(&irp_cancel_lock);
	kspin_lock_init(&inter_lock);
	InitializeListHead(&wrap_mdl_list);
	InitializeListHead(&kdpc_list);
	InitializeListHead(&callback_objects);
	InitializeListHead(&bus_driver_list);
	InitializeListHead(&object_list);
	InitializeListHead(&wrap_work_item_list);
	INIT_WORK(&kdpc_work, kdpc_worker, NULL);
	INIT_WORK(&wrap_work_item_work, wrap_work_item_worker, NULL);

	kspin_lock_init(&timer_lock);
	InitializeListHead(&wrap_timer_list);

	do_gettimeofday(&now);
	wrap_ticks_to_boot = (u64)now.tv_sec * TICKSPERSEC;
	wrap_ticks_to_boot += now.tv_usec * 10;
	wrap_ticks_to_boot -= jiffies * TICKSPERSEC / HZ;
	wrap_ticks_to_boot += TICKS_1601_TO_1970;

	if (add_bus_driver(&pci_bus_driver, "PCI") ||
	    add_bus_driver(&usb_bus_driver, "USB")) {
		ntoskernel_exit();
		return -ENOMEM;
	}
	mdl_cache = kmem_cache_create("ndis_mdl", sizeof(struct wrap_mdl),
				      0, 0, NULL, NULL);
	if (!mdl_cache) {
		ERROR("couldn't allocate MDL cache");
		ntoskernel_exit();
		return -ENOMEM;
	}
#if defined(CONFIG_X86_64)
	memset(&kuser_shared_data, 0, sizeof(kuser_shared_data));
	init_timer(&shared_data_timer);
	shared_data_timer.function = &update_user_shared_data_proc;
#endif
	return 0;
}

int ndis_init(void)
{
	return 0;
}

int usb_init(void)
{
	InitializeListHead(&irp_complete_list);
	tasklet_init(&irp_complete_work, irp_complete_worker, 0);
#ifdef USB_DEBUG
	urb_id = 0;
#endif
	return 0;
}

int ndiswrapper_procfs_init(void)
{
	struct proc_dir_entry *procfs_entry;

	ndiswrapper_procfs_entry = proc_mkdir(DRIVER_NAME, proc_net);
	if (ndiswrapper_procfs_entry == NULL) {
		ERROR("couldn't create procfs directory");
		return -ENOMEM;
	}
	ndiswrapper_procfs_entry->uid = proc_uid;
	ndiswrapper_procfs_entry->gid = proc_gid;

	procfs_entry = create_proc_entry("debug", S_IFREG | S_IRUSR | S_IRGRP,
					 ndiswrapper_procfs_entry);
	if (procfs_entry == NULL) {
		ERROR("couldn't create proc entry for 'debug'");
		return -ENOMEM;
	} else {
		procfs_entry->uid = proc_uid;
		procfs_entry->gid = proc_gid;
		procfs_entry->read_proc  = procfs_read_debug;
		procfs_entry->write_proc = procfs_write_debug;
	}

	return 0;
}

int loader_init(void)
{
	int err;

	InitializeListHead(&ndis_drivers);
	kspin_lock_init(&loader_lock);
	if ((err = misc_register(&wrapper_misc)) < 0 ) {
		ERROR("couldn't register module (%d)", err);
		TRACEEXIT1(return err);
	}
	TRACEEXIT1(return 0);
}
  • misc_register(&wrapper_misc)
loader.c

static struct file_operations wrapper_fops = {
	.owner          = THIS_MODULE,
	.ioctl		= wrapper_ioctl,
	.release	= wrapper_ioctl_release,
};
static struct miscdevice wrapper_misc = {
	.name   = DRIVER_NAME,
	.minor	= MISC_DYNAMIC_MINOR,
	.fops   = &wrapper_fops
};
misc_register: linux kernel api
Register a miscellaneous device with the kernel. If the minor number is set to MISC_DYNAMIC_MINOR a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used. 

The structure passed is linked into the kernel and may not be destroyed until it has been unregistered. 

A zero is returned on success and a negative errno code for failure. 
As we have seen, the request_module function runs a program in user mode (i.e., running as a separate process, in an unprivileged processor mode, and in user space) to help it get its job done. In the 2.3 development series, the kernel developers made the "run a user-mode helper'' capability available to the rest of the kernel code. Should your driver need to run a user-mode program to support its operations, this mechanism is the way to do it. Since it's part of the kmod implementation, we'll look at it here. If you are interested in this capability, a look at kernel/kmod.c is recommended; it's not much code and illustrates nicely the use of user-mode helpers. 

The interface for running helper programs is fairly simple. As of kernel 2.4.0-test9, there is a function call_usermodehelper; it is used primarily by the hot-plug subsystem (i.e., for USB devices and such) to perform module loading and configuration tasks when a new device is attached to the system. Its prototype is: 

int call_usermodehelper(char *path, char **argv, char **envp);

The arguments will be familiar: they are the name of the executable to run, arguments to pass to it (argv[0], by convention, is the name of the program itself), and the values of any environment variables. Both arrays must be terminated by NULL values, just like with the execve system call. call_usermodehelper will sleep until the program has been started, at which point it returns the status of the operation. 

Helper programs run in this mode are actually run as children of a kernel thread called keventd. An important implication of this design is that there is no way for your code to know when the helper program has finished or what its exit status is. Running helper programs is thus a bit of an act of faith. 

It is worth pointing out that truly legitimate uses of user-mode helper programs are rare. In most cases, it is better to set up a script to be run at module installation time that does all needed work as part of loading the module rather than to wire invocations of user-mode programs into kernel code. This sort of policy is best left to the user whenever possible. 


/sbin/loadndisdriver (loadndisdriver.c)

ndiswrapper kernel module uses loadndisdriver user space tool to load all
the Windows drivers. This tool is not to be used under normal circumstances.
Only when ndiswrapper module is already loaded and a new Windows XP driver
is instaleld (by ndiswrapper user space tool) and you want the kernel module
to load that driver without having to unload the module that you need to
use it.
  • loadndisdriver debug-level version -a
  • loadndisdriver debug-level version drivername conf_file_name
  • get_ioctl_device
    • check /proc/misc 에 ndiswrapper 이 있는가?
    • minor_dev 설정
    • ret = open(/dev/ndiswrapper)
  • argv 점검
  • -a 면
    • load_all_devices
  • 아니면
    • load_driver

  • load_all_devices
    • cd confdir ( "/etc/ndiswrapper" )
    • cd directories under /etc/ndiswrapper
    • add_driver_devices
    • ioctl 을 이용하여 register
    • ioctl(ioctl_device, NDIS_REGISTER_DEVICES, &load_devices);
      • wrapper_init 에 의해 ioctl 은 wrapper_ioctl 로 설정됨
      • register_devices(&devices);

  • add_driver_devices
    • *.conf 가 있으면, 이 이름을 이용하여 device struct 설정
  • register_devices(&devices)
    • pci_register_driver(&ndiswrapper_pci_driver);
    • usb_register(&ndiswrapper_usb_driver);
pci_register_driver --  register a new pci driver kernel api
Adds the driver structure to the list of registered drivers Returns the number of pci devices which were claimed by the driver during registration. The driver remains registered even if the return value is zero.

usb_register --  register a USB driver kernel api
Registers a USB driver with the USB core. The list of unattached interfaces will be rescanned whenever a new driver is added, allowing the new driver to attach to any recognized devices. Returns a negative error code on failure and 0 on success. 
	devices = NULL;
	ndiswrapper_pci_devices = NULL;
#if defined(CONFIG_USB)
	ndiswrapper_usb_devices = NULL;
#endif
	ndis_devices = NULL;

		ndis_device->bustype = device->bustype;

		ndis_device->vendor = device->vendor;
		ndis_device->device = device->device;
		ndis_device->subvendor = device->subvendor;
		ndis_device->subdevice = device->subdevice;

			ndiswrapper_pci_devices[num_pci].vendor =
				device->vendor;
			ndiswrapper_pci_devices[num_pci].device =
				device->device;
			if (device->subvendor == DEV_ANY_ID)
				ndiswrapper_pci_devices[num_pci].subvendor =
					PCI_ANY_ID;
			else
				ndiswrapper_pci_devices[num_pci].subvendor =
					device->subvendor;
			if (device->subdevice == DEV_ANY_ID)
				ndiswrapper_pci_devices[num_pci].subdevice =
					PCI_ANY_ID;
			else
				ndiswrapper_pci_devices[num_pci].subdevice =
					device->subdevice;
			ndiswrapper_pci_devices[num_pci].class = 0;
			ndiswrapper_pci_devices[num_pci].class_mask = 0;
			ndiswrapper_pci_devices[num_pci].driver_data =
				num_pci + num_usb;

		ndiswrapper_pci_driver.name = DRIVER_NAME;
		ndiswrapper_pci_driver.id_table = ndiswrapper_pci_devices;
		ndiswrapper_pci_driver.probe = ndiswrapper_add_pci_device;
		ndiswrapper_pci_driver.remove =
			__devexit_p(ndiswrapper_remove_pci_device);
		ndiswrapper_pci_driver.suspend = ndiswrapper_suspend_pci;
		ndiswrapper_pci_driver.resume = ndiswrapper_resume_pci;
		res = pci_register_driver(&ndiswrapper_pci_driver);

  • load_driver
    • *.sys 나 *.bin, *.out 을 찾아 load_file
    • ioctl 을 이용하여 load
    • ioctl(ioctl_device, NDIS_LOAD_DRIVER, driver)

  • load_file
    • file 을 open 하고, 관련 struct 값 설정

ndiswrapper_load_driver (loader.c)

  • load driver for given device, if not already loaded
    • call_usermodhelper("/sbin/loadndisdriver", argv, env, 1);
    • argv: loadndisdriver, debuglevel, utilversion, drivername, conf_file_name
    • env: null



libc, glibc, glib

  • glibc: gnu implementation of libc
http://www.tldp.org/LDP/lfs/html/appendixa/glibc.html
  • glib: glibc extention (? gnome library)
ld-linux.so.1 -> ld-linux.so.1.9.11
ld-linux.so.2 -> ld-2.3.2.so
ld-lsb.so.1 -> ld-linux.so.2
ld-lsb.so.2 -> ld-linux.so.2
libacl.so.1 -> libacl.so.1.1.0
libanl.so.1 -> libanl-2.3.2.so
libattr.so.1 -> libattr.so.1.1.0
libblkid.so.1 -> libblkid.so.1.0
libBrokenLocale.so.1 -> libBrokenLocale-2.3.2.so
libcap.so.1 -> libcap.so.1.10
libcfont.so.0 -> libcfont.so.0.0.0
libcom_err.so.2 -> libcom_err.so.2.1
libconsole.so.0 -> libconsole.so.0.0.0
libcrypt.so.1 -> libcrypt-2.3.2.so
libc.so.6 -> libc-2.3.2.so
libctutils.so.0 -> libctutils.so.0.0.0
libdb1.so.2 -> libdb1-2.2.5.so
libdb2.so.2 -> libdb2.so.2.7.7
libdb.so.2 -> libdb1-2.2.5.so
libdl.so.1 -> libdl.so.1.9.11
libdl.so.2 -> libdl-2.3.2.so
libe2p.so.2 -> libe2p.so.2.3
libext2fs.so.2 -> libext2fs.so.2.4
libhistory.so.4 -> libhistory.so.4.3
libhistory.so.5 -> libhistory.so.5.0
libm.so.6 -> libm-2.3.2.so
libncurses.so.5 -> libncurses.so.5.4
libnsl.so.1 -> libnsl-2.3.2.so
libnss_compat-2.3.2.so
libnss_compat.so.2 -> libnss_compat-2.3.2.so
libnss_dns.so.2 -> libnss_dns-2.3.2.so
libnss_files.so.2 -> libnss_files-2.3.2.so
libnss_hesiod.so.2 -> libnss_hesiod-2.3.2.so
libnss_nisplus.so.2 -> libnss_nisplus-2.3.2.so
libnss_nis.so.2 -> libnss_nis-2.3.2.so
libnss_winbind.so -> libnss_winbind.so.2
libnss_wincache.so.2 -> libnss_wincache.so
libnss_wins.so -> libnss_wins.so.2
libpamc.so.0 -> libpamc.so.0.76
libpam_misc.so.0 -> libpam_misc.so.0.76
libpam.so.0 -> libpam.so.0.76
libpopt.so.0 -> libpopt.so.0.0.0
libpthread.so.0 -> libpthread-0.10.so
libreadline.so.4 -> libreadline.so.4.3
libreadline.so.5 -> libreadline.so.5.0
libresolv.so.2 -> libresolv-2.3.2.so
librt.so.1 -> librt-2.3.2.so
libslang.so.1 -> libslang.so.1.4.9
libslang.so.1-UTF8 -> libslang.so.1-UTF8.4.9
libslang.so.1-UTF8.4.9
libss.so.2 -> libss.so.2.0
libthread_db.so.1 -> libthread_db-1.0.so
libusb-0.1.so.4 -> libusb-0.1.so.4.4.2
libutil.so.1 -> libutil-2.3.2.so
libuuid.so.1 -> libuuid.so.1.2
libwrap.so.0 -> libwrap.so.0.7.6

gtk 1.X
gtk-> gdk -> glib

gtk 2.X
gtk -> GObject,Pango,ATK,GdkPixbuf,GDK -> glib
 GTK 2.x depends on the following libraries:

    *

      GObject (Object library. Basis for GTK and others)
    *

      GLib (A general-purpose utility library, not specific to graphical user interfaces. GLib provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on.)
    *

      Pango (Pango is a library for internationalized text handling. It centers around the #PangoLayout object, representing a paragraph of text. Pango provides the engine for #GtkTextView, #GtkLabel, #GtkEntry, and other widgets that display text.)
    *

      ATK (ATK is the Accessibility Toolkit. It provides a set of generic interfaces allowing accessibility technologies to interact with a graphical user interface. For example, a screen reader uses ATK to discover the text in an interface and read it to blind users. GTK+ widgets have built-in support for accessibility using the ATK framework.)
    *

      GdkPixbuf (This is a small library which allows you to create #GdkPixbuf ("pixel buffer") objects from image data or image files. Use a #GdkPixbuf in combination with #GtkImage to display images.)
    *

      GDK (GDK is the abstraction layer that allows GTK+ to support multiple windowing systems. GDK provides drawing and window system facilities on X11, Windows, and the Linux framebuffer device.) 

relations between packages

  • Dependency: A package A depends on a package B if A cannot be used at all if B is not installed.

  • Conflict: A package A conflicts with a package B if A will not operate if B is installed on the system. Ideally this relation would be symmetricbut it is possible that the maintainer of the older package is not aware that a later package conflicts with it.

  • Recommendation: A package A recommends a package B if the package maintainer judges that most users would not want A without functionality provided by B.

  • Suggestion: A package A suggests a package B if B enhances the functionality of A.

  • Replacement: A package A replaces a package B if the files installed by B will be removed or overwritten by files in A. In practice, replacement is only used to guide the configuration process. If two packages are in conflict and one of them replaces the other, the replacing one is preferred.

  • Providing: A package A provides a package B when A incorporates all files and functionality of B.

  • Predependency: A package A predepends on a package B when A cannot be installed if B is not completely installed on the system. Predependency relation is normally used only for packages where correct installation order is critical. With normal dependency, a package maybe unpacked even if its dependencies are not satisfied, but a package with unsatisfied pre-dependencies cannot be even unpacked.

  • The relations that issue a kind of dependency (depends, recommends, suggests and pre-depends) may define also a set of alternative packages. In that case, at least one of the packages has to be in the configuration.

  • http://72.14.203.104/search?q=cache:8pjfQZNS56EJ:www.tcs.hut.fi/Publications/bibdb/HUT-TCS-A55.ps gnu/linux relation between packages&hl=ko









sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2006-01-03 15:31:56
Processing time 0.0234 sec