Commit 22a841c
committed
fastboot: merge initramfs archives via extract+repack (avoid cat)
The current initramfs merge logic concatenates cpio payloads using `cat`.
Stream concatenation does not merge filesystem structure and can break early
boot path/symlink resolution when firmware and symlinks are split across
multiple archives.
Replace the `cat` approach with an extract-into-one-dir + repack workflow when
firmware_name is provided:
- extract ramdisk into a staging rootfs
- extract firmware archive into the same staging tree
- repack as a single newc cpio.gz (preserving symlinks and hierarchy)
If firmware_name is not provided, the template produces the merged output by
renaming the original ramdisk artifact to merged-initramfs.cpio.gz.
This improves reliability of /lib -> /usr/lib and /lib/firmware resolution
during early boot and avoids firmware load failures.
Signed-off-by: Tharun Kumar Merugu <mtharu@qti.qualcomm.com>1 parent cce5324 commit 22a841c
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | | - | |
35 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | | - | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | | - | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
0 commit comments