diff options
author | Sam Lin <samlin@google.com> | 2020-09-08 15:34:44 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-09-08 15:34:44 +0000 |
commit | d1aedcafe4580b1ce6f4e08f10b3206fda297903 (patch) | |
tree | 392b31d20934234a96621f80cda9fd882225ed84 | |
parent | 51c9942ad203ce600804676d4cd2c120f7135ff6 (diff) | |
parent | 15ba80766c9262a645bbcf180b2d35be349789e4 (diff) | |
download | device_generic_car-d1aedcafe4580b1ce6f4e08f10b3206fda297903.tar.gz device_generic_car-d1aedcafe4580b1ce6f4e08f10b3206fda297903.tar.bz2 device_generic_car-d1aedcafe4580b1ce6f4e08f10b3206fda297903.zip |
Fix a kernel rebooting issue by packing ramdisk-qemu.img am: 15ba80766c
Original change: https://android-review.googlesource.com/c/device/generic/car/+/1415697
Change-Id: Icf4e300e242defbf992d1aee7d3dc5ca4b458eca
-rw-r--r-- | tools/README.md | 11 | ||||
-rwxr-xr-x | tools/create_avd_config.sh | 1 | ||||
-rwxr-xr-x | tools/git_clone_projects.sh | 62 | ||||
-rwxr-xr-x | tools/pack_avd_img.sh | 2 | ||||
-rwxr-xr-x | tools/test_run_local_avd.sh | 2 |
5 files changed, 73 insertions, 5 deletions
diff --git a/tools/README.md b/tools/README.md index 212616b..b78ec1e 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,7 +1,14 @@ # AAOS car AVD tools -This folder contains scripts to help you sharing and running car AVD images. +This folder contains scripts to help you to build, run and share car AVD images. We intentailly keep this on the AOSP main trunk for vairous branches from Android 10. -## Build an Car AVD image +## Download the tools +- To clone the tool only: git_clone_projects.sh +- Link it into an Android source tree, e.g.: +``` +ln -s $HOME/avd/car/tools $ANDROID_BUILD_TOP/device/generic/car/tools +``` + +## Build an AVD image This builds AOSP car x86_64 userdebug AVD. ``` . device/generic/car/tools/mk_car_avd.sh diff --git a/tools/create_avd_config.sh b/tools/create_avd_config.sh index 787ce93..f1f672f 100755 --- a/tools/create_avd_config.sh +++ b/tools/create_avd_config.sh @@ -93,5 +93,4 @@ hw.sensors.proximity = no hw.trackBall = no runtime.network.latency = none runtime.network.speed = full -vm.heapSize = 80 EOT diff --git a/tools/git_clone_projects.sh b/tools/git_clone_projects.sh new file mode 100755 index 0000000..13a9efc --- /dev/null +++ b/tools/git_clone_projects.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Copyright (C) 2020 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. + +echo "An example to clone minimal car/tools project to operate AVDs." + +if [[ -z $GIT_REPO_URL ]]; then + GIT_REPO_URL="https://android.googlesource.com" +fi +echo "GIT_REPO_URL=$GIT_REPO_URL" + +if [[ -z $BRANCH ]]; then + echo 'You may set BRANCH="target-branch"' +fi +echo "BRANCH=$BRANCH" + +if [[ -z $WORK_DIR ]]; then + export WORK_DIR="$PWD" +fi +echo "WORK_DIR=$WORK_DIR" + +mkdir -p $WORK_DIR +cd $WORK_DIR + +echo "git clone https://android.googlesource.com/device/generic/car" +PROJECTS=0 +SECONDS=0 +PROJECT_PATH="device/generic/car" +if [[ -z $BRANCH ]]; then + git clone "$GIT_REPO_URL/$PROJECT_PATH" +else + git clone -b $BRANCH "$GIT_REPO_URL/$PROJECT_PATH" +fi +let "PROJECTS++" +cd "$WORK_DIR/car" +f=`git rev-parse --git-dir`/hooks/commit-msg ; mkdir -p $(dirname $f) ; curl -Lo $f https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x $f +cd "$WORK_DIR" +echo + +ls -l "$WORK_DIR" + +echo " + +Cloning $PROJECTS projects takes: $SECONDS sec. + +Do your magic and then get the change pushed for review, e.g.: +git add -u +git commit +git push origin HEAD:refs/for/BRANCH +" diff --git a/tools/pack_avd_img.sh b/tools/pack_avd_img.sh index 5b41ace..02ce6e9 100755 --- a/tools/pack_avd_img.sh +++ b/tools/pack_avd_img.sh @@ -54,7 +54,7 @@ else fi echo Ramdisk, prebuilt -cp $ANDROID_PRODUCT_OUT/ramdisk.img $OUT_DIR/ramdisk.img +cp $ANDROID_PRODUCT_OUT/ramdisk-qemu.img $OUT_DIR/ramdisk.img echo Encryptionkey, prebuilt cp $ANDROID_PRODUCT_OUT/encryptionkey.img $OUT_DIR/encryptionkey.img diff --git a/tools/test_run_local_avd.sh b/tools/test_run_local_avd.sh index 3a5b4e9..2be5840 100755 --- a/tools/test_run_local_avd.sh +++ b/tools/test_run_local_avd.sh @@ -35,4 +35,4 @@ ln -s $AVD_IMAGE_DIR "$WORKDIR/$ABI" WORKDIR=$WORKDIR \ ABI=$ABI \ AVD_IMAGE_DIR=$AVD_IMAGE_DIR \ - $MY_DIR/run_local_avd.sh + $MY_DIR/run_local_avd.sh -verbose -show-kernel -debug init $@ |