diff --git a/test/unit/refs/definitions/fastboot-oe-dragonboard-845c.yaml b/test/unit/refs/definitions/fastboot-oe-dragonboard-845c.yaml new file mode 100644 index 0000000..356ad51 --- /dev/null +++ b/test/unit/refs/definitions/fastboot-oe-dragonboard-845c.yaml @@ -0,0 +1,59 @@ +device_type: "dragonboard-845c" + +job_name: "tuxlava@fastboot-oe-dragonboard-845c: boot" +priority: low +visibility: "public" + +reboot_to_fastboot: false + + +context: + test_character_delay: 10 +timeouts: + job: + minutes: 80 + connection: + minutes: 2 + actions: + power-off: + seconds: 30 + finalize: + seconds: 60 + +actions: +- deploy: + to: fastboot + docker: + image: "linaro/kir:20260520" + local: true + timeout: + minutes: 25 + os: debian + images: + partition:0: + url: "https://images.validation.linaro.org/snapshots.linaro.org/96boards/dragonboard845c/linaro/rescue/28/dragonboard-845c-bootloader-ufs-linux-28/gpt_both0.bin" + boot: + url: "https://storage.tuxboot.com/buildroot/arm64/boot.img" + rootfs: + url: "https://storage.tuxboot.com/debian/20250326/trixie/arm64/rootfs.tar.xz" + compression: xz + sparse: false + format: tar + +- command: + name: pre_os_command +- command: + name: pre_power_command +- boot: + docker: + image: "linaro/kir:20260520" + local: true + method: fastboot + timeout: + minutes: 25 + auto_login: + login_prompt: 'login:' + username: root + prompts: + - 'root@(.*):[/~]#' + - "root@qcom-armv8a:" diff --git a/test/unit/test_device.py b/test/unit/test_device.py index 39c42b6..6d665c5 100644 --- a/test/unit/test_device.py +++ b/test/unit/test_device.py @@ -2816,6 +2816,13 @@ def artefacts(tmp_path): ], "fastboot-dragonboard-845c-multiple-tests.yaml", ), + ( + [ + "--device", + "fastboot-oe-dragonboard-845c", + ], + "fastboot-oe-dragonboard-845c.yaml", + ), ( [ "--device", diff --git a/tuxlava/devices/fastboot.py b/tuxlava/devices/fastboot.py index cdacb27..e1ea0a6 100644 --- a/tuxlava/devices/fastboot.py +++ b/tuxlava/devices/fastboot.py @@ -13,6 +13,8 @@ from tuxlava.exceptions import InvalidArgument from tuxlava.utils import compression, notnone, slugify +KIR_IMAGE = "linaro/kir:20260520" + class FastbootDevice(Device): arch: str = "" @@ -63,6 +65,10 @@ class FastbootDevice(Device): needs_storage_prep: bool = False storage_device: str = "$(lava-target-storage SATA || lava-target-storage USB)" + deploy_docker_image: str = KIR_IMAGE + deploy_fastboot_docker_image: str = KIR_IMAGE + boot_docker_image: str = KIR_IMAGE + def validate( self, bios, @@ -121,6 +127,9 @@ def definition(self, **kwargs): kwargs["arch"] = self.arch kwargs["lava_arch"] = self.lava_arch kwargs["extra_options"] = self.extra_options.copy() + kwargs["deploy_docker_image"] = self.deploy_docker_image + kwargs["deploy_fastboot_docker_image"] = self.deploy_fastboot_docker_image + kwargs["boot_docker_image"] = self.boot_docker_image # Options that can be updated kwargs["bios"] = notnone(kwargs.get("bios"), self.bios) @@ -252,6 +261,7 @@ class FastbootOEDragonboard_845c(FastbootDevice): rootfs = "https://storage.tuxboot.com/debian/20250326/trixie/arm64/rootfs.tar.xz" bios = "https://images.validation.linaro.org/snapshots.linaro.org/96boards/dragonboard845c/linaro/rescue/28/dragonboard-845c-bootloader-ufs-linux-28/gpt_both0.bin" template = "fastboot-oe.yaml.jinja2" + extra_prompts = ["root@qcom-armv8a:"] class FastbootX15(FastbootDevice): diff --git a/tuxlava/devices/fvp.py b/tuxlava/devices/fvp.py index 19ffc0d..6cc413d 100644 --- a/tuxlava/devices/fvp.py +++ b/tuxlava/devices/fvp.py @@ -219,6 +219,20 @@ def default(self, options) -> None: if self.rootfs: options.rootfs = notnone(options.rootfs, self.rootfs) + # The smc91x test needs the SMSC ethernet controller; everything + # else uses virtio-net. + _smc91x_network_args = [ + "-C board.smsc_91c111.enabled=true", + "-C board.hostbridge.userNetworking=true", + '-C board.hostbridge.userNetPorts="5555=5555"', + ] + _virtio_network_args = [ + "-C board.virtio_net.enabled=true", + "-C board.virtio_net.hostbridge.userNetworking=true", + '-C board.virtio_net.hostbridge.userNetPorts="5555=5555"', + "-C board.virtio_net.transport=legacy", + ] + def definition(self, **kwargs): kwargs = kwargs.copy() @@ -228,6 +242,10 @@ def definition(self, **kwargs): kwargs["kernel_start_message"] = self.kernel_start_message kwargs["support_tests"] = self.support_tests kwargs["boot_timeout"] = kwargs["timeouts"].get("boot", self.boot_timeout) + if any(t.name == "smc91x" for t in kwargs["tests"]): + kwargs["network_args"] = self._smc91x_network_args + else: + kwargs["network_args"] = self._virtio_network_args if not kwargs["timeouts"].get("deploy"): kwargs["deploy_timeout"] = self.deploy_timeout + ( diff --git a/tuxlava/templates/jobs/fastboot-aosp.yaml.jinja2 b/tuxlava/templates/jobs/fastboot-aosp.yaml.jinja2 index 4d09893..fb50b0d 100644 --- a/tuxlava/templates/jobs/fastboot-aosp.yaml.jinja2 +++ b/tuxlava/templates/jobs/fastboot-aosp.yaml.jinja2 @@ -75,11 +75,7 @@ actions: local: true {% if TUXSUITE_BAKE_VENDOR_DOWNLOAD_URL is defined %} steps: -{% if BUILD_REFERENCE_IMAGE_GZ_URL is defined %} - - linaro-lkft-android.sh -g -k {{BUILD_REFERENCE_IMAGE_GZ_URL}} -v {{TUXSUITE_BAKE_VENDOR_DOWNLOAD_URL}} -c {{LKFT_BUILD_CONFIG}} -{% else %} - - linaro-lkft-android.sh -g -v {{TUXSUITE_BAKE_VENDOR_DOWNLOAD_URL}} -c {{LKFT_BUILD_CONFIG}} -{% endif %} + - linaro-lkft-android.sh -g{% if BUILD_REFERENCE_IMAGE_GZ_URL is defined %} -k {{BUILD_REFERENCE_IMAGE_GZ_URL}}{% endif %} -v {{TUXSUITE_BAKE_VENDOR_DOWNLOAD_URL}} -c {{LKFT_BUILD_CONFIG}} {% endif %} - deploy: diff --git a/tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 b/tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 index 8264ff4..996a3ee 100644 --- a/tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 +++ b/tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 @@ -50,7 +50,7 @@ actions: - deploy: to: fastboot docker: - image: "{{ deploy_fastboot_docker_image|default('linaro/kir:20260520') }}" + image: "{{ deploy_fastboot_docker_image }}" local: true timeout: minutes: {{ deploy_download_timeout }} @@ -96,7 +96,7 @@ actions: name: pre_power_command - boot: docker: - image: "{{ boot_docker_image|default('linaro/kir:20260520') }}" + image: "{{ boot_docker_image }}" local: true method: fastboot timeout: @@ -106,9 +106,9 @@ actions: username: root prompts: - 'root@(.*):[/~]#' -{% if device.name == 'fastboot-dragonboard-845c' %} - - 'root@qcom-armv8a:' -{% endif %} +{% for prompt in device.extra_prompts %} + - {{ prompt | tojson }} +{% endfor %} {% for prompt in tux_prompt %} - "{{ prompt }}" {% endfor %} diff --git a/tuxlava/templates/jobs/fastboot.yaml.jinja2 b/tuxlava/templates/jobs/fastboot.yaml.jinja2 index 4397c8c..ebcd558 100644 --- a/tuxlava/templates/jobs/fastboot.yaml.jinja2 +++ b/tuxlava/templates/jobs/fastboot.yaml.jinja2 @@ -109,7 +109,7 @@ actions: {% endif %} postprocess: docker: - image: "{{ deploy_docker_image|default('linaro/kir:20260520') }}" + image: "{{ deploy_docker_image }}" local: true steps: - /kir/lava/board_setup.sh {{ device.name[9:] }} rootfs "/usr/" @@ -119,7 +119,7 @@ actions: timeout: minutes: {{ deploy_timeout }} docker: - image: "{{ deploy_fastboot_docker_image|default('linaro/kir:20260520') }}" + image: "{{ deploy_fastboot_docker_image }}" local: true images: {% if device.needs_partition_flash %} @@ -154,7 +154,7 @@ actions: method: u-boot {% else %} docker: - image: "{{ boot_docker_image|default('linaro/kir:20260520') }}" + image: "{{ boot_docker_image }}" {% if device.boot_docker_local %} local: true {% endif %} diff --git a/tuxlava/templates/jobs/fvp-morello.yaml.jinja2 b/tuxlava/templates/jobs/fvp-morello.yaml.jinja2 index 9d9528c..d78226d 100644 --- a/tuxlava/templates/jobs/fvp-morello.yaml.jinja2 +++ b/tuxlava/templates/jobs/fvp-morello.yaml.jinja2 @@ -82,16 +82,9 @@ actions: - "-C board.rtc_clk_frequency=32768" - "-C num_clusters=2" - "-C num_cores=2" -{% if tests|selectattr("name", "equalto", "smc91x")|list() %} - - "-C board.smsc_91c111.enabled=true" - - "-C board.hostbridge.userNetworking=true" - - "-C board.hostbridge.userNetPorts=\"5555=5555\"" -{% else %} - - "-C board.virtio_net.enabled=true" - - "-C board.virtio_net.hostbridge.userNetworking=true" - - "-C board.virtio_net.hostbridge.userNetPorts=\"5555=5555\"" - - "-C board.virtio_net.transport=legacy" -{% endif %} +{% for arg in network_args %} + - {{ arg | tojson }} +{% endfor %} - "-C disable_visualisation=true" - "-C board.virtio_p9.root_path=/etc" - "-C css.trustedBootROMloader.fname={AP_ROMFW}"