From 3e2f43bb131a53c341333a2873192cafe6f0a8a1 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 10 Apr 2025 18:29:37 +0200 Subject: [PATCH] ci/android: only use custom kernel for venus GPU_MODEs The venus GPU_MODEs require some patches to the Android 14 kernel to work, so custom built bzImage and initramfs.img need to be passed to launch_cvd. However specifying a custom kernel triggers some image repacking which is quite expensive in terms of I/O; so, since the custom kernel is only needed for the venus GPU_MODEs, avoid specifying it for the other modes to speed up launching cuttlefish in those cases. Part-of: --- .gitlab-ci/cuttlefish-runner.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/cuttlefish-runner.sh b/.gitlab-ci/cuttlefish-runner.sh index b4c21dfa7c6..e86a8ceb3fc 100755 --- a/.gitlab-ci/cuttlefish-runner.sh +++ b/.gitlab-ci/cuttlefish-runner.sh @@ -49,6 +49,14 @@ ulimit -S -n 32768 VSOCK_BASE=10000 # greater than all the default vsock ports VSOCK_CID=$((VSOCK_BASE + (CI_JOB_ID & 0xfff))) +# Venus requires a custom kernel for now +if [ "$ANDROID_GPU_MODE" = "venus" ] || [ "$ANDROID_GPU_MODE" = "venus_guest_angle" ]; then + CUSTOM_KERNEL_ARGS=" + -kernel_path=/cuttlefish/bzImage + -initramfs_path=/cuttlefish/initramfs.img + " +fi + HOME=/cuttlefish launch_cvd \ -daemon \ -verbosity=VERBOSE \ @@ -64,8 +72,7 @@ HOME=/cuttlefish launch_cvd \ -gpu_mode="$ANDROID_GPU_MODE" \ -cpus=${FDO_CI_CONCURRENT:-4} \ -memory_mb 8192 \ - -kernel_path="/cuttlefish/bzImage" \ - -initramfs_path="/cuttlefish/initramfs.img" + $CUSTOM_KERNEL_ARGS sleep 1