source: chapter06/hotplug.xml@ 7db6ac5

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.0 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 7db6ac5 was 7db6ac5, checked in by Jeremy Utley <jeremy@…>, 20 years ago

Corrected the hotplug patch in chapter 6 instructins

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3779 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 5.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-system-hotplug" xreflabel="Hotplug" role="wrap">
7<title>Hotplug-&hotplug-version;</title>
8<?dbhtml filename="hotplug.html"?>
9
10<indexterm zone="ch-system-hotplug"><primary sortas="a-Hotplug">Hotplug</primary></indexterm>
11
12<sect2 role="package"><title/>
13
14<para>The Hotplug package contains scripts that react upon various changes
15in the kernel state, in particular, addition and removal of hardware. This
16package also detects existing hardware during boot and inserts the relevant
17modules into the running kernel.
18</para>
19<segmentedlist>
20<segtitle>&buildtime;</segtitle>
21<segtitle>&diskspace;</segtitle>
22<seglistitem><seg>0.01 SBU</seg><seg>0.1 MB</seg></seglistitem>
23</segmentedlist>
24
25</sect2>
26
27<sect2 role="installation">
28<title>Installation of Hotplug</title>
29
30<para>
31Apply the patch that avoids bogus dependencies of the
32<filename>usb.rc</filename> script
33upon <application>which</application> and
34<application>usbutils</application> packages:
35</para>
36
37<screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-bogus_deps-1.patch</userinput></screen>
38
39<para>
40USB coldplugging is somewhat broken in Hotplug by default. Fix this with the
41following patch:
42</para>
43
44<screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-device-2.patch</userinput></screen>
45
46<para>
47At last, there is an optional patch that adds ISAPNP hardware detection
48capabilities to hotplug. It is not well tested. If you chose to apply it,
49run the following command:
50</para>
51
52<screen><userinput>patch -Np1 -i ../hotplug-&hotplug-version;-isapnp-2.patch</userinput></screen>
53
54
55<para>And finally install the hotplug package:</para>
56
57<screen><userinput>make install</userinput></screen>
58
59<para>Remove hotplug's not-so-clean init script, since we're going to be using
60the script including with LFS-Bootscripts:</para>
61
62<screen><userinput>rm -rf /etc/init.d</userinput></screen>
63
64<para>
65If you have applied the ISAPNP patch, add some required entries to
66<filename>/etc/modprobe.conf</filename>:</para>
67
68<screen><userinput>cat &gt;&gt;/etc/modprobe.conf &lt;&lt;"EOF"</userinput>
69# Begin /etc/modprobe.conf entries for ISAPNP hardware detection script
70# by Marco d'Itri
71alias pnp:dPNP0511 irtty-sir
72alias pnp:dPNP0700 floppy
73alias pnp:dPNP0800 pcspkr
74alias pnp:dPNP0B00 rtc
75alias pnp:dPNP0303 atkbd
76alias pnp:dPNP0F13 psmouse
77alias pnp:dPNPB02F analog
78# End /etc/modprobe.conf entries for ISAPNP hardware detection script
79<userinput>EOF</userinput></screen>
80
81<para>These entries may become unneded for newer versions of Linux kernel,
82since Marco d'Itri will try to convince developers to put them into the
83corresponding modules themselves.</para>
84
85</sect2>
86
87
88<sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
89
90<variablelist>
91<varlistentry id="hotplug">
92<term><command>/sbin/hotplug</command></term>
93<listitem>
94<indexterm zone="ch-system-hotplug hotplug"><primary
95sortas="b-hotplug">hotplug</primary></indexterm>
96<para>This script is called by default by Linux kernel when something
97changes in its internal state (e.g. a new device is added or removed).</para>
98</listitem>
99</varlistentry>
100
101<varlistentry id="hotplug-rc">
102<term><command>*.rc</command> files in
103<filename class="directory">/etc/hotplug</filename> directory</term>
104<listitem>
105<para>These scripts are used for cold plugging, i.e. detection and other
106specific actions upon hardware already present during system startup.
107They are called by the <filename>hotplug</filename> initscript that comes
108from the lfs-bootscripts package.
109The <command>*.rc</command>
110scripts try to find kernel modules corresponding to your hardware and insert
111them into the running kernel.
112</para>
113</listitem>
114</varlistentry>
115
116<varlistentry id="hotplug-agent">
117<term><command>*.agent</command> files in
118<filename class="directory">/etc/hotplug</filename> directory</term>
119<listitem>
120<para>These scripts are called by <command>/sbin/hotplug</command>
121in response to different types of hotplug events generated by the kernel.
122Their action is to insert corresponding kernel modules and call user-provided
123scripts, if any.
124</para>
125</listitem>
126</varlistentry>
127
128<varlistentry id="hotplug-functions">
129<term><filename>/etc/hotplug/hotplug.functions</filename></term>
130<listitem>
131<para>This file contains common functions used by other scripts in hotplug
132package.
133</para>
134</listitem>
135</varlistentry>
136
137<varlistentry id="hotplug-blacklist">
138<term><filename>/etc/hotplug/blacklist</filename></term>
139<listitem>
140<indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
141sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
142<para>This file contains the list of modules that should never be
143inserted into the kernel by hotplug scripts.
144</para>
145</listitem>
146</varlistentry>
147
148<varlistentry id="hotplug-subdirs">
149<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
150<listitem>
151<para>These directories are supposed to contain user-written handlers for
152hotplug events.
153</para>
154</listitem>
155</varlistentry>
156
157<varlistentry id="hotplug-usb.usermap">
158<term><filename>/etc/hotplug/usb.usermap</filename></term>
159<listitem>
160<indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
161sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
162<para>This file contains rules that determine which user-defined handlers to
163call for each USB device, based on its vendor, id and other attributes.
164</para>
165</listitem>
166</varlistentry>
167
168<varlistentry id="hotplug-hotplug.d">
169<term><filename class="directory">/etc/hotplug.d</filename></term>
170<listitem>
171<para>This directory contains programs (or symlinks to them)
172that are interested in receiving all hotplug events. E.g.,
173<application>udev</application> puts its symlink here during installation.
174</para>
175</listitem>
176</varlistentry>
177</variablelist>
178</sect2>
179</sect1>
Note: See TracBrowser for help on using the repository browser.