summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Yu <yujun@marvell.com>2015-11-06 15:42:42 -0800
committerMohammed Habibulla <moch@google.com>2015-11-16 15:49:43 -0800
commita09e443b47e9e430acb4c24ccf57b3dbc357917a (patch)
tree2cf8e710dcad212767617d626ba57883f4cba976
parentb0854ee71995f43ec5ac522815ab583ee17a4456 (diff)
downloadabox_edge-a09e443b47e9e430acb4c24ccf57b3dbc357917a.tar.gz
Changed the provision script
1) enable A/B boot 2) remove the marvell post-processing for sparse image header hacking & marvell specific kernel compiling hacking BUG=25565537 Change-Id: I67121e40a255a499bb0c22c6d1003111327127c5
-rw-r--r--BoardConfig.mk1
-rwxr-xr-xmkmrvlimg45
-rwxr-xr-xprovision-device11
3 files changed, 6 insertions, 51 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 8333366..80e3085 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -32,7 +32,6 @@ BOARD_FLASH_BLOCK_SIZE := 512
PRODUCT_COPY_FILES += \
device/marvell/abox_edge/fstab:root/fstab.${soc_name} \
- device/marvell/abox_edge/mkmrvlimg:mkmrvlimg \
device/marvell/abox_edge/provision-device:provision-device
# Must be defined at the end of the file
diff --git a/mkmrvlimg b/mkmrvlimg
deleted file mode 100755
index f5be2b6..0000000
--- a/mkmrvlimg
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-set -x
-
-# 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.
-
-KERNEL_LOAD=0x00808000
-KERNEL_IMAGE=uImage
-KERNEL_OUT=${ANDROID_PRODUCT_OUT}/obj/KERNEL_OBJ
-dtb_files=${KERNEL_OUT}/arch/arm/boot/dts/pxa1908-dkb.dtb
-local_dtb_files_padded=${dtb_files}.padded
-DTB_PADDING_BOOTIMG_SIZE=131072
-TARGET_DEVICE=abox_edge
-TARGET_KERNEL_ARCH=arm
-KERNEL_BIN=${KERNEL_OUT}/arch/arm/boot/zImage-dtb
-
-echo "Proceeding the dtb files: "+${dtb_files}
-cp ${dtb_files} ${dtb_files}.orig && \
-cat ${dtb_files}.orig /dev/zero |head -c ${DTB_PADDING_BOOTIMG_SIZE} > ${dtb_files}.padded;
-echo "Patching the out dtb files: "+${local_dtb_files_padded}+" to the kernel image"
-${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge/kernel/mkimage -A arm -O linux -C gzip -a ${KERNEL_LOAD} -e ${KERNEL_LOAD} -n "${TARGET_DEVICE} linux" -d ${KERNEL_OUT}/arch/arm/boot/compressed/piggy.gzip ${KERNEL_OUT}/arch/arm/boot/${KERNEL_IMAGE}
-cat ${KERNEL_OUT}/arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_IMAGE} /dev/zero|head -c `expr \`ls -l ${KERNEL_OUT}/arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_IMAGE} | awk -F' ' '{print $5}'\` + 2048 - \`ls -l ${KERNEL_OUT}/arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_IMAGE} | awk -F' ' '{print $5}'\` % 2048` > ${KERNEL_OUT}/arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_IMAGE}.padded
-cat ${KERNEL_OUT}/arch/${TARGET_KERNEL_ARCH}/boot/${KERNEL_IMAGE}.padded ${local_dtb_files_padded} > ${KERNEL_BIN}
-
-${ANDROID_BUILD_TOP}/out/host/linux-x86/bin/acp -fp ${KERNEL_BIN} ${ANDROID_PRODUCT_OUT}/kernel
-${ANDROID_BUILD_TOP}/out/host/linux-x86/bin/mkbootimg --kernel ${ANDROID_PRODUCT_OUT}/kernel --ramdisk ${ANDROID_PRODUCT_OUT}/ramdisk.img --cmdline "androidboot.console=ttyS1 console=ttyS1,115200 panic_debug uart_dma crashkernel=4k@0x8140000 user_debug=31 earlyprintk=uart8250-32bit,0xd4017000 androidboot.lcd=720p cma=20M cgroup_disable=memory ddr_mode=2 RDCA=08140400 cpmem=32M@0x06000000 androidboot.exist.cp=18 androidboot.hardware=iap140" --output ${ANDROID_PRODUCT_OUT}/boot.img
-
-${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge/bin/make_ext4fs -s -T -1 -S ${ANDROID_PRODUCT_OUT}/root/file_contexts.bin -L system -l 1073741824 -a system ${ANDROID_PRODUCT_OUT}/obj/PACKAGING/systemimage_intermediates/system.img ${ANDROID_PRODUCT_OUT}/system ${ANDROID_PRODUCT_OUT}/system
-
-${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge/bin/make_ext4fs -s -T -1 -L userdata -l 4343595008 -a userdata ${ANDROID_PRODUCT_OUT}/userdata.img
-
-${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge/bin/make_ext4fs -s -T -1 -L cache -l 268435456 -a cache ${ANDROID_PRODUCT_OUT}/cache.img
-
-${ANDROID_BUILD_TOP}/out/host/linux-x86/bin/acp -fp ${ANDROID_PRODUCT_OUT}/obj/PACKAGING/systemimage_intermediates/system.img ${ANDROID_PRODUCT_OUT}/system.img
diff --git a/provision-device b/provision-device
index 491ad4e..cd88314 100755
--- a/provision-device
+++ b/provision-device
@@ -14,8 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-${ANDROID_PRODUCT_OUT}/mkmrvlimg
-
+# Marvell A/B Boot Provision Script
fastboot \
flash partition ${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge/bin/primary_gpt \
flash misc ${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge/bin/misc.bin \
@@ -23,8 +22,10 @@ fastboot \
flash pbootloader ${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge/bootloader/u-boot.bin \
erase rbootloader \
flash rbootloader ${ANDROID_BUILD_TOP}/vendor/bsp/marvell/device/abox_edge/bootloader/u-boot.bin \
- flash boot ${ANDROID_PRODUCT_OUT}/boot.img \
- flash system ${ANDROID_PRODUCT_OUT}/system.img \
+ flash boot_a ${ANDROID_PRODUCT_OUT}/boot.img \
+ flash system_a ${ANDROID_PRODUCT_OUT}/system.img \
flash userdata ${ANDROID_PRODUCT_OUT}/userdata.img \
flash cache ${ANDROID_PRODUCT_OUT}/cache.img \
- flash recovery ${ANDROID_PRODUCT_OUT}/recovery.img "$@"
+ flash recovery ${ANDROID_PRODUCT_OUT}/recovery.img \
+ erase boot_b \
+ erase system_b "$@"