Skip to content

Commit ce624fe

Browse files
committed
feat(debos): Generate contents.xml
Signed-off-by: Loïc Minier <[email protected]>
1 parent 68cbf6b commit ce624fe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

debos-recipes/qualcomm-linux-debian-flash.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ actions:
158158
(
159159
cd build/{{ $board.platform }}_ptool
160160
conf="${QCOM_PTOOL}/platforms/{{ $board.platform }}/partitions.conf"
161+
contents="${QCOM_PTOOL}/platforms/{{ $board.platform }}/contents.xml.in"
161162
disk_type="unknown"
162163
# make a copy of partitions.conf with patched/added names for
163164
# ESP (name=efi, filename=efi.bin), rootfs (name=rootfs,
@@ -203,6 +204,16 @@ actions:
203204
# generate ptool-partitions.xml from partitions.conf
204205
"${QCOM_PTOOL}/gen_partition.py" -i partitions.conf \
205206
-o ptool-partitions.xml
207+
if [ -e "$contents" ]; then
208+
# generate contents.xml from ptool-partitions.xml and contents.xml.in
209+
"${QCOM_PTOOL}/gen_contents.py" -p ptool-partitions.xml \
210+
-t "$contents" \
211+
-o contents.xml
212+
# fix file_name and file_path; qcom-ptool doesn't generate them
213+
# properly
214+
sed -i '/fastboot_complete="\(efi\|rootfs\)"/,/download_file>/ { s|<file_name>\.\.*/|<file_name>|; s|<file_path>\.|<file_path>..| }' \
215+
contents.xml
216+
fi
206217
# generate flashing files from qcom-partitions.xml
207218
"${QCOM_PTOOL}/ptool.py" -x ptool-partitions.xml
208219
)

0 commit comments

Comments
 (0)