summaryrefslogtreecommitdiffstats
path: root/README
blob: f54dd13b22d4c5658ed4e8e049c2a7477477cecb (plain)
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
Migrating to the common kernel-image package
-------------------------------------------- 
Files for architecture <arch> should be placed into arch/<arch>. This
directory normally contains a common config file for this architecture
('config'), flavour-specific config files, Makefile.inc file,
controlling the build for this arch, and the defines file, containing
the machine descriptions for various flavours.  For arches with
subarches the subdirectory arch/<arch>/<subarch> with the same file
structure must be created for each subarch.

Kernel config files
-------------------
Configuration files are constructed dynamically by concatenating a number
of config files as described below. 

For architecture without subarches:

  arch/config
  arch/<arch>/config 
  arch/<arch>/config.<flavour>
  
For architecture with subarches:

  arch/config
  arch/<arch>/config
  arch/<arch>/<subarch>/config
  arch/<arch>/<subarch>/config.<flavour>

Control file
------------
The master control file debian/control must be generated before
the package is uploaded. debian/rules contains the debian/control 
target, which generates the control file by invoking the 
debian/bin/gencontrol.py script, which combines the templates from
the templates directory and arch/subarch specific defines file to
produce the debian/control file. Note that this target is intentionally
made to fail with a non-zero exit code to make sure that it is never
run during an automatic build. The following variables are substituted
into the templates:

@version@      Upstream kernel version, for example 2.6.11.
@major@        The major version, for example 2.6
@arch@         The Debian arch name, such as powerpc or i386.
@subarch@      The subarch - only used by powerpc right now.
@flavour@      The build flavour, such as 686 or k7-smp.
@class@        The CPU/architecture class; displayed in synopsis.  It should
               be fairly short, as the synopsis is supposed to be <80 chars.
               It should be in the form "foo class", and will show up in the
	       description as "foo class machines".
@longclass@    The CPU/architecture class; displayed in the extended
               description.  The same rules apply as in @class@.  If
	       this is unset, it will default to @class@.
@desc@         (Potentially) multi-line verbiage that's appended to
               -image descriptions.
@abiname@      Current abiname, a single digit.

Normally, the arch-specific contents should be controlled by
adjusting the corresponding defines file.

Makefile.inc
------------
Each architecture subdirectory in arch may contain a Makefile.inc
file, which is included by debian/rules after definining all the
variables. It may be used to override the standard variables on
per-architecture basis and other evil things. So far the valid uses of
this file include the setting of the following variables:

image_postproc

  A command to be run after the kernel image is built. As far as I know,
  it only required on sparc for stripping of the kernel which is too big
  to be booted otherwise. Typical use is too ugly to be presented here.