summaryrefslogtreecommitdiff
path: root/Android.mk
diff options
context:
space:
mode:
authorrickard evertsson <rickard.evertsson@stericsson.com>2010-09-28 11:56:17 +0200
committerMichael BRANDT <michael.brandt@stericsson.com>2010-09-28 13:49:39 +0200
commit5b60932d19c87501edf8e034d9fa82aabef1d27e (patch)
treef83f41625186ea83a40abb2f9b43a9a81d3b3640 /Android.mk
parent796065411dc8fc77b87bfdb0cf9eacdab40c31dc (diff)
Add mk_envimg in Android.mk
Adds a new target mk_envimg and recursively invoke the mk_envimg Makefile. Dependencies: 796065411dc8fc77b87bfdb0cf9eacdab40c31dc ST-Ericsson ID: WP272737 Change-Id: I918785ecd613e54efce36274234e2591611de922 Signed-off-by: rickard evertsson <rickard.evertsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/5678 Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com>
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk28
1 files changed, 22 insertions, 6 deletions
diff --git a/Android.mk b/Android.mk
index 20b6a1e18..82910736b 100644
--- a/Android.mk
+++ b/Android.mk
@@ -4,15 +4,29 @@ ifeq ($(ENABLE_CR264527),true)
# Give other modules a nice, symbolic name to use as a dependent
# Yes, there are modules that cannot build unless uboot has
# been built. Typical (only?) example: linux kernel (needs mkimage program)
-.phony: build-uboot clean-uboot
-
+.phony: build-mkenvimg build-uboot clean-uboot
PRIVATE_UBOOT_ARGS := -C $(BOOT_PATH)/u-boot ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE)
PRIVATE_OUT := $(abspath $(PRODUCT_OUT)/root)
+# The next three assignments are for building mk_envimg host tool.
+# BUILD_UBOOT_ENV_IMG_OUTPUT and BUILD_UBOOT_ENV_IMG_INPUT should be set
+# in BoardConfig.mk and are, if they are set, added to the cmdline.
+PRIVATE_UBOOT_MK_ENVIMG_ARGS := -C $(BOOT_PATH)/u-boot/tools/mk_envimg
+
+ifneq ($(BUILD_UBOOT_ENV_IMG_OUTPUT),)
+PRIVATE_UBOOT_MK_ENVIMG_ARGS += OUTPUT=$(BUILD_UBOOT_ENV_IMG_OUTPUT)
+endif
+
+ifneq ($(BUILD_UBOOT_ENV_IMG_INPUT),)
+PRIVATE_UBOOT_MK_ENVIMG_ARGS += INPUT=$(BUILD_UBOOT_ENV_IMG_INPUT)
+endif
+
# Links the uboot build into the Android build
ALL_PREBUILT += build-uboot
+# Add mk_envimg to the build
+ALL_PREBUILT += build-mkenvimg
# Configures, builds and installs uboot. UBOOT_DEFCONFIG usually
# comes from the BoardConfig.mk file, but can be overridden on the
@@ -28,22 +42,24 @@ else
endif
$(MAKE) $(PRIVATE_UBOOT_ARGS)
+build-mkenvimg:
+ $(MAKE) $(PRIVATE_UBOOT_MK_ENVIMG_ARGS) all
# An Android clean removes the files built for the current HW configuration,
# such as u8500,
# while a clobber removes all built files (rm -rf $(OUT_DIR)).
-# Uboot only has one build tree, so clean and clobber will be
-# the same.
-clean clobber : clean-uboot
+clean clobber: clean-uboot clean-mk_envimg
clean-uboot:
$(MAKE) $(PRIVATE_UBOOT_ARGS) clean
+clean-mk_envimg:
+ $(MAKE) $(PRIVATE_UBOOT_MK_ENVIMG_ARGS) clean
+
installclean: installclean-uboot
installclean-uboot:
rm -f u-boot.bin u-boot.map u-boot.srec
-
endif