Re: make rpm

From: Ben Pfaff (
Date: Sat Jul 28 2001 - 20:05:46 EST

Alan Cox <> writes:

> I've been meaning to do this one for a while and I now have it working so
> that with my current -ac kernel working tree I can type
> make rpm
> and out puts kernel-2.4.7ac3-1.i386.rpm
> All this took was the pieces below.
> Anyone care to knock up a "make dpkg" to go with it ?

Debian has had a package that does this for years now. It's
called `kernel-package' and works through a program called
`make-kpkg' that does all sorts of nice things. Using
kernel-package, you could implement `make dpkg' as a single
command: `make-kpkg kernel_image'.

Here's some more about kernel-package in the program's own words:

blp:~(0)$ make-kpkg --targets
 Known Targets are:
| Targets | Automatically builds |
| clean | |
| buildpackage | Builds the whole package |
| binary | Builds kernel_{source,headers,image,doc} |
| binary-indep | |
| kernel_source | |
| kernel_doc | |
| binary-arch | |
| kernel_headers | |
| kernel_image | Builds build |
| build | |
| modules | |
| modules_image | |
| modules_config | |
| modules_clean | |
| configure | If you wish to edit files |
| debian | generated by make config |
| debian | Creates ./debian dir, and |
| | optionally patches the source |
See /usr/share/kernel-package/rules for details.
blp:~(0)$ make-kpkg --help
This program should be run in a linux kernel source top level directory.
/usr/share/doc/kernel-package/Problems.gz contains a list of known problems.

usage: make-kpkg [options] target [target ...]
  where options are:
 --help This message.
 --revision number The debian revision number. ([a-zA-Z.+0-9]) (Must
                         have digit, no hyphen allowed)
 --flavour foo an additional kernel sub-version. ([-a-z.+0-9])
 --append-to-version foo
 --append_to_version foo an additional kernel sub-version. ([-a-z.+0-9])
                         Does not require editing the kernel Makefile
                         over rides env var APPEND_TO_VERSION.
                         requires a make-kpg clean
 --added-modules foo
 --added_modules foo Comma/space separated list of add on modules
                       affected by the modules_<blah> targets
 --added-patches bar
 --added_patches bar Comma/space separated list of patches applicable
                        when patch_the_kernel is turned on
 --arch foo architecture
 --cross_compile target string
 --subarch bar Set the subarch for the image being compiled
                        (have to be on a compatible machine).
 --arch_in_name Embed the subarch in the image package name
 --initrd Create a image package suitable for initrd
 --pgpsign name An ID used to sign the changes file using pgp.
 --targets Lists the known targets.
 --zimage Create a kernel using zImage rather than bzImage
 --bzimage Create a kernel using bzImage (in case the site
                       wide default is zimage, as set in
 --rootcmd method A command that provides a means of gaining
                             superuser access (for example, `sudo' or
                             `fakeroot') as needed by dpkg-buildpackages'
                             -r option. This is only relevant for the
                             buildpackage target.
 --us This option is passed to dpkg-buildpackage, and
                       directs that package not to sign the
                       source. This is only relevant for the
                       buildpackage target.
 --uc This option is passed to dpkg-buildpackage, and
                       directs that package not to sign the
                       changelog. This is only relevant for the
                       buildpackage target.

Use one of --zimage or --bzimage, or none, but not both.

Option Format: The options may be shortened to the smallest unique
string, and may be entered with either a - or a -- prefix, and you may
use a space between an option string and a value. Please refer to man
Getopt::Long for details on how the options may be entered.

Version: $Revision: 1.60 $
Manoj Srivastava <>

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:39 EST