diff options
author | Sam Lin <samlin@google.com> | 2020-08-30 22:00:31 -0700 |
---|---|---|
committer | Sam Lin <samlin@google.com> | 2020-09-04 12:41:45 -0700 |
commit | 15ba80766c9262a645bbcf180b2d35be349789e4 (patch) | |
tree | a9e4ba617d45b06de030629a0b5c319650a1040a | |
parent | 1c7f995cafb5b6e1017dd29d672caa6e2b451f33 (diff) | |
download | device_generic_car-15ba80766c9262a645bbcf180b2d35be349789e4.tar.gz device_generic_car-15ba80766c9262a645bbcf180b2d35be349789e4.tar.bz2 device_generic_car-15ba80766c9262a645bbcf180b2d35be349789e4.zip |
Fix a kernel rebooting issue by packing ramdisk-qemu.img
- Also add git_clone_projects.sh to get the tools only
Bug: 167840192
Test: car/tools/git_clone_projects.sh
Test: car/tools/test_pack_avd_img.sh
Test: car/tools/test_run_local_avd.sh
Change-Id: Ia2054ace4b5900b321226b4482733714417ceeeb
-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 $@ |