Skip to content

Commit 539f97b

Browse files
committed
feat(debos/flash)!: Add compatibility symlinks
Create disk-media.img1 and 2 symlinks to ../disk-media.img1 and 2. This helps with Axiom compatibility which expects all files to be in the same directory and doesn't necessarily cope with relative pathnames. Fixes: qualcomm-linux#360 Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
1 parent 2c6b7b5 commit 539f97b

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ actions:
372372
rm -rf "${flash_dir}"
373373
mkdir -v "${flash_dir}"
374374
# copy platform partition files
375-
cp --preserve=mode,timestamps -v \
375+
cp --preserve=all --no-dereference -v \
376376
"build/ptool/${platform}"/* "${flash_dir}"
377377

378378
# remove BLANK_GPT, WIPE_PARTITIONS and wipe_rawprogram files as
@@ -402,18 +402,18 @@ actions:
402402
-or -name '*.fv' \
403403
-or -name '*.mbn' \
404404
\) \
405-
-exec cp --preserve=mode,timestamps -v '{}' "${flash_dir}" \;
405+
-exec cp --preserve=all --no-dereference -v '{}' "${flash_dir}" \;
406406

407407
if [ -n "${board_u_boot_file}" ]; then
408408
# copy U-Boot binary to boot.img; qcom-ptool partitions.conf
409409
# files use filename=boot.img for boot_a and boot_b partitions
410-
cp --preserve=mode,timestamps -v \
410+
cp --preserve=all --no-dereference -v \
411411
"${ARTIFACTDIR}/${board_u_boot_file}" "${flash_dir}/boot.img"
412412
fi
413413

414414
if [ -n "$board_cdt_filename" ]; then
415415
# copy just the CDT data; no partition or flashing files
416-
cp --preserve=mode,timestamps -v \
416+
cp --preserve=all --no-dereference -v \
417417
"build/${board_name}_cdt/${board_cdt_filename}" \
418418
"${flash_dir}"
419419
fi

scripts/gen-ptool.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ PARTITIONS_CONF="${QCOM_PTOOL}/platforms/${PLATFORM}/partitions.conf"
2424

2525
case "$DISK_TYPE" in
2626
emmc|nvme)
27-
esp="../disk-sdcard.img1"
28-
rootfs="../disk-sdcard.img2"
27+
esp="disk-sdcard.img1"
28+
rootfs="disk-sdcard.img2"
2929
;;
3030
ufs)
31-
esp="../disk-ufs.img1"
32-
rootfs="../disk-ufs.img2"
31+
esp="disk-ufs.img1"
32+
rootfs="disk-ufs.img2"
3333
;;
3434
spinor)
3535
# spinor carries firmware only; no OS efi/rootfs partitions
@@ -58,6 +58,10 @@ partition_map="${partition_map},dtb_b=dtb.bin"
5858
partition_map="${partition_map},efi=${esp}"
5959
partition_map="${partition_map},rootfs=${rootfs}"
6060

61+
# create symlinks from flat image to actual file
62+
ln -s "../${esp}" "$esp"
63+
ln -s "../${rootfs}" "$rootfs"
64+
6165
# generate ptool-partitions.xml from partitions.conf
6266
"${QCOM_PTOOL}/gen_partition.py" -i "${PARTITIONS_CONF}" \
6367
-o ptool-partitions.xml \

0 commit comments

Comments
 (0)