I would like to build this kernel: https://github.com/raspberrypi/linux/tree/rpi-4.14.y-rt

It's the kernel for the raspberry pi. I would like to build the deb packages which can be done with: make deb-pkg.

When installing the resulting packages, a vmlinuz**** file is installed into /boot. The Raspberry Pi needs an .img image tough.

The .img image can be generated using make zImage.

Now I just need to find a way to include the .img in the deb packages.

I think this script is responsible for the deb package creation: https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb

Here is what I tried:

# ./zImage is the generated .img image
mv ./zImage ./arch/arm/boot/kernel7.img
make deb-pkg

It was completely ignored and not included in the resulting .deb files.

I know I could probably just unpack the deb packages, add the file and pack them again, but I think the other files might not be valid then anymore (the .changes file for instance).

1 Answer 1


'debian/rules' is a file that contain build and install instructions. In https://github.com/raspberrypi/linux/blob/rpi-4.14.y-rt/scripts/package/builddeb it's definition begins from line 389 to 405. Section 'build-arch' is responsible for finally package build.

    \$(MAKE) KDEB_SOURCENAME=${sourcename} KDEB_PKGVERSION=${packageversion} bindeb-pkg  

So, you should edit 'Makefile' of this project in target bindeb-pkg. In this place resulting package is being produced.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .