Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #57391

[PATCH 3/3] builddeb: add make fastdeb-pkg target

Path csiph.com!feeder.erje.net!2.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From riku.voipio@linaro.org
Newsgroups linux.debian.kernel
Subject [PATCH 3/3] builddeb: add make fastdeb-pkg target
Date Fri, 31 Mar 2017 15:30:01 +0200
Message-ID <tr4MN-59K-7@gated-at.bofh.it> (permalink)
References <tr4MN-59K-9@gated-at.bofh.it>
X-Mailbox-Line From debian-kernel-request@lists.debian.org Fri Mar 31 13:27:20 2017
Old-Return-Path <riku.voipio@linaro.org>
X-Amavis-Spam-Status No, score=-0.68 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FOURLA=0.1, GMAIL=1, MURPHY_DRUGS_REL8=0.02, RCVD_IN_DNSWL_LOW=-0.7] autolearn=no autolearn_force=no
X-Policyd-Weight DYN_NJABL=SKIP(0) NOT_IN_SBL_XBL_SPAMHAUS=-1.5 BL_NJABL=SKIP(-1.5) CL_IP_EQ_HELO_IP=-2 (check from: .linaro. - helo: .mail-lf0-x235.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GytUdJAgdtnnJgQswo88KZJAiGIrR7/hHMxJZDSAuv8=; b=WIkla38cUj5HD+CZyhbIrwvpSNdtVKguCIazCdMSOAbG6k3JfOSP94z7qmwuS3HMyy hZuptWg/L5N4AfTetQsUNn6PYYWZe9zy80q96Le4+quol61grxfUmKzkB7ThjPWNRoLw QgYC/M3n3Edbbf18RA5ZjhRRlWaCrbYLl0dwY=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GytUdJAgdtnnJgQswo88KZJAiGIrR7/hHMxJZDSAuv8=; b=Zc8b1H63dM3nNC5XbnAGFkw5jMG7CCurI3NhvlVJcGZFV6ReQtsUh748aGfboZOoL0 4dC3J+96os0A2wEK4UpFCNXMZK0QEiE8RqxjICBSmm34Qncnh5hEix0BBHrl44JSwQkG vpRzQJlxSpI1q9QHAOsY7eBeOb3y7acIomx7EHh03+dAOMuPuZGXECQp2chRo6AU7OD2 oz9aH9GPmozNkKNyyCh3/FGdHDo4jqIL+MnYZlSOIQuMXLE4AyFLqT91gSb6ffaQLLwq yjubp88UarfRd9alHZwqRxbeWa/LHjWsQcI2dpptD4r4Mcoylz3WEmU/XycsaQcnEZ2q Gx9w==
X-Gm-Message-State AFeK/H1adHGK/c8AoSMOTymxTBjrYpdpgoOHhRC53P1/o5C9fSgso1e74dNsZsqxU0Ey9Hfn
X-Received by 10.25.23.215 with SMTP id 84mr931926lfx.148.1490965789409; Fri, 31 Mar 2017 06:09:49 -0700 (PDT)
X-Mailer git-send-email 2.11.0
X-Mailing-List <debian-kernel@lists.debian.org> archive/latest/112175
List-ID <debian-kernel.lists.debian.org>
List-URL <https://lists.debian.org/debian-kernel/>
List-Archive https://lists.debian.org/msgid-search/20170331130941.5250-4-riku.voipio@linaro.org
Approved robomod@news.nic.it
Lines 129
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc yamada.masahiro@socionext.com, debian-kernel@lists.debian.org, Riku Voipio <riku.voipio@linaro.org>, Andrew Donnellan <andrew.donnellan@au1.ibm.com>
X-Original-Date Fri, 31 Mar 2017 16:09:41 +0300
X-Original-Message-ID <20170331130941.5250-4-riku.voipio@linaro.org>
X-Original-References <20170331130941.5250-1-riku.voipio@linaro.org>
Xref csiph.com linux.debian.kernel:57391

Show key headers only | View raw


From: Riku Voipio <riku.voipio@linaro.org>

Currently, the deb-pkg and bindeb-pkg targets create multiple packages
for the kernel binaries, headers, userspace headers and firmware.

For developers who generate Debian packages as part of their development
workflows, it's often not necessary to generate all these packages.

Introduce new target, fastdeb-pkg, which only generates kernel packages.
Re-order package build order so that kernel binary package is created
first and we can exit cleanly unless generating rest packages with the
old bindeb-pkg and deb-pkg targets.

Cc: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Tested-By: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 scripts/package/Makefile |  7 ++++++-
 scripts/package/builddeb | 49 +++++++++++++++++++++++++-----------------------
 2 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 71b4a8af9d4d..fc86cc3ae222 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -97,6 +97,10 @@ bindeb-pkg: FORCE
 	$(MAKE) KBUILD_SRC=
 	+$(call cmd,builddeb)
 
+fastdeb-pkg: FORCE
+	$(MAKE) KBUILD_SRC=
+	+$(call cmd,builddeb)
+
 clean-dirs += $(objtree)/debian/
 
 
@@ -142,7 +146,8 @@ help: FORCE
 	@echo '  rpm-pkg             - Build both source and binary RPM kernel packages'
 	@echo '  binrpm-pkg          - Build only the binary kernel RPM package'
 	@echo '  deb-pkg             - Build both source and binary deb kernel packages'
-	@echo '  bindeb-pkg          - Build only the binary kernel deb package'
+	@echo '  bindeb-pkg          - Build all binary kernel deb packages'
+	@echo '  fastdeb-pkg         - Build only the binary kernel image deb package'
 	@echo '  tar-pkg             - Build the kernel as an uncompressed tarball'
 	@echo '  targz-pkg           - Build the kernel as a gzip compressed tarball'
 	@echo '  tarbz2-pkg          - Build the kernel as a bzip2 compressed tarball'
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 3407826f2a99..6c2f57039d22 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -180,11 +180,6 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
 	fi
 fi
 
-if [ "$ARCH" != "um" ]; then
-	$MAKE headers_check KBUILD_SRC=
-	$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
-fi
-
 # Install the maintainer scripts
 # Note: hook scripts under /etc/kernel are also executed by official Debian
 # kernel packages, as well as kernel packages built using make-kpkg.
@@ -315,6 +310,32 @@ EOF
 
 fi
 
+# Move firmware out of kernel image package.
+if [ -e "$tmpdir/lib/firmware" ]; then
+	mv "$tmpdir/lib/firmware"/* "$fwdir/lib/firmware/$version/"
+	rmdir "$tmpdir/lib/firmware"
+fi
+
+create_package "$packagename" "$tmpdir"
+[ "x$1" = "xfastdeb-pkg" ] && exit 0
+
+if [ -e "$fwdir/lib/firmware/$version" ]; then
+	cat <<EOF >> debian/control
+
+Package: $fwpackagename
+Architecture: all
+Description: Linux kernel firmware, version $version
+ This package contains firmware from the Linux kernel, version $version.
+EOF
+
+	create_package "$fwpackagename" "$fwdir"
+fi
+
+if [ "$ARCH" != "um" ]; then
+	$MAKE headers_check KBUILD_SRC=
+	$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
+fi
+
 # Build kernel header package
 (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles"
 (cd $srctree; find arch/*/include include scripts -type f) >> "$objtree/debian/hdrsrcfiles"
