Skip to content

Commit d1d105a

Browse files
committed
flash: Add support for RB1
Signed-off-by: Loïc Minier <[email protected]>
1 parent 75f068d commit d1d105a

File tree

1 file changed

+65
-1
lines changed

1 file changed

+65
-1
lines changed

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

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
{{- $build_rb1 := "false" -}}
2+
{{- if .u_boot_rb1 -}}
3+
{{- $build_rb1 := "true" }}
4+
{{- end -}}
5+
16
architecture: arm64
27

38
actions:
@@ -8,6 +13,15 @@ actions:
813
filename: qcom-ptool.tar.gz
914
unpack: true
1015

16+
{{- if eq $build_rb1 "true" }}
17+
# TODO: consider switching to https://releases.linaro.org/96boards/rb1/qualcomm/firmware/RB1_firmware_20231124-v4.zip instead
18+
- action: download
19+
description: Download RB1 rescue image
20+
url: https://releases.linaro.org/96boards/rb1/linaro/rescue/23.12/rb1-bootloader-emmc-linux-47528.zip
21+
name: qrb2210-rb1_rescue-image.zip
22+
filename: qrb2210-rb1_rescue-image.zip
23+
{{- end -}}
24+
1125
- action: download
1226
description: Download QCM6490 boot binaries
1327
url: https://softwarecenter.qualcomm.com/download/software/chip/qualcomm_linux-spf-1-0/qualcomm-linux-spf-1-0_test_device_public/r1.0_00058.0/qcm6490-le-1-0/common/build/ufs/bin/QCM6490_bootbinaries.zip
@@ -21,7 +35,7 @@ actions:
2135
filename: rb3gen2-vision-kit_cdt.zip
2236

2337
- action: run
24-
description: Generate flash directories for UFS boards
38+
description: Generate flash directories for eMMC and UFS boards
2539
chroot: false
2640
command: |
2741
set -eux
@@ -31,6 +45,54 @@ actions:
3145
# path to unpacked qcom-ptool tarball
3246
QCOM_PTOOL="${ROOTDIR}/../qcom-ptool.tar.gz.d/qcom-ptool-main"
3347
48+
{{- if eq $build_rb1 "true" }}
49+
### board: qrb2210-rb1
50+
# unpack rescue image
51+
unzip -j "${ROOTDIR}/../qrb2210-rb1_rescue-image.zip" \
52+
-d build/qrb2210-rb1_rescue-image
53+
# generate partition files
54+
mkdir -v build/qrb2210-rb1_partitions
55+
(
56+
cd build/qrb2210-rb1_partitions
57+
conf="${QCOM_PTOOL}/platforms/qrb2210-rb1/partitions.conf"
58+
"${QCOM_PTOOL}/gen_partition.py" -i "$conf" \
59+
-o ptool-partitions.xml
60+
# partitions.conf sets --type=emmc, nand or ufs
61+
if grep -F '^--disk --type=ufs ' "${conf}"; then
62+
touch flash-ufs
63+
elif grep -F '^--disk --type=emmc ' "${conf}"; then
64+
touch flash-emmc
65+
fi
66+
"${QCOM_PTOOL}/ptool.py" -x ptool-partitions.xml
67+
)
68+
flash_dir="${ARTIFACTDIR}/flash_rb1"
69+
rm -rf "${flash_dir}"
70+
mkdir -v "${flash_dir}"
71+
# copy partition files
72+
cp --preserve=mode,timestamps -v build/qrb2210-rb1_partitions/* \
73+
"${flash_dir}"
74+
# copy rescue binaries; skip partition files
75+
find build/qrb2210-rb1_rescue-image \
76+
-not -name 'gpt_*' \
77+
-not -name 'patch*.xml' \
78+
-not -name 'rawprogram*.xml' \
79+
-not -name 'wipe*.xml' \
80+
-not -name 'zeros_*' \
81+
\( \
82+
-name LICENSE \
83+
-or -name 'prog_*' \
84+
-or -name '*.bin' \
85+
-or -name '*.elf' \
86+
-or -name '*.fv' \
87+
-or -name '*.mbn' \
88+
\) \
89+
-exec cp --preserve=mode,timestamps -v '{}' "${flash_dir}" \;
90+
91+
# TODO: currently not providing CDT; it's present in 96Boards'
92+
# RB1_firmware_20231124-v4.zip but not in Linaro's
93+
# rb1-bootloader-emmc-linux-47528.zip
94+
{{- end -}}
95+
3496
## platform: QCM6490
3597
# unpack boot binaries
3698
unzip -j "${ROOTDIR}/../qcm6490_boot-binaries.zip" \
@@ -45,6 +107,8 @@ actions:
45107
# partitions.conf sets --type=emmc, nand or ufs
46108
if grep -F '^--disk --type=ufs ' "${conf}"; then
47109
touch flash-ufs
110+
elif grep -F '^--disk --type=emmc ' "${conf}"; then
111+
touch flash-emmc
48112
fi
49113
"${QCOM_PTOOL}/ptool.py" -x ptool-partitions.xml
50114
)

0 commit comments

Comments
 (0)