summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2010-08-05 12:02:51 +0100
committerLeann Ogasawara <leann.ogasawara@canonical.com>2010-08-20 16:02:57 -0700
commitd9bb571f7024d729c4cf707c74e1027096dd71a7 (patch)
tree8fff3cdd1ddce10d6e80d3df2993a2f15d80e9e3 /debian
parentc7bc2407ecb7f995fdb715d0f64de150c770d0f9 (diff)
UBUNTU: add support for building selected stages of kernel
BugLink: http://bugs.launchpad.net/bugs/603087 To bootstrap in a cross-compile environment we need to be able to build the compiler and libc, for this we need linux-libc-dev from the kernel. However we cannot build the kernel without the compiler. Catch 22. This patch adds "DEB_STAGE=stage1" variable which skips building kernel requesting only the linux-libc-dev package. Based on a patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Signed-off-by: Andy Whitcroft <apw@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules9
-rw-r--r--debian/rules.d/0-common-vars.mk6
-rw-r--r--debian/rules.d/1-maintainer.mk3
-rw-r--r--debian/rules.d/2-binary-arch.mk10
-rw-r--r--debian/rules.d/3-binary-indep.mk2
5 files changed, 29 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index b167196328d8..92ec033af3ed 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,6 +29,15 @@ include $(DROOT)/rules.d/0-common-vars.mk
# Maintainer targets
include $(DROOT)/rules.d/1-maintainer.mk
+# Stages
+ifeq ($(DEB_STAGE),stage1)
+ do_tools=false
+ do_doc_package=false
+ do_source_package=false
+ do_flavour_image_package=false
+ do_flavour_header_package=false
+endif
+
# Debian Build System targets
binary: binary-indep binary-arch
diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index b59656ca5718..28805764f63b 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -141,6 +141,12 @@ endif
tools_pkg_name=$(src_pkg_name)-tools-$(abi_release)
tools_common_pkg_name=$(src_pkg_name)-tools-common
+# The general flavour specific image package.
+do_flavour_image_package=true
+
+# The general flavour specific header package.
+do_flavour_header_package=true
+
# Support parallel=<n> in DEB_BUILD_OPTIONS (see #209008)
#
# These 2 environment variables set the -j value of the kernel build. For example,
diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index 65b9688e94b8..4443274fa376 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -102,9 +102,12 @@ endif
@echo "do_source_package = $(do_source_package)"
@echo "do_source_package_content = $(do_source_package_content)"
@echo "do_libc_dev_package = $(do_libc_dev_package)"
+ @echo "do_flavour_image_package = $(do_flavour_image_package)"
+ @echo "do_flavour_header_package = $(do_flavour_header_package)"
@echo "do_common_headers_indep = $(do_common_headers_indep)"
@echo "do_full_source = $(do_full_source)"
@echo "do_tools = $(do_tools)"
+ @echo "full_build = $(full_build)"
printchanges:
@baseCommit=$$(git log --pretty=format:'%H %s' | \
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index ace4d85eb8a4..6a07d3ca8b90 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -377,16 +377,24 @@ endif
binary-debs: binary-perarch $(stampdir)/stamp-flavours $(addprefix binary-,$(flavours))
-build-arch: $(addprefix build-,$(flavours))
+build-arch-deps =
+ifeq ($(do_flavour_image_package),true)
+build-arch-deps += $(addprefix build-,$(flavours))
+endif
+build-arch: $(build-arch-deps)
+ifeq ($(do_flavour_image_package),true)
binary-arch-deps = binary-debs
ifeq ($(AUTOBUILD),)
binary-arch-deps += binary-udebs
endif
+endif
ifeq ($(do_libc_dev_package),true)
binary-arch-deps += binary-arch-headers
endif
ifneq ($(do_common_headers_indep),true)
+ifeq ($(do_flavour_header_package),true)
binary-arch-deps += binary-headers
endif
+endif
binary-arch: $(binary-arch-deps)
diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk
index d8f240782b3b..c4ac483d00e9 100644
--- a/debian/rules.d/3-binary-indep.mk
+++ b/debian/rules.d/3-binary-indep.mk
@@ -97,8 +97,10 @@ install-tools:
install-indep-deps =
ifeq ($(do_common_headers_indep),true)
+ifeq ($(do_flavour_header_package),true)
install-indep-deps += install-headers
endif
+endif
ifeq ($(do_doc_package),true)
install-indep-deps += install-doc
endif