Skip to content

Commit 4da1b6b

Browse files
committed
Fix another corner case when having boot images separately
1 parent 858bef2 commit 4da1b6b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

scripts/generate-armbian-images-json.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ strip_img_ext() {
292292
extract_file_extension() {
293293
local n="$1"
294294

295+
# U-Boot artifacts
296+
if [[ "$n" == *".u-boot.bin."* ]]; then
297+
echo "u-boot.bin.${n##*.u-boot.bin.}" # e.g. u-boot.bin.xz
298+
return
299+
fi
300+
295301
# rootfs images
296302
if [[ "$n" == *".rootfs.img."* ]]; then
297303
echo "rootfs.img.${n##*.rootfs.img.}"
@@ -501,12 +507,19 @@ cat "$tmpdir/a.txt" "$tmpdir/bcd.txt" >"$feed"
501507
""|img|oowow) BOOT_SUFFIX="";;
502508
esac
503509

510+
# U-Boot artifacts should show up as "-boot" in REDI_URL
511+
UBOOT_SUFFIX=""
512+
if [[ "$FILE_EXTENSION" == u-boot.bin* ]]; then
513+
UBOOT_SUFFIX="boot"
514+
fi
515+
504516
if [[ "$FILE_EXTENSION" == img.qcow2* ]]; then
505517
REDI_BRANCH="cloud"
506518
REDI_VARIANT="${VARIANT}-qcow2"
507519
else
508520
# Append boot flavor for non-cloud images
509521
[[ -n "$BOOT_SUFFIX" ]] && REDI_VARIANT="${REDI_VARIANT}-${BOOT_SUFFIX}"
522+
[[ -n "$UBOOT_SUFFIX" ]] && REDI_VARIANT="${REDI_VARIANT}-${UBOOT_SUFFIX}"
510523
fi
511524

512525
REDI_URL="https://dl.armbian.com/${PREFIX}${BOARD_SLUG}/${DISTRO^}_${REDI_BRANCH}_${REDI_VARIANT}"

0 commit comments

Comments
 (0)