buildscript: shortened firmware image file names

Signed-off-by: Steffen Pankratz <kratz00@gmx.de>
Reviewed-by: Jan Kraus <mayosemmel@gmail.com>
Reviewed-by: Tim Niemeyer <tim@tn-x.org>
This commit is contained in:
Steffen Pankratz 2016-07-18 19:27:34 +02:00 committed by Jan Kraus
parent d6f2f18e49
commit 543d786c46
2 changed files with 13 additions and 1 deletions

View File

@ -269,13 +269,21 @@ config() {
}
cp_firmware() {
if [ "$community" = "franken" ]; then
local community="fff"
fi
for image in ${images[@]}; do
filename_build=${image//openwrt/${community}-${version}}
filename_build=${filename_build//generic/g}
cp "$target/bin/${chipset}/$image" "./bin/$filename_build"
image_factory=${image/sysupgrade/factory}
if [[ -f "$target/bin/${chipset}/$image_factory" ]]; then
filename_build_factory=${filename_build/sysupgrade/factory}
if [ ${#image_factory} -lt ${#filename_build_factory} ]; then
echo "Warning: The factory image file name (${filename_build_factory}) is longer than the OpenWrt one, which might be incompatibility with the stock firmware."
fi
cp "$target/bin/${chipset}/$image_factory" "./bin/$filename_build_factory"
fi
done

View File

@ -55,7 +55,11 @@ if [ $VERSION -eq $FIRMWARE_VERSION ]; then
done
fi
FILE="${FIRMWARE_COMMUNITY}-${VERSION}-${SOC}-generic-${BOARD}-squashfs-sysupgrade.bin"
if [ "$FIRMWARE_COMMUNITY" == "franken" ]; then
FIRMWARE_COMMUNITY="fff"
fi
FILE="${FIRMWARE_COMMUNITY}-${VERSION}-${SOC}-g-${BOARD}-squashfs-sysupgrade.bin"
echo -ne "Downloading $FILE\n\n"
wget "${UPGRADE_PATH}/${FILE}"
wget "${UPGRADE_PATH}/${FILE}.sha256"