Hi, I am looking for a fast target to build debian linux-image packages, to be used for quickly testing things (dev/test cycle) rather than for full proper releases. The current bindeb-pkg almost does what I want, but not quite: - It still creates linux-headers and linux-libc-dev packages; overall taking about 3x the time than would be needed for just the linux-image package; - It places packages in .. ; I would prefer to have them in a the root of my kernel tree or in a subdirectory thereof. (I figure these goals are probably similar to those of the fastdeb-pkg target that was proposed in https://patchwork.kernel.org/project/linux-kbuild/patch/20170331130941.5250-4-riku.voipio@xxxxxxxxxx/ ; I am not sure if there is any ongoing discussion about that) The following change to the builddeb script implements both of the desired goals: - builds only the linux-image package if NO_HEADER_PACKAGES is set; - creates packages in $UPLOAD_DIR instead of .. if set diff --git scripts/package/builddeb scripts/package/builddeb index 91a502bb97e8..b83a4a09a75d 100755 --- scripts/package/builddeb +++ scripts/package/builddeb @@ -50,7 +50,7 @@ create_package() { # Create the package dpkg-gencontrol -p$pname -P"$pdir" - dpkg-deb $dpkg_deb_opts ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" .. + dpkg-deb $dpkg_deb_opts ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" "${UPLOAD_DIR:-..}" } deploy_kernel_headers () { @@ -208,7 +208,7 @@ EOF chmod 755 "$tmpdir/DEBIAN/$script" done -if [ "$ARCH" != "um" ]; then +if [ "$ARCH" != "um" -a -z "$NO_HEADER_PACKAGES" ]; then if is_enabled CONFIG_MODULES; then deploy_kernel_headers debian/linux-headers create_package linux-headers-$version debian/linux-headers Even with this, the .changes and .buildinfo files are still created in .., though. I am using the following target in Makefile.package to drive this: diff --git scripts/Makefile.package scripts/Makefile.package index f952fb64789d..304073f5fbcd 100644 --- scripts/Makefile.package +++ scripts/Makefile.package @@ -82,6 +82,13 @@ bindeb-pkg: $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc +PHONY += bindeb-kpkg +bindeb-kpkg: + KDEB_PKGVERSION=1 $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian + @if test ! -e pkgs; then mkdir pkgs; echo "*" > pkgs/.gitignore; fi + +UPLOAD_DIR=pkgs NO_HEADER_PACKAGES=1 dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc --buildinfo-option=-upkgs --changes-option=-q --changes-option=-upkgs + @version="$(KERNELRELEASE)_1_$$(cat debian/arch)" && rm -f "pkgs/linux-$${version}.buildinfo" "../linux-$${version}.changes" && ln -sf "linux-image-$${version}.deb" "pkgs/LATEST.deb" + PHONY += intdeb-pkg intdeb-pkg: +$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb This is as clean as I was able to make it, though still not perfect - I think it would be much nicer if it was possible not to create the .buildinfo and .changes files at all in the first place. Would anyone have suggestions as to how to clean up those bits, and also, would there be any interest in integrating this upstream ? Thanks,