Ubuntu kernel buildsystem and localversion*

Andy Whitcroft apw at canonical.com
Wed Jun 25 12:47:03 UTC 2014


On Tue, Jun 24, 2014 at 08:25:53PM +0200, Christoph Mathys wrote:
> I tried to build a custom kernel using ubuntu debian packaging patches
> (patch files from the mainline kernel builds, e.g.
> 0001-base-packaging.patch). The custom kernel has a file called
> localversion-rt containing -rt30 in the kernel root dir (which is
> afaik the same as setting CONFIG_LOCALVERSION). The content of this
> file is appended to the kernel version number by the kernels build
> system. The version number is also used to install modules.
> 
> An excerpt of the resulting error:
> 
> $ fakeroot debian/rules -j9 binary-preemptrt
> ... snip ...
>      run-parts -v debian/tests-build
> #
> # Remove files which are generated at installation by postinst,
> # except for modules.order and modules.builtin
> #
> # NOTE: need to keep this list in sync with postrm
> #
> mkdir /home/chrigu/Work/linux-stable-rt/debian/linux-image-3.12.19.30-1-preemptrt/lib/modules/3.12.19.30-1-preemptrt/_
> mv /home/chrigu/Work/linux-stable-rt/debian/linux-image-3.12.19.30-1-preemptrt/lib/modules/3.12.19.30-1-preemptrt/modules.order
> \
>         /home/chrigu/Work/linux-stable-rt/debian/linux-image-3.12.19.30-1-preemptrt/lib/modules/3.12.19.30-1-preemptrt/_
> mv: cannot stat
> '/home/chrigu/Work/linux-stable-rt/debian/linux-image-3.12.19.30-1-preemptrt/lib/modules/3.12.19.30-1-preemptrt/modules.order':
> No such file or directory
> make: *** [install-preemptrt] Error 1
> 
> $ ls debian/linux-image-3.12.19.30-1-preemptrt/lib/modules
> 3.12.19.30-1-preemptrt  3.12.19.30-1-preemptrt-rt30
> 
> 
> Can the ubuntu kernel build system deal with this at all? Looking at
> the error I think that the kernel installed its modules to some place
> (honoring localversion*), but debuild expected a different directory
> (ignoring localversion*).

Basically no it cannot cope with them, when building the mainline builds
which you took the packaging from we delete those files to avoid the
issue.  They have a standard form.

-apw




More information about the kernel-team mailing list