File: README.modules

package info (click to toggle)
kernel-package 7.04.potato.3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 736 kB
  • ctags: 243
  • sloc: perl: 1,629; makefile: 1,002; sh: 217
file content (113 lines) | stat: -rw-r--r-- 5,081 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

		Add on modules and the kernel-package
                === == ======= === === ==============

	There are a number of add-on modules (that is, kernel modules
 are developed apart fromt he Linux kernel and do not appear in the 
 mainstream kernel sources). Notables, at the time of writing, are the 
 pcmcia-cs and and the alsa sound modules.

	Most of these modules need to be compiled for each kernel
 version; they are very dependent on kernel structures. It was
 suggested that it would be nice to be able to build the add-on
 modules whenever one created a new kernel, and kernel-package
 provides some mechanisms to do so for co-operating add-on modules. 

	In order for this to work, the add on modules must appear in
 a standard location, choosen to be $(MODULE_LOC)/<mod-name>/
 (MODULE_LOC defaults to /usr/src/modules, and can be set either on in
 the environment or the configuration file), and must arrange to be
 manipulated by the kernel-package mechanisms.

USER INSTRUCTIONS
==== ============

     1)   Ensure that the module source tree is in a subdirectory of
          the $(MODULE_LOC)[/usr/src/modules] directory.  Use a
          symbolic link to the actual source tree if you must.

     2)   As root, go to the the base of the kernel source tree (usually
          the /usr/src/linux directory).  If you are building a kernel that
          is custom configured to your specifications, go ahead and
          configure the kernel with `make config,' `make menuconfig,' or
          `make xconfig.'

     3)   To build a new kernel-image package, execute:
               make-kpkg --revision number kernel_image
          This will generate a kernel-image-<kernel version> deb file
          in the parent directory.  Here number (the argument supplied
          after the --revision flag) is a version number for your
          custom built kernel.  You may also do this on the fly by
          setting the DEBIAN_REVISION environmental variable.  It is
          important that you choose the revision number in such a way
          that a generic kernel-image package will not override the
          custom package while using dselect (or `dpkg -BOGiE').  I
          recommend a two-level scheme where the major level starts
          with a letter.  One such scheme is your (short) host name
          followed by a dot (.) and a number.  For example, if your
          machine is named myhost, you would use --revision myhost.1
          in the command line.  If you had to rebuild your custom
          kernel, you would use --revision myhost.2 and so on.  See
          /usr/share/doc/kernel-package/README.gz for more information on
          revision numbers.

     3)   To build the actual module packages, execute:
               make-kpkg --revision number modules_image
          where number is the same revision number used to build the
          kernel-image package in the previous step. This will generate a
          pcmcia-modules-<kernel version> deb file in the parent directory.

     4)   Install the two newly created deb files (you can use `dpkg -i
          file').

     5)   Clean the source trees:
		make-kpkg clean modules_clean

        kernel-package provides for four targets for the use of
 stand-alone kernel modules packages.

	The special targets to give to make-kpkg are:
 a) modules-image modules_image:   only generate module binary
				   packages. Please remember to clean
				   the modules after the build; see
				   the sample files for an example. 
 b) modules:                       generate the modules packages and
                                   sign them with dchanges (this
                                   creates the sorce and diff packages
                                   as well)
 c) modules-config modules_config: only configure the module
 d) modules-clean  modules_clean:  Clean the modules source tree, and
				   undo all changes made by the above
				   cammands. 
	
	So, add to the 
4% fakeroot make-kpkg --revision=custom.1.0 kernel_image 
4a% fakeroot make-kpkg --revision=custom.1.0 modules_image,
        and remember to install the modules (after you have installed
 the kernel-image) by saying 
5# dpkg -i ../kernel-image-X.XXX_1.0_<arch>.deb
5a# dpkg -i /usr/src/modules/<mode-name>-<version>.deb
	
MODULE Packaging hints
====== ========= =====

        make-kpkg arranges to cd into each modules top directory,
 /usr/src/modules/<mod-name>/, and runs ./debian/rules <target>. 
 Additionally, the following information is provided in the
 environment:
 a) KVERS  Contains the kernel version
 b) KSRC   Contains the location of the kernel sources 
 c) KMAINT Contains the Name of the maintainer to pass to PGP
 d) KEMAIL Caontains the email address of the maintainer

	Please have a look at the sample files for creating a
 dependent modules package, sample.module.rules and
 sample.module.control.

	Have fun,

	manoj
-- 
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E