diff options
author | Dan Shi <dshi@google.com> | 2015-11-25 10:38:23 -0800 |
---|---|---|
committer | Dan Shi <dshi@google.com> | 2015-11-25 12:33:34 -0800 |
commit | da21b5261f5592b58eb479c1a8d2743e81ec46a9 (patch) | |
tree | 49f0afa6fd3c7867d4fc09dfc63d3ab2a14e3e3f | |
parent | 55c70833a0c318cc9d874aa1de72d6aa56b954f4 (diff) | |
download | brillo-da21b5261f5592b58eb479c1a8d2743e81ec46a9.tar.gz |
Include brillo vendor partition files in a zip file.
This change is to include all vendor partition files, specified in
BRILLO_VENDOR_PARTITIONS to a dedicated zip file, e.g.,
dragonboard-vendor_partitions-eng.zip. provision-device scirpt will be able
to run against the images folder and update a dragonboard.
Bug: 25692226
TEST: local run m dist, confirm dragonboard-vendor_partitions-eng.dshi.zip
created in out/dist
Change-Id: I698d3c25c0a4c9d864e8b6953ec9fb4e2e52e8d0
-rw-r--r-- | Android.mk | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..207e48a --- /dev/null +++ b/Android.mk @@ -0,0 +1,48 @@ +# +# Copyright (C) 2015 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. +# + +# ----------------------------------------------------------------- +# The vendor partition package for brillo device. + +ifdef BRILLO_VENDOR_PARTITIONS + +ifneq "" "$(filter eng.%,$(BUILD_NUMBER))" + # BUILD_NUMBER has a timestamp in it, which means that + # it will change every time. Pick a stable value. + FILE_NAME_TAG := eng.$(USER) +else + FILE_NAME_TAG := $(BUILD_NUMBER) +endif + +name := $(TARGET_PRODUCT) +ifeq ($(TARGET_BUILD_TYPE),debug) + name := $(name)_debug +endif +name := $(name)-vendor_partitions-$(FILE_NAME_TAG) + +BRILLO_VENDOR_PARTITIONS_TARGET := $(PRODUCT_OUT)/$(name).zip + +$(BRILLO_VENDOR_PARTITIONS_TARGET) : \ + $(BRILLO_VENDOR_PARTITIONS) \ + $(PRODUCT_OUT)/provision-device + @echo "Package vendor partitions: $@" + $(hide) rm -rf $@ + $(hide) mkdir -p $(dir $@) + $(hide) zip -qj $@ $^ + +$(call dist-for-goals, dist_files, $(BRILLO_VENDOR_PARTITIONS_TARGET)) + +endif |