Skip to content

lava: add fastboot_fastrpc template to merge firmware archives safely#36

Open
quic-mtharu wants to merge 1 commit intoqualcomm-linux:mainfrom
quic-mtharu:main
Open

lava: add fastboot_fastrpc template to merge firmware archives safely#36
quic-mtharu wants to merge 1 commit intoqualcomm-linux:mainfrom
quic-mtharu:main

Conversation

@quic-mtharu
Copy link
Contributor

Summary

This PR adds a new LAVA fastboot template:
templates/boot/fastboot_fastrpc.jinja2

The template is intended for FastRPC-specific jobs where firmware is supplied as multiple archives and needs to be combined during post-processing.

Motivation / Background

We observed LAVA failures during post-processing when firmware archives were combined using cat. Simple concatenation does not properly merge the archives’ filesystem structures. This can break early-boot firmware loading when symlinks and firmware placement span multiple archives.

Issue Observed

When two firmware archives are concatenated:

  • The resulting output is not a correctly merged filesystem tree.
  • A /lib symlink provided by one archive may not resolve to firmware files supplied by the other archive.
  • During early boot, the kernel/driver fails to locate firmware under /lib/firmware, resulting in firmware load failures.

Failing LAVA job (cat-based merge): Job LAVA | Scheduler | Jobs | 41792
Working LAVA job (extract+repack merge): Job LAVA | Scheduler | Jobs | 41841

Change Introduced

A new template fastboot_fastrpc.jinja2 that:

  1. extracts both firmware archives into a single staging directory
  2. repacks them into a unified archive (preserving directory layout & symlinks)

This ensures:

  • /lib -> /usr/lib symlink is preserved
  • firmware files end up in the unified tree
  • /lib/firmware resolves correctly during early boot

Scope / Risk

  • Additive only: does not change existing templates/boot/fastboot.jinja2
  • ✅ Intended only for jobs opting into fastboot_fastrpc.jinja2
  • ✅ Low risk to current users and existing pipelines

Test Plan


Introduce templates/boot/fastboot_fastrpc.jinja2 for FastRPC LAVA jobs.

FastRPC jobs provide firmware in archives. Combining kernel firmware and fastrpc
firmware archives with `cat` does not merge filesystem structures and can break
symlink/path resolution during early boot (e.g., /lib -> /usr/lib with firmware
delivered in a separate archive). This leads to firmware load failures.

The new template performs an extract-into-one-dir + repack workflow to produce a
single unified firmware archive while preserving directory layout and symlinks.

This is an additive change and does not modify the existing
templates/boot/fastboot.jinja2 behavior.

Signed-off-by: Tharun Kumar Merugu <mtharu@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants