lpia debug debs

Andy Whitcroft apw at canonical.com
Fri May 1 18:30:36 BST 2009


As we sumised on irc, the custom builds in the hardy tree simply do not
support debug.  Fiddling about with it I think I got at least the lpia
custom build to do debug.  This patch has not been tested for any of the
other custom binary builds so I am not sure I have gotten the debug
turned on in the appropriate combinations; ie. in the control vars and
the rules which probabally have to be in sync.

Anyhow, this should get you moving along.

-apw

commit b14354d31e24b87ea055b59dc0927be212095c3d
Author: Andy Whitcroft <apw at canonical.com>
Date:   Fri May 1 18:20:41 2009 +0100

    debug for hardy lpia

diff --git a/debian/binary-custom.d/lpia/vars b/debian/binary-custom.d/lpia/vars
index 3d69ff2..7d3ac4b 100644
--- a/debian/binary-custom.d/lpia/vars
+++ b/debian/binary-custom.d/lpia/vars
@@ -5,3 +5,4 @@ target="UME kernel"
 bootloader="lilo (>= 19.1) | grub"
 provides="kvm-api-4, redhat-cluster-modules"
 section_image="universe/base"
+do_debug="Yes"
diff --git a/debian/rules.d/6-binary-custom.mk b/debian/rules.d/6-binary-custom.mk
index ec34480..2a55f21 100644
--- a/debian/rules.d/6-binary-custom.mk
+++ b/debian/rules.d/6-binary-custom.mk
@@ -40,6 +40,7 @@ $(stampdir)/stamp-custom-build-%: $(stampdir)/stamp-custom-prepare-%
 	@touch $@
 
 custom-install-%: pkgdir = $(CURDIR)/debian/linux-image-$(release)$(debnum)-$*
+custom-install-%: dbgpkgdir = $(CURDIR)/debian/linux-image-debug-$(release)$(debnum)-$*
 custom-install-%: basepkg = linux-headers-$(release)$(debnum)
 custom-install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$*
 custom-install-%: target_flavour = $*
@@ -51,6 +52,7 @@ custom-install-%: $(stampdir)/stamp-custom-build-%
 	dh_testroot
 	dh_clean -k -plinux-image-$(release)$(debnum)-$*
 	dh_clean -k -plinux-headers-$(release)$(debnum)-$*
+	dh_clean -k -plinux-image-debug-$(release)$(debnum)-$*
 
 	# The main image
 	# xen doesnt put stuff in the same directory. its quirky that way
@@ -85,6 +87,12 @@ endif
 	  chmod 755 $(pkgdir)/DEBIAN/$$script;                                  \
 	done
 
+        # Debug image is simple
+ifneq ($(do_debug_image),)
+	install -m644 -D $(builddir)/custom-build-$*/vmlinux \
+		$(dbgpkgdir)//boot/vmlinux-debug-$(release)$(debnum)-$*
+endif
+        
 	# The flavour specific headers image
 	# XXX Would be nice if we didn't have to dupe the original builddir
 	install -m644 -D $(srcdir)/.config \
@@ -109,6 +117,7 @@ endif
 
 custom-binary-%: pkgimg = linux-image-$(release)$(debnum)-$*
 custom-binary-%: pkghdr = linux-headers-$(release)$(debnum)-$*
+custom-binary-%: dbgpkg = linux-image-debug-$(release)$(debnum)-$*
 custom-binary-%: custom-install-%
 	dh_testdir
 	dh_testroot
@@ -131,3 +140,14 @@ custom-binary-%: custom-install-%
 	dh_gencontrol -p$(pkghdr)
 	dh_md5sums -p$(pkghdr)
 	dh_builddeb -p$(pkghdr)
+
+ifneq ($(do_debug_image),)
+	dh_installchangelogs -p$(dbgpkg)
+	dh_installdocs -p$(dbgpkg)
+	dh_compress -p$(dbgpkg)
+	dh_fixperms -p$(dbgpkg)
+	dh_installdeb -p$(dbgpkg)
+	dh_gencontrol -p$(dbgpkg)
+	dh_md5sums -p$(dbgpkg)
+	dh_builddeb -p$(dbgpkg)
+endif



More information about the kernel-team mailing list