From 5b65bbf72ce7024c5df2100ce4b12d59e8f3dd26 Mon Sep 17 00:00:00 2001 From: Valentine Burley Date: Tue, 18 Feb 2025 16:06:53 +0100 Subject: [PATCH] ci: Simplify downloading kernel for crosvm Directly download the kernel instead of using the download-prebuilt-kernel.sh script. Save the kernel to /kernel for clarity, replacing the previous /lava-files directory. Signed-off-by: Valentine Burley Part-of: --- .gitlab-ci/common/init-stage2.sh | 4 ++-- .gitlab-ci/container/debian/test-base.sh | 8 +++++--- .gitlab-ci/crosvm-runner.sh | 2 +- .gitlab-ci/image-tags.yml | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci/common/init-stage2.sh b/.gitlab-ci/common/init-stage2.sh index 7043fa3166c..38f6e2f9596 100755 --- a/.gitlab-ci/common/init-stage2.sh +++ b/.gitlab-ci/common/init-stage2.sh @@ -92,9 +92,9 @@ if [ "$HWCI_KVM" = "true" ]; then } || \ modprobe ${KVM_KERNEL_MODULE} - mkdir -p /lava-files + mkdir -p /kernel curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \ - -o "/lava-files/${KERNEL_IMAGE_NAME}" \ + -o "/kernel/${KERNEL_IMAGE_NAME}" \ "${KERNEL_IMAGE_BASE}/amd64/${KERNEL_IMAGE_NAME}" fi diff --git a/.gitlab-ci/container/debian/test-base.sh b/.gitlab-ci/container/debian/test-base.sh index 82fe6eed671..3d7eea46e77 100644 --- a/.gitlab-ci/container/debian/test-base.sh +++ b/.gitlab-ci/container/debian/test-base.sh @@ -169,10 +169,12 @@ section_end debian_setup ############### Download prebuilt kernel if [ "$DEBIAN_ARCH" = amd64 ]; then - uncollapsed_section_start kernel "Downloading kernel" + uncollapsed_section_start kernel "Downloading kernel for crosvm" export KERNEL_IMAGE_NAME=bzImage - mkdir -p /lava-files/ - . .gitlab-ci/container/download-prebuilt-kernel.sh + mkdir -p /kernel + # shellcheck disable=SC2153 # KERNEL_IMAGE_BASE is set in the root .gitlab-ci.yml file + curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \ + -o "/kernel/${KERNEL_IMAGE_NAME}" "${KERNEL_IMAGE_BASE}/${DEBIAN_ARCH}/${KERNEL_IMAGE_NAME}" section_end kernel fi diff --git a/.gitlab-ci/crosvm-runner.sh b/.gitlab-ci/crosvm-runner.sh index f9bcf2dc1fb..b990032d5f5 100755 --- a/.gitlab-ci/crosvm-runner.sh +++ b/.gitlab-ci/crosvm-runner.sh @@ -124,7 +124,7 @@ crosvm --no-syslog run \ --net "host-ip=192.168.30.1,netmask=255.255.255.0,mac=AA:BB:CC:00:00:12" \ -s $VM_SOCKET \ --cid ${VSOCK_CID} -p "${CROSVM_KERN_ARGS}" \ - /lava-files/${KERNEL_IMAGE_NAME:-bzImage} > ${VM_TEMP_DIR}/crosvm 2>&1 + /kernel/${KERNEL_IMAGE_NAME:-bzImage} > ${VM_TEMP_DIR}/crosvm 2>&1 CROSVM_RET=$? diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index bbed25c6edd..a4f3fe05f0a 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -13,7 +13,7 @@ variables: DEBIAN_X86_64_BUILD_BASE_IMAGE: "debian/x86_64_build-base" - DEBIAN_BASE_TAG: "20250219-virglcrosvm" + DEBIAN_BASE_TAG: "20250220-kernel" DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build" DEBIAN_BUILD_TAG: "20250210-android-drm"