From 0e5e8161857600acfb537d5688d916d9adf34294 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 27 Sep 2018 14:11:51 +0000 Subject: [PATCH] Revert "Revert "mkbootimg: Build mkbootimg with Soong."" This reverts commit 55a78bf5801f78ccb33ad689cc33cf3d1dcedc3a. There's no change in this CL from the initial landing. The earlier crash was caused by manifest setup in build-tools and clang-tools branches, which has been addressed by the following CLs. https://android-review.googlesource.com/c/platform/manifest/+/769045 https://android-review.googlesource.com/c/platform/manifest/+/769044 Bug: 116698229 Change-Id: I33701c9f77e814257cc5c65ad7aa587835ae00ad Test: TreeHugger --- mkbootimg/Android.bp | 31 +++++++++++++++++++ mkbootimg/Android.mk | 20 ------------ mkbootimg/{mkbootimg => mkbootimg.py} | 0 .../{unpack_bootimg => unpack_bootimg.py} | 0 4 files changed, 31 insertions(+), 20 deletions(-) delete mode 100644 mkbootimg/Android.mk rename mkbootimg/{mkbootimg => mkbootimg.py} (100%) mode change 100755 => 100644 rename mkbootimg/{unpack_bootimg => unpack_bootimg.py} (100%) mode change 100755 => 100644 diff --git a/mkbootimg/Android.bp b/mkbootimg/Android.bp index 576a677e7..c3cf74651 100644 --- a/mkbootimg/Android.bp +++ b/mkbootimg/Android.bp @@ -31,3 +31,34 @@ cc_library { header_libs: ["libmkbootimg_abi_headers"], export_header_lib_headers: ["libmkbootimg_abi_headers"], } + +python_defaults { + name: "mkbootimg_defaults", + + version: { + py2: { + enabled: true, + embedded_launcher: true, + }, + py3: { + enabled: false, + embedded_launcher: false, + }, + }, +} + +python_binary_host { + name: "mkbootimg", + defaults: ["mkbootimg_defaults"], + srcs: [ + "mkbootimg.py", + ], +} + +python_binary_host { + name: "unpack_bootimg", + defaults: ["mkbootimg_defaults"], + srcs: [ + "unpack_bootimg.py", + ], +} diff --git a/mkbootimg/Android.mk b/mkbootimg/Android.mk deleted file mode 100644 index 92e1e27d2..000000000 --- a/mkbootimg/Android.mk +++ /dev/null @@ -1,20 +0,0 @@ - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := mkbootimg -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_IS_HOST_MODULE := true - -LOCAL_MODULE := mkbootimg - -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := unpack_bootimg -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_IS_HOST_MODULE := true - -LOCAL_MODULE := unpack_bootimg - -include $(BUILD_PREBUILT) diff --git a/mkbootimg/mkbootimg b/mkbootimg/mkbootimg.py old mode 100755 new mode 100644 similarity index 100% rename from mkbootimg/mkbootimg rename to mkbootimg/mkbootimg.py diff --git a/mkbootimg/unpack_bootimg b/mkbootimg/unpack_bootimg.py old mode 100755 new mode 100644 similarity index 100% rename from mkbootimg/unpack_bootimg rename to mkbootimg/unpack_bootimg.py