Skip to content

Commit 9ab675b

Browse files
committed
lava: add fastboot_fastrpc template for correct firmware archive merge
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>
1 parent cce5324 commit 9ab675b

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
- deploy:
2+
images:
3+
image:
4+
url: '{{ node.artifacts.kernel }}'
5+
dtb:
6+
url: '{{ node.artifacts.dtb }}'
7+
{% if node.artifacts.firmware %}
8+
ramdisk_firmware:
9+
url: '{{ node.artifacts.firmware }}'
10+
{% endif %}
11+
ramdisk:
12+
url: '{{ node.artifacts.ramdisk }}'
13+
compression: gz
14+
format: cpio.newc
15+
overlays:
16+
lava: true
17+
{% filter indent(width=10) %}
18+
{% block testoverlays %}{% endblock %}
19+
{% endfilter %}
20+
{% set dtb_path = node.artifacts.dtb.split('?')[0] %}
21+
{% set dtb_name = dtb_path.split('/')[-1] %}
22+
{% if node.artifacts.firmware %}
23+
{% set firmware_path = node.artifacts.firmware.split('?')[0] %}
24+
{% set firmware_name = firmware_path.split('/')[-1] %}
25+
{% endif %}
26+
{% set ramdisk_path = node.artifacts.ramdisk.split('?')[0] %}
27+
{% set ramdisk_name = ramdisk_path.split('/')[-1] %}
28+
postprocess:
29+
docker:
30+
image: ghcr.io/mwasilew/docker-mkbootimage:master
31+
steps:
32+
- rm -rf rootfs
33+
- mkdir rootfs
34+
- cd rootfs
35+
- apt-get update -q && DEBIAN_FRONTEND=noninteractive apt-get install -y cpio
36+
- gzip -cd ../initramfs-kerneltest-full-image-qcom-armv8a.cpio.gz | cpio -idm
37+
- gzip -cd ../ramdisk_fastrpc.gz | cpio -idm
38+
- find . | cpio -H newc -o | gzip -9 > ../merged-initramfs.cpio.gz
39+
- cd ..
40+
- mkbootimg --header_version 2 --kernel Image --dtb {{ dtb_name }} --cmdline "console=ttyMSM0,115200n8 earlycon qcom_geni_serial.con_enabled=1 kernel.sched_pelt_multiplier=4 mem_sleep_default=s2idle mitigations=auto video=efifb:off" --ramdisk merged-initramfs.cpio.gz --output boot.img
41+
to: downloads
42+
43+
- deploy:
44+
images:
45+
boot:
46+
url: 'downloads://boot.img'
47+
timeout:
48+
minutes: 2
49+
to: download
50+
51+
- boot:
52+
prompts:
53+
- 'root@[^:]+:~# '
54+
failure_retry: 3
55+
timeout:
56+
minutes: 10
57+
timeouts:
58+
bootloader-commands:
59+
minutes: 3
60+
auto-login-action:
61+
minutes: 10
62+
method: fastboot

0 commit comments

Comments
 (0)