diff options
author | Ying Wang <wangying@android.com> | 2013-08-19 14:29:32 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-08-19 14:29:32 -0700 |
commit | a3ee330ac52e188c9545c022552572e0e9541577 (patch) | |
tree | 0475940ad3bc969448eb9d135d5b21a6e3e32e8b | |
parent | 03fb7473c4e21b2ae1ce9d31596416dc921c565f (diff) | |
parent | fa67740ae41fc068d9a9b5fbf5a7a06c36dbbdb1 (diff) | |
download | build-a3ee330ac52e188c9545c022552572e0e9541577.zip build-a3ee330ac52e188c9545c022552572e0e9541577.tar.gz build-a3ee330ac52e188c9545c022552572e0e9541577.tar.bz2 |
am fa67740a: am 25977365: Merge "mkbootimg: Support custom mkbootimg implementation"
* commit 'fa67740ae41fc068d9a9b5fbf5a7a06c36dbbdb1':
mkbootimg: Support custom mkbootimg implementation
-rw-r--r-- | core/Makefile | 6 | ||||
-rw-r--r-- | core/config.mk | 4 | ||||
-rw-r--r-- | tools/releasetools/common.py | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/core/Makefile b/core/Makefile index cf22b11..41fcc6c 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1291,7 +1291,8 @@ $(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR) $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) @echo "Package OTA: $@" - $(hide) ./build/tools/releasetools/ota_from_target_files -v \ + $(hide) MKBOOTIMG=$(BOARD_CUSTOM_MKBOOTIMG) \ + ./build/tools/releasetools/ota_from_target_files -v \ -p $(HOST_OUT) \ -k $(KEY_CERT_PAIR) \ $(BUILT_TARGET_FILES_PACKAGE) $@ @@ -1319,7 +1320,8 @@ endif $(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) @echo "Package: $@" - $(hide) ./build/tools/releasetools/img_from_target_files -v \ + $(hide) MKBOOTIMG=$(BOARD_CUSTOM_MKBOOTIMG) \ + ./build/tools/releasetools/img_from_target_files -v \ -s $(extensions) \ -p $(HOST_OUT) \ $(BUILT_TARGET_FILES_PACKAGE) $@ diff --git a/core/config.mk b/core/config.mk index 96993c0..3358843 100644 --- a/core/config.mk +++ b/core/config.mk @@ -311,7 +311,11 @@ PROTOC := $(HOST_OUT_EXECUTABLES)/aprotoc$(HOST_EXECUTABLE_SUFFIX) SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX) MKBOOTFS := $(HOST_OUT_EXECUTABLES)/mkbootfs$(HOST_EXECUTABLE_SUFFIX) MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX) +ifeq (,$(strip $(BOARD_CUSTOM_MKBOOTIMG))) MKBOOTIMG := $(HOST_OUT_EXECUTABLES)/mkbootimg$(HOST_EXECUTABLE_SUFFIX) +else +MKBOOTIMG := $(BOARD_CUSTOM_MKBOOTIMG) +endif MKYAFFS2 := $(HOST_OUT_EXECUTABLES)/mkyaffs2image$(HOST_EXECUTABLE_SUFFIX) APICHECK := $(HOST_OUT_EXECUTABLES)/apicheck$(HOST_EXECUTABLE_SUFFIX) FS_GET_STATS := $(HOST_OUT_EXECUTABLES)/fs_get_stats$(HOST_EXECUTABLE_SUFFIX) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index a3217dd..05c2a4a 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -287,7 +287,10 @@ def BuildBootableImage(sourcedir, fs_config_file, info_dict=None): assert p1.returncode == 0, "mkbootfs of %s ramdisk failed" % (targetname,) assert p2.returncode == 0, "minigzip of %s ramdisk failed" % (targetname,) - cmd = ["mkbootimg", "--kernel", os.path.join(sourcedir, "kernel")] + # use MKBOOTIMG from environ, or "mkbootimg" if empty or not set + mkbootimg = os.getenv('MKBOOTIMG') or "mkbootimg" + + cmd = [mkbootimg, "--kernel", os.path.join(sourcedir, "kernel")] fn = os.path.join(sourcedir, "cmdline") if os.access(fn, os.F_OK): |