· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Linux Hotplug

¸®´ª½º¿¡¼­ Hotplug°¡ ¾î¶² ¹æ½ÄÀ¸·Î µ¿ÀÛÇÏ°í ¾î¶°ÇÑ ÀåÄ¡µéÀÌ Áö¿øµÇ´ÂÁö ¼³¸íÇÑ´Ù.

LinuxHotplug ¸¦ »ç¿ëÇϱâ À§ÇÑ Áغñ


  • ¸®´ª½º Ä¿³Î 2.4 ÀÌ»ó

  • Ä¿³Î ¼³Á¤¿¡¼­ General setup -> Support for hot-pluggable devices ¿É¼ÇÀÌ ÄÑÁ®ÀÖ¾î¾ß ÇÑ´Ù.
  • hotplug ½ºÅ©¸³Æ®

  • [http]Linux Hotplugging¿¡¼­ ¹Þ¾Æ¼­ ¼³Ä¡ÇÑ´Ù.
  • hotplug°¡ °¡´ÉÇÑ Çϵå¿þ¾î

  • usb, ieee1394, pci, pcmcia(2.6.13ÀÌ»ó) hotplugÀåÄ¡ µîµî.

LinuxHotplug µ¿ÀÛ¹æ½Ä


  • hotplug¸¦ Áö¿øÇÏ´Â ÀåÄ¡°¡ ¿¬°áµÈ´Ù.
  • ¿¬°áµÇ¸é ÀåÄ¡ÀÇ Å¬·¡½º µå¶óÀ̹ö¿¡¼­ /proc/sys/kernel/hotplug¿¡ µî·ÏµÈ ÇÁ·Î±×·¥À» È£ÃâÇÑ´Ù. (ÁÖ·Î /sbin/hotplug )

  • hotplugÀÇ ÀÎÀÚ·Î ÀåġŬ·¡½ºÀÇ À̸§ÀÌ ºÙ´Â´Ù. (ex: usb, ieee1394 ...)
  • /sbin/hotplug¿¡¼­´Â /etc/hotplug.d/ÀåġŬ·¡½º/*.hotplug ¿Í /etc/hotplug.d/default/*.hotplug ½ºÅ©¸³Æ®¸¦ ¼öÇàÇÑ´Ù.

  • °¢°¢ÀÇ ½ºÅ©¸³Æ®¸¦ hotplug agent¶ó°í ºÎ¸¥´Ù.
  • /etc/hotplug.d/default/default.hotplug´Â linux-hotplug.sf.net¿¡¼­ Á¦°øÇÏ´Â °ÍÀ¸·Î ÇØ´ç ÀåÄ¡°¡ ÇÊ¿ä·Î ÇÏ´Â Ä¿³Î ¸ðµâÀ» ÀûÀçÇÏ´Â ¿ªÇÒÀ» ÇÑ´Ù.
  • /etc/hotplug.d/default/udev.hotplug´Â ¸®´ª½º 2.6¿¡¼­ µ¿ÀÛÇÏ´Â °ÍÀ¸·Î ±âÁ¸ÀÇ devfs¸¦ ±³Ã¼ÇÏ°í À¯¿¬ÇÑ ÀåÄ¡À̸§À» Á¦°øÇÑ´Ù.
  • /etc/hotplug.d/default/hal.hotplug´Â HAL Daemon¿¡ ÇØ´çÀåÄ¡°¡ ¿¬°áµÇ¾ú´Ù´Â °ÍÀ» dbus¸¦ ÅëÇØ ¾Ë·ÁÁØ´Ù.
  • °¢ ½ºÅ©¸³Æ®¿¡¼­ ȯ°æº¯¼ö¸¦ ÂüÁ¶Çؼ­ ÀåÄ¡¿¡ ´ëÇÑ ÀÛ¾÷À» ¼öÇàÇÑ´Ù.
  • ȯ°æº¯¼ö´Â ´ÙÀ½°ú °°´Ù.

Linux 2.4


  • USB
    ACTION=%s [add or remove] 
    DEVPATH=%s
    PRODUCT=%x/%x/%x 
    INTERFACE=%d/%d/%d [ for interface 0, if TYPE=0/*/* ] 
    TYPE=%d/%d/%d 
    


  • IEEE1394
    ACTION=%s [add or remove] 
    VENDOR_ID=%x [24 bit vendor id]
    GUID=%x [64 bit globally unique id]
    SPEFICIER_ID=%x [24 bit id of owner of specification]
    VERSION=%d.%d [version of specification]
    


  • PCI
    ACTION=%s [add or remove] 
    PCI_CLASS=%06X 
    PCI_ID=%04X:%04X 
    PCI_SLOT_NAME=%s 
    PCI_SUBSYS_ID=%04X:%04X
    


Linux 2.6


  • ¸®´ª½º Ä¿³Î 2.6 ¿¡¼­´Â ÀåÄ¡ÀÇ Å¬·¡½ºµå¶óÀ̹ö°¡ ¾Æ´Ñ kobject¼öÁØ¿¡¼­ hotplug½ºÅ©¸³Æ®¸¦ È£ÃâÇÑ´Ù.
  • ´õºÒ¾î °¢ ÀåÄ¡¿¡ ´ëÇØ ´ëÀÀµÇ´Â sysfsÀÇ °æ·Î°¡ ÇÔ²² ȯ°æº¯¼ö·Î ³Ñ¾î¿Â´Ù.
  • SCSI, SCSI_HOST, SCSI_DEVICE, BLOCK, INPUT, NET

ACTION=%s [add or remove]
DEVPATH=/%s/%s...

LinuxHotplugÀÇ ½ÇÁ¦ È°¿ë¿¹


gphoto2

  • gphoto2´Â ¿©·¯ Unix½Ã½ºÅÛ¿¡¼­ ¾µ ¼ö ÀÖ´Â µðÁöÅÐÄ«¸Þ¶ó °ü¸® ÇÁ·Î±×·¥ÀÌ´Ù.
  • gphoto2¸¦ ¼³Ä¡Çϸé /etc/hotplug/usb/usbcam ½ºÅ©¸³Æ®°¡ µî·ÏµÈ´Ù.
  • usbcam½ºÅ©¸³Æ®´Â gphoto2¿¡¼­ Áö¿øÇÏ´Â Ä«¸Þ¶ó°¡ ¿¬°áµÇ¾úÀ» ¶§ ÇöÀç consoleÀ» ¾²´Â »ç¿ëÀÚ¿¡°Ô µðÁöÅÐÄ«¸Þ¶ó¿¡ Á¢±ÙÇÒ ¼ö ÀÖ´Â Çã°¡±ÇÀ» ÁØ´Ù.

ID
Password
Join
You will meet an important person who will help you advance professionally.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-09-06 15:49:31
Processing time 0.0045 sec