@@ -82,6 +82,11 @@ bindeb-pkg:
$(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian
+dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc
+PHONY += imgdeb-pkg
+imgdeb-pkg:
+ DEBIAN_IMAGE_ONLY=1 $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian
+ +dpkg-buildpackage -r$(KBUILD_PKG_ROOTCMD) -a$$(cat debian/arch) $(DPKG_FLAGS) -b -nc -uc
+
PHONY += intdeb-pkg
intdeb-pkg:
+$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb
@@ -201,7 +201,7 @@ EOF
chmod 755 "$tmpdir/DEBIAN/$script"
done
-if [ "$ARCH" != "um" ]; then
+if [ "$ARCH" != "um" ] && [ -z "$DEBIAN_IMAGE_ONLY" ]; then
deploy_kernel_headers debian/linux-headers
create_package linux-headers-$version debian/linux-headers
@@ -169,7 +169,8 @@ License version 2 can be found in \`/usr/share/common-licenses/GPL-2'.
EOF
# Generate a control file
-cat <<EOF > debian/control
+{
+ cat <<EOF
Source: $sourcename
Section: kernel
Priority: optional
@@ -183,6 +184,17 @@ Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other
files, version: $version.
+Package: $dbg_packagename
+Section: debug
+Architecture: $debarch
+Description: Linux kernel debugging symbols for $version
+ This package will come in handy if you need to debug the kernel. It provides
+ all the necessary debug symbols for the kernel and its modules.
+EOF
+
+ if [ -z "$DEBIAN_IMAGE_ONLY" ]; then
+ cat <<EOF
+
Package: $kernel_headers_packagename
Architecture: $debarch
Description: Linux kernel headers for $version on $debarch
@@ -198,14 +210,13 @@ Description: Linux support headers for userspace development
This package provides userspaces headers from the Linux kernel. These headers
are used by the installed headers for GNU glibc and other system libraries.
Multi-Arch: same
-
-Package: $dbg_packagename
-Section: debug
-Architecture: $debarch
-Description: Linux kernel debugging symbols for $version
- This package will come in handy if you need to debug the kernel. It provides
- all the necessary debug symbols for the kernel and its modules.
EOF
+ fi
+} > debian/control
+
+if [ -n "$DEBIAN_IMAGE_ONLY" ]; then
+ DEBIAN_IMAGE_ONLY_ENV="DEBIAN_IMAGE_ONLY=1"
+fi
cat <<EOF > debian/rules
#!$(command -v $MAKE) -f
@@ -214,11 +225,13 @@ srctree ?= .
build:
\$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
- KBUILD_BUILD_VERSION=${revision} -f \$(srctree)/Makefile
+ KBUILD_BUILD_VERSION=${revision} ${DEBIAN_IMAGE_ONLY_ENV} \
+ -f \$(srctree)/Makefile
binary-arch:
\$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
- KBUILD_BUILD_VERSION=${revision} -f \$(srctree)/Makefile intdeb-pkg
+ KBUILD_BUILD_VERSION=${revision} ${DEBIAN_IMAGE_ONLY_ENV} \
+ -f \$(srctree)/Makefile intdeb-pkg
clean:
rm -rf debian/*tmp debian/files
This skips building the linux-headers and linux-libc-dev packages, which take much longer to build, and which aren't needed for many common test scenarios. Signed-off-by: Josh Triplett <josh@joshtriplett.org> --- scripts/Makefile.package | 5 +++++ scripts/package/builddeb | 2 +- scripts/package/mkdebian | 33 +++++++++++++++++++++++---------- 3 files changed, 29 insertions(+), 11 deletions(-)