Skip to content

Commit 2fb43e8

Browse files
committed
feat(debos.yml): add unknown platforms to flash-emmc.tar.gz
With the newly introduced NVME support we want the CI to be able to ship the generated files to users through the existing flash-emmc.tar.gz artefact. Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
1 parent ddd8dc5 commit 2fb43e8

File tree

2 files changed

+53
-8
lines changed

2 files changed

+53
-8
lines changed

.github/workflows/debos.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,7 @@ jobs:
158158
gzip -c disk-sdcard.img >"${dir}/disk-sdcard.img.gz"
159159
cp -av dtbs.tar.gz "${dir}"
160160
# create tarballs with support for all UFS and all eMMC boards
161-
tar -cvzf "${dir}"/flash-ufs.tar.gz \
162-
disk-ufs.img1 \
163-
disk-ufs.img2 \
164-
flash_*_ufs
165-
tar -cvzf "${dir}"/flash-emmc.tar.gz \
166-
disk-sdcard.img1 \
167-
disk-sdcard.img2 \
168-
flash_*_emmc
161+
./scripts/bundle-flash-dirs.sh "${dir}"
169162
170163
# upload to a cloud storage space accessible by Axiom
171164
- name: Upload private artifacts (S3)

scripts/bundle-flash-dirs.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/sh
2+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
set -eux
6+
7+
output_dir=$1
8+
9+
# use strings and word splitting as lists to construct output tarballs.
10+
# caveat is that flash_* directories cannot have spaces in them.
11+
emmc_dirs=""
12+
ufs_dirs=""
13+
14+
for d in flash_*
15+
do
16+
partitions_conf="$d/partitions.conf"
17+
echo "examining $partitions_conf"
18+
if grep disk-sdcard "$partitions_conf"
19+
then
20+
echo "partitions.conf refers to disk-sdcard, choosing emmc"
21+
target=emmc
22+
elif grep disk-ufs "$partitions_conf"
23+
then
24+
echo "partitions.conf refers to disk-ufs, choosing emmc"
25+
target=ufs
26+
else
27+
echo "partitions.conf has unknown format, putting in emmc by default"
28+
target=emmc
29+
fi
30+
31+
echo "choosen target $target for $d"
32+
33+
case $target in
34+
emmc)
35+
emmc_dirs="$emmc_dirs $d"
36+
;;
37+
ufs)
38+
ufs_dirs="$ufs_dirs $d"
39+
;;
40+
esac
41+
done
42+
43+
echo "emmc_dirs: $emmc_dirs"
44+
echo "ufs_dirs: $ufs_dirs"
45+
46+
# word splitting is a feature in this case
47+
# shellcheck disable=SC2086
48+
tar -cvzf "$output_dir/flash-emmc.tar.gz" $emmc_dirs
49+
50+
# word splitting is a feature in this case
51+
# shellcheck disable=SC2086
52+
tar -cvzf "$output_dir/flash-ufs.tar.gz" $ufs_dirs

0 commit comments

Comments
 (0)