kernel udebs are those are created by the Debian kernel package. A package built with "make deb-pkg" from within an upstream kernel tree only builds regular debs, but no udebs. To have udebs for a custom kernel, you should start from the Debian kernel package sources and modify them as needed for your custom kernel.
The Debian kernel package repository is available at kernel
Please note that this repository only contains the packaging part, not the upstream kernel sources.
For how to use that with an upstream kernel source, please read root/debian/README.source
I use "make bindeb-pkg" in the vanilla kernel tree regulary and in the past I used also something like "dpkg-buildpackage -b -rfakeroot" in the debian kernel source package.
background information:
The last one is rather old and hasn't been updated for quite a while, but it still provides a useful overview about which basic components the installer has.
For building, checkout the source with mr as described in the first link above. You can then either run the normal Debian package building process (provided you have all dependencies installed, you can simply run "dpkg-buildpackage -us -uc -rfakeroot", but preferably use either pbuilder or sbuild), or you can build single installer targets such as the netboot target separately. Just running make gives you a list of supported targets. Taking the netboot target as an example, the following commands build it:
$ fakeroot make reallyclean && fakeroot make build_netbootThe results are placed in the "dest" directory.
"make deb-pkg" uses a function of the upstream kernel Makefile to build .deb packages. This function doesn't support building udebs; udebs are only built by the Debian kernel package build infrastructure, which is in debian/rules (and is called by dpkg-buildpackage).
To build a Debian kernel package including udebs from git, run the following steps:
$ sudo apt-get install build-essential fakeroot rsync git $ sudo apt-get build-dep linux $ git clone -b sid --single-branch https://anonscm.debian.org/git/kernel/linux.git (this gets you the Debian packaging files for a kernel package) $ cd linux $ ./debian/bin/genorig.py /path/to/local/linux-kernel-git-repository (this creates a DFSG-free upstream kernel tarball for the kernel version defined by the newest entry in debian/changelog from an upstream kernel git repository) $ debian/rules orig (this unpacks the upstream kernel tarball in the right place for the package build process) $ debian/rules debian/control (this creates the final control file for building the package from a template) $ dpkg-buildpackage -us -uc -rfakeroot -B (this runs the actual binary package build, using the control file generated in the previous step)For building the package from a custom kernel source, create a new changelog entry that fits your custom kernel in debian/changelog and replace /path/to/local/linux-kernel-git-repository with the path to your custom kernel repository. If you are working on a bleeding-edge kernel source (i.e. 4.15rc), you should use the "master" branch of https://anonscm.debian.org/git/kernel/linux.git instead of the "sid" branch as your base.
2018/01/16 added Bootstrapping Debian Packages at Peter Eisentraut's Blog:
I start with nothing, call debuild, fix the error, retry, until it works. This might sound pretty bizarre, but it works pretty well and enhances your understanding of how the packaging tools work.
2018/01/20 Debian version numbers and ABIs from Debian Linux Kernel Handbook.
2018/01/26 netboot build: I'm not sure how functional these examples are for building, but may provide usage hints
2018/01/27 Debian Boot mailing list
* apt-get source debian-installer * Install the build-dependencies on the host system * (did not install a sources list as I'm happy with the system one) * make And upon success * make build_netboot
2018/01/28
- Debian Installer Git Repository
- Beginner question - stable installer build fails - why?
- Debian Installer Notes for building
- Debian Installer CheckOut
- Debian Installer Build
- Custom Debian NetInstall
dpkg-buildpackage and debian/rules are the standard interface to building Debian packages, so there's very little point in mentioning that specifically. Also, build/README contains this: | Recipe: | - Install the build-dependencies on the host system | (run dpkg-checkbuilddeps in the parent installer/ directory). | - Create your own sources.list.udeb.local, otherwise the build host's | sources.list is taken as a template for sources.list.udeb. | - Run "make" to get a list of available targets. | - Build an image using one of the build_ targets (build_netboot, | all_build, etc). You may want to set the USE_UDEBS_FROM variable, | documented below. | - Look in dest/ for the completed images. and the documentation of USE_UDEBS_FROM points to debian/rules already.
- Build NetInstall and test with qemu
- Custom Debian Live
As a side note, Debian PXE Boot Install suggests using the debian-installer-$VERSION-netboot-$ARCH package instead of downloading the netboot.tar.gz file.
Debian Installer Internals by Frans Pop - lots of detail
2018/02/12 - Using Git for Debian Packaging by Russ Allbery. Also by him: Building Kernels the Debian Way
2018/02/21 - DebianInstaller/BootpTFTP
2018/02/22 - InstallingDebianOnTurrisOmnia has a number of interesting ideas: installing images on btrfs subvolumes, using uboot, busybox is on stretch and has minicom, and a few other tricks. I jumped to this link from flash-kernel.