summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Chen <ycchen@google.com>2021-08-06 08:22:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-08-06 08:22:03 +0000
commit2138af89c9215030f8362e9358e3d65e65e86045 (patch)
treed21129eabc9c8bfd15d901815f7f21a26ad8741e
parent2ef56f2e31dff1ff173263caa19956d24ea969e3 (diff)
parente23cd8fc61ced4f09e920214346069d7b3c7b367 (diff)
downloaddevelopment-2138af89c9215030f8362e9358e3d65e65e86045.tar.gz
Merge "Kernel/modules only package for virtual device" into sc-gsi-dev
-rw-r--r--gsi/Android.mk27
-rw-r--r--gsi/gki_package.mk24
2 files changed, 51 insertions, 0 deletions
diff --git a/gsi/Android.mk b/gsi/Android.mk
new file mode 100644
index 000000000..24a53127b
--- /dev/null
+++ b/gsi/Android.mk
@@ -0,0 +1,27 @@
+# Copyright (C) 2021 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+ifeq ($(BUILDING_VENDOR_BOOT_IMAGE),true)
+ifeq ($(BUILDING_BOOT_IMAGE),true)
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/gki_package.mk
+
+endif
+endif
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
diff --git a/gsi/gki_package.mk b/gsi/gki_package.mk
new file mode 100644
index 000000000..fab795842
--- /dev/null
+++ b/gsi/gki_package.mk
@@ -0,0 +1,24 @@
+# Copyright (C) 2021 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+INTERNAL_GKI_PACKAGE_TARGET := $(PRODUCT_OUT)/gki-boot-$(TARGET_KERNEL_USE)-$(FILE_NAME_TAG).zip
+
+$(INTERNAL_GKI_PACKAGE_TARGET): $(PRODUCT_OUT)/boot.img $(PRODUCT_OUT)/vendor_boot.img
+ @echo "Package: $@"
+ $(hide) $(SOONG_ZIP) -o $@ -C $(PRODUCT_OUT) -f $(PRODUCT_OUT)/boot.img -f $(PRODUCT_OUT)/vendor_boot.img
+
+.PHONY: kernel_img_zip
+kernel_img_zip: $(INTERNAL_GKI_PACKAGE_TARGET)
+
+$(call dist-for-goals, kernel_img_zip, $(INTERNAL_GKI_PACKAGE_TARGET))