Jun Yu | 9999880 | 2015-10-30 18:44:26 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Copyright (C) 2015. Marvell International Ltd |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
Dan Shi | a41b815 | 2016-01-14 15:47:28 -0800 | [diff] [blame] | 17 | OS=${ANDROID_PROVISION_OS_PARTITIONS:-${ANDROID_PRODUCT_OUT}} |
| 18 | VENDOR=${ANDROID_PROVISION_VENDOR_PARTITIONS:-${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge} |
| 19 | |
Jun Yu | a09e443 | 2015-11-06 15:42:42 -0800 | [diff] [blame] | 20 | # Marvell A/B Boot Provision Script |
Jun Yu | 9999880 | 2015-10-30 18:44:26 -0700 | [diff] [blame] | 21 | fastboot \ |
Dan Shi | a41b815 | 2016-01-14 15:47:28 -0800 | [diff] [blame] | 22 | flash partition ${VENDOR}/bin/primary_gpt \ |
| 23 | flash misc ${VENDOR}/bin/misc.bin \ |
Jun Yu | 9999880 | 2015-10-30 18:44:26 -0700 | [diff] [blame] | 24 | erase pbootloader \ |
Dan Shi | a41b815 | 2016-01-14 15:47:28 -0800 | [diff] [blame] | 25 | flash pbootloader ${VENDOR}/bootloader/u-boot.bin \ |
Jun Yu | 9999880 | 2015-10-30 18:44:26 -0700 | [diff] [blame] | 26 | erase rbootloader \ |
Dan Shi | a41b815 | 2016-01-14 15:47:28 -0800 | [diff] [blame] | 27 | flash rbootloader ${VENDOR}/bootloader/u-boot.bin \ |
| 28 | flash boot_a ${OS}/boot.img \ |
| 29 | flash system_a ${OS}/system.img \ |
| 30 | flash boot_b ${OS}/boot.img \ |
| 31 | flash system_b ${OS}/system.img \ |
| 32 | flash userdata ${OS}/userdata.img \ |
| 33 | flash cache ${OS}/cache.img \ |
li gang | 7edb6df | 2016-01-21 00:15:24 -0800 | [diff] [blame] | 34 | flash secure ${VENDOR}/bootloader/teesst.img \ |
zhxihu | 51a515d | 2015-11-24 03:55:03 -0800 | [diff] [blame] | 35 | --set-active=_a "$@" |