Skip to content

Commit 53ae43f

Browse files
committed
feat(debos): Optional stripping of CDT dirs
Needed for some upcoming boards. Signed-off-by: Loïc Minier <[email protected]>
1 parent 89cba35 commit 53ae43f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ actions:
3737
"sha256sum" "a339e297b454c4dc3805fe8cd11d6d8dcb801aa8f0c2dc691561c2785019fa3c"
3838
)
3939
"cdt_filename" "cdt_vision_kit.bin"
40+
"cdt_strip_toplevel": "false"
4041
"dtb" "qcom/qcs6490-rb3gen2.dtb"
4142
"disk_image_type" "ufs"
4243
)}}
@@ -61,6 +62,7 @@ actions:
6162
"sha256sum" "d7fc667372b28383a36d586333097d84b9d9c104f4dd1845d33904e2d6b39f80"
6263
)
6364
"cdt_filename" "cdt_ride_sx.bin"
65+
"cdt_strip_toplevel": "false"
6466
"dtb" "qcom/qcs8300-ride.dtb"
6567
"disk_image_type" "ufs"
6668
)}}
@@ -85,6 +87,7 @@ actions:
8587
"sha256sum" "377a8405899ac82199deaf70bca3648c15b924a3fcef8f109555e661ed70f4b9"
8688
)
8789
"cdt_filename" "cdt_ride_sx.bin"
90+
"cdt_strip_toplevel": "false"
8891
"dtb" "qcom/qcs9100-ride-r3.dtb"
8992
"disk_image_type" "ufs"
9093
)}}
@@ -214,8 +217,20 @@ actions:
214217

215218
{{- if $board.cdt_download }}
216219
# unpack board CDT
220+
mkdir -v build/{{ $board.name }}_cdt
221+
{{- if eq $board.cdt_strip_toplevel "true" }}
222+
# strip top directories
223+
unzip "${ROOTDIR}/../{{ $board.cdt_download.filename }}" \
224+
-d build/{{ $board.name }}_cdt/unpack
225+
(
226+
cd build/{{ $board.name }}_cdt
227+
mv unpack/*/* .
228+
rmdir -v unpack/* unpack
229+
)
230+
{{- else }}
217231
unzip "${ROOTDIR}/../{{ $board.cdt_download.filename }}" \
218232
-d build/{{ $board.name }}_cdt
233+
{{- end }}
219234
# copy just the CDT data; no partition or flashing files
220235
cp --preserve=mode,timestamps -v build/{{ $board.name }}_cdt/{{ $board.cdt_filename }} \
221236
"${flash_dir}"

0 commit comments

Comments
 (0)