Skip to content

Commit 36d992a

Browse files
committed
fix: debos: Only strip top directories from zips
Instead of using `unzip -j` which will ignore the directory structure inside zip archives, manually move files out of the toplevel directories. This avoids errors if the same filename is used multiple times, for instance prog_firehose_ddr.elf might be present multiple times in some boot binaries zip archives (e.g. for the sail/ subdirectory). Signed-off-by: Loïc Minier <[email protected]>
1 parent 04419fc commit 36d992a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,12 @@ actions:
100100
### silicon family: {{ $board.silicon_family }}
101101

102102
# unpack boot binaries
103-
unzip -j "${ROOTDIR}/../{{ $board.boot_binaries_download.filename }}" \
104-
-d build/{{ $board.name }}_boot-binaries
103+
mkdir -v build/{{ $board.name }}_boot-binaries
104+
unzip "${ROOTDIR}/../{{ $board.boot_binaries_download.filename }}" \
105+
-d build/{{ $board.name }}_boot-binaries/unpack
106+
# strip top directories
107+
mv build/{{ $board.name }}_boot-binaries/unpack/*/* build/{{ $board.name }}_boot-binaries
108+
rmdir -v build/{{ $board.name }}_boot-binaries/unpack/* build/{{ $board.name }}_boot-binaries/unpack
105109

106110
# generate partition files
107111
mkdir -v build/{{ $board.platform }}_partitions
@@ -160,7 +164,7 @@ actions:
160164

161165
{{- if $board.cdt_download }}
162166
# unpack board CDT
163-
unzip -j "${ROOTDIR}/../{{ $board.cdt_download.filename }}" \
167+
unzip "${ROOTDIR}/../{{ $board.cdt_download.filename }}" \
164168
-d build/{{ $board.name }}_cdt
165169
# copy just the CDT data; no partition or flashing files
166170
cp --preserve=mode,timestamps -v build/{{ $board.name }}_cdt/{{ $board.cdt_filename }} \

0 commit comments

Comments
 (0)