From a949f9e23d2752a86167a77f4e0dd9bae2f23b60 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Tue, 26 May 2026 19:24:32 +0200 Subject: [PATCH 1/4] fastboot-aosp: inline the -k flag conditional Both branches of the if/else only differed by the -k flag. Inline the conditional flag instead. Signed-off-by: Anders Roxell --- tuxlava/templates/jobs/fastboot-aosp.yaml.jinja2 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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: From 44bd68a41df3bf5cba6137b7b365b09af9e5021e Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Tue, 26 May 2026 20:13:50 +0200 Subject: [PATCH 2/4] fastboot: centralize the kir docker image The linaro/kir image tag was hardcoded in five places across fastboot.yaml.jinja2 and fastboot-oe.yaml.jinja2 via {{ X|default('linaro/kir:...') }}. Move the image to a KIR_IMAGE constant in fastboot.py and expose it through three FastbootDevice class attributes. The templates read the attribute directly. Next image bump touches one line. Signed-off-by: Anders Roxell --- tuxlava/devices/fastboot.py | 9 +++++++++ tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 | 4 ++-- tuxlava/templates/jobs/fastboot.yaml.jinja2 | 6 +++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tuxlava/devices/fastboot.py b/tuxlava/devices/fastboot.py index cdacb27..89f90fc 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) diff --git a/tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 b/tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 index 8264ff4..6403f1a 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: 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 %} From e38a58612cc8e68a87299cbe2b9f2c3911740938 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Tue, 26 May 2026 22:53:39 +0200 Subject: [PATCH 3/4] fvp-morello: move network args choice to Python The if/else in fvp-morello.yaml.jinja2 picked between two sets of network arguments based on whether the smc91x test was requested. Move both lists into MorelloFVPDevice and pick one in Python. The template just loops over the resulting list. Same rendered output. The choice is now next to the explanation for why it exists, and it can be unit-tested. Signed-off-by: Anders Roxell --- tuxlava/devices/fvp.py | 18 ++++++++++++++++++ tuxlava/templates/jobs/fvp-morello.yaml.jinja2 | 13 +++---------- 2 files changed, 21 insertions(+), 10 deletions(-) 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/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}" From 6c5e365a06993eb1b541f6e4b01af02649878cf3 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Thu, 28 May 2026 15:02:33 +0200 Subject: [PATCH 4/4] fastboot-oe: emit qcom prompt via device.extra_prompts The template checked device.name == 'fastboot-dragonboard-845c'. The class is named fastboot-oe-dragonboard-845c, so the check never matched. The prompt was never emitted. Set extra_prompts on FastbootOEDragonboard_845c and loop over device.extra_prompts, like fastboot.yaml.jinja2 does. The prompt now fires for fastboot-oe-dragonboard-845c jobs. Signed-off-by: Anders Roxell --- .../fastboot-oe-dragonboard-845c.yaml | 59 +++++++++++++++++++ test/unit/test_device.py | 7 +++ tuxlava/devices/fastboot.py | 1 + .../templates/jobs/fastboot-oe.yaml.jinja2 | 6 +- 4 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 test/unit/refs/definitions/fastboot-oe-dragonboard-845c.yaml 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 89f90fc..e1ea0a6 100644 --- a/tuxlava/devices/fastboot.py +++ b/tuxlava/devices/fastboot.py @@ -261,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/templates/jobs/fastboot-oe.yaml.jinja2 b/tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 index 6403f1a..996a3ee 100644 --- a/tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 +++ b/tuxlava/templates/jobs/fastboot-oe.yaml.jinja2 @@ -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 %}