@@ -345,22 +366,6 @@ Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
  This is useful for people who need to build external modules
 EOF
 
-# Do we have firmware? Move it out of the way and build it into a package.
-if [ -e "$tmpdir/lib/firmware" ]; then
-	mv "$tmpdir/lib/firmware"/* "$fwdir/lib/firmware/$version/"
-	rmdir "$tmpdir/lib/firmware"
-
-	cat <<EOF >> debian/control
-
-Package: $fwpackagename
-Architecture: all
-Description: Linux kernel firmware, version $version
- This package contains firmware from the Linux kernel, version $version.
-EOF
-
-	create_package "$fwpackagename" "$fwdir"
-fi
-
 cat <<EOF >> debian/control
 
 Package: $libc_headers_packagename
@@ -377,8 +382,6 @@ if [ "$ARCH" != "um" ]; then
 	create_package "$libc_headers_packagename" "$libc_headers_dir"
 fi
 
-create_package "$packagename" "$tmpdir"
-
 if [ -n "$BUILD_DEBUG" ] ; then
 	# Build debug package
 	# Different tools want the image in different locations
-- 
2.11.0

Back to linux.debian.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 3/3] builddeb: add make fastdeb-pkg target riku.voipio@linaro.org - 2017-03-31 15:30 +0200
  Re: [PATCH 3/3] builddeb: add make fastdeb-pkg target Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-04-18 17:00 +0200
    Re: [PATCH 3/3] builddeb: add make fastdeb-pkg target Riku Voipio <riku.voipio@linaro.org> - 2017-04-20 13:10 +0200
      Re: [PATCH 3/3] builddeb: add make fastdeb-pkg target Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-04-21 12:20 +0200
        Re: [PATCH 3/3] builddeb: add make fastdeb-pkg target Ben Hutchings <ben@decadent.org.uk> - 2017-04-21 17:10 +0200

csiph-web