blob: e186fcdefd58043c1dee1daa2126165d3ff279d2 [file] [log] [blame]
#!/bin/sh
# Copyright (C) 2015. Marvell International Ltd
#
# 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.
OS=${ANDROID_PROVISION_OS_PARTITIONS:-${ANDROID_PRODUCT_OUT}}
VENDOR=${ANDROID_PROVISION_VENDOR_PARTITIONS:-${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge}
# Marvell A/B Boot Provision Script
fastboot \
flash partition ${VENDOR}/bin/primary_gpt \
flash misc ${VENDOR}/bin/misc.bin \
erase pbootloader \
flash pbootloader ${VENDOR}/bootloader/u-boot.bin \
erase rbootloader \
flash rbootloader ${VENDOR}/bootloader/u-boot.bin \
flash boot_a ${OS}/boot.img \
flash system_a ${OS}/system.img \
flash boot_b ${OS}/boot.img \
flash system_b ${OS}/system.img \
flash userdata ${OS}/userdata.img \
flash cache ${OS}/cache.img \
flash recovery ${OS}/recovery.img \
--set-active=_a "$@"