aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUsama Arif <usama.arif@arm.com>2020-12-18 15:37:40 +0000
committerTushar Khandelwal <tushar.khandelwal@arm.com>2021-02-09 19:22:40 +0000
commit65d21e5267d474792901b433b28322063ffb36c7 (patch)
treeb5aac29d1fb2f8fd7a028eb549cb83cf9e3f20d1
parent8712b589eb55e5234af3cb126dbb57a2d489b9f1 (diff)
Copy kernel Image to device profile for AVBTC0-2021.04.23TC0-2021.02.09totalcompute
This is needed for creating boot.img to be verified for AVB. Signed-off-by: Usama Arif <usama.arif@arm.com> Change-Id: Ieba7bac78a296d4d70bc7341dcdf1e6371ab15df
-rwxr-xr-xtc0/build_android.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/tc0/build_android.sh b/tc0/build_android.sh
index d2b5e60..8bb0dc0 100755
--- a/tc0/build_android.sh
+++ b/tc0/build_android.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -42,6 +42,15 @@ incorrect_script_use () {
exit 1
}
+# check if file exists and exit if it doesnt
+check_file_exists_and_exit () {
+ if [ ! -f $1 ]
+ then
+ echo "$1 does not exist"
+ exit 1
+ fi
+}
+
make_ramdisk_android_image () {
./build-scripts/tc0/add_uboot_header.sh
./build-scripts/tc0/create_android_image.sh -a $AVB
@@ -72,11 +81,16 @@ done
[ -z "$DISTRO" ] && incorrect_script_use || echo "DISTRO=$DISTRO"
echo "AVB=$AVB"
+
+KERNEL_IMAGE=../bsp/build-poky/tmp-poky/deploy/images/tc0/Image
. build/envsetup.sh
case $DISTRO in
android-nano)
if [ "$AVB" == true ]
then
+ check_file_exists_and_exit $KERNEL_IMAGE
+ echo "Using $KERNEL_IMAGE for kernel"
+ cp $KERNEL_IMAGE device/arm/tc0
lunch tc0_nano-userdebug;
else
lunch tc0_nano-eng;
@@ -85,6 +99,9 @@ case $DISTRO in
android-swr)
if [ "$AVB" == true ]
then
+ check_file_exists_and_exit $KERNEL_IMAGE
+ echo "Using $KERNEL_IMAGE for kernel"
+ cp $KERNEL_IMAGE device/arm/tc0
lunch tc0_swr-userdebug;
else
lunch tc0_swr-eng;