From 5b60932d19c87501edf8e034d9fa82aabef1d27e Mon Sep 17 00:00:00 2001 From: rickard evertsson Date: Tue, 28 Sep 2010 11:56:17 +0200 Subject: 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 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/5678 Reviewed-by: Michael BRANDT --- Android.mk | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'Android.mk') 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 -- cgit v1.2.3