Makefile: Add support for custom crosvm archives

Allow the user to pass a custom cvd-host_package.tar.gz to generate the
crosvm image instead of relying on the pre-built version, and
automatically package it into its own image. Use a file distinct from
the image packaging the pre-built archive to avoid confusing Make. The
user is expected to use it as follows:

    make CROSVM_TAR_GZ=<...>/cvd-host_package.tar.gz test-crosvm-X

Which allows running cutting-edge versions of crosvm and friends in this
testing infrastructure. To do so, the archive should be generated from
the Android source:

    lunch aosp_cf_arm64_phone-userdebug
    m hosttar

and CROSVM_TAR_GZ can then be set to

    $(AOSP)/out/soong/host/linux_bionic-arm64/cvd-host_package.tar.gz

Note that successive calls to make using the same CROSVM_TAR_GZ will
only conditionally re-build the image if the archive has changed. In the
unlikely case where more than one custom archive is intended to be used,
the user is expected to manually manage the images.

Bug: 198568262
Test: make CROSVM_TAR_GZ=<...>
Change-Id: Idf747ddc7a2bf81ae5ee7b63061bdcea2300a69b
1 file changed
tree: 29d314c0c435140d253c2e75a4259df9fbbe7155
  1. aarch64/
  2. crosvm/
  3. cuttlefish/
  4. kvm-unit-tests/
  5. common.inc
  6. Makefile