File: thinkpad-source.README.Debian

package info (click to toggle)
thinkpad 5.8-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 604 kB
  • ctags: 1,459
  • sloc: ansic: 5,985; makefile: 226; sh: 179; asm: 44; sed: 22
file content (113 lines) | stat: -rw-r--r-- 4,273 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
thinkpad drivers for DEBIAN
===========================

News
----

Documentation originally by Steve Haslam <araqnid@debian.org>
Adjusted by Adrian Bridgett <bridgett@debian.org>
Adapted by Thomas Hood <jdthood@yahoo.co.uk>
Last updated 3 January 2005

Introduction
------------

The drivers work with kernel 2.4.19 and later.  Drivers other than the
APM-interface driver work with late 2.2 kernels.  Kernels 2.3.0 through
2.4.18 and kernels prior to 2.2 are not supported.

The APM driver should be built with the kernel.


Using this package to make a modules package using kernel-package
-----------------------------------------------------------------

First, install the kernel-package and fakeroot packages.

After the thinkpad-source package is installed there is a file
/usr/src/thinkpad.tar.gz.  Now cd to /usr/src/ and unpack this archive.

    cd /usr/src
    tar zxvf thinkpad.tar.gz

This will create the directory /usr/src/modules/thinkpad.

Next cd to the root of the source tree for the kernel for which you want
to compile modules, e.g., /usr/src/kernel-source-2.4.27/.  If you
don't have this directory yet then do something along these lines:

    apt-get install kernel-source-2.4.27 kernel-package fakeroot
    cd /usr/src
    tar jxf kernel-source-2.4.27.tar.bz2
    cd kernel-source-2.4.27
    # Copy a .config here or make one with, e.g., "make menuconfig"
    # Make sure that the APM driver is selected to be built with the kernel
    make-kpkg --rootcmd=fakeroot --append-to-version=-foo kernel-image

Then do:

    make-kpkg --rootcmd=fakeroot --append-to-version=-foo modules-image

(The value of the append-to-version option must be the same as that used
for building the kernel image, of course.) This should create a package
in /usr/src named something like this:

    thinkpad-modules-2.4.27-foo_5.8-2+10.00.Custom_i386.deb

Install this package using the dpkg program.


Using this package to make a modules package without using kernel-package
-------------------------------------------------------------------------

Unpack the source tarball.

The script debian/buildpkg will execute the right rules to make the
package for you, provided you have generated $KSRC/include/linux/modversions.h
by running "make dep" in the source tree.  (FYI "make dep" is executed by
"make-kpkg kernel-image" or by "make-kpkg modules-image".)  If you have
kernel-package's configuration file installed, buildpkg will take values
(for maintainer, revision, root cmd, etc.) from that.  It will look in
$KSRC or in /usr/src/linux for the kernel source.

If you invoke it with a single parameter "clean", it will clean up the
build area instead of building a package.  Alternatively you can use
debclean.

Example:
  cd ~foo/kernel/modules/thinkpad
  KSRC=~foo/kernel/linux debian/buildpkg
  sudo dpkg -i ~foo/kernel/thinkpad-modules-2.2.14_2.2-1+custom1_i386.deb
  debclean

If you object to building modules as root, try changing the group or
ownership of the /usr/src/modules tree to something you can write to
(chown it to you, or chgrp it to src, make it group writable and put
yourself in the src group).  Make sure that buildpkg can figure out the
ROOTCMD parameter (e.g. in /etc/kernel-pkg.conf, or simply install
fakeroot) and it will do the compiling as you and the building using
$ROOTCMD (which can be fakeroot or sudo as you wish).

Maintaining this package
------------------------

This section is aimed at people who are building a custom thinkpad-source
package.  Normally this isn't necessary.

When building thinkpad-source, the files from debian/thinkpad-modules.d/
are put into thinkpad.tar.gz in some cases with some sed processing.

The changelog source is in "thinkpad-modules.changelog.sed".  Before being
put in thinkpad.tar.gz, "OURVERSION" is replaced by thinkpad-source's
version number and the "changelog" file is prepended.  When the module
package is finally built, the other keywords such as KDREV and KVERS are
replaced with the correct values.

The module packages' version numbers are "OURVERSION+KDREV", where
KDREV is the "debian" keyword for kernel-package.  So you get:

 2.3.4-2+custom1

So modules built from a later thinkpad-source will always have a larger
version number than those built from earlier sources.