diff --git a/buildscript b/buildscript index 73558bb..04942e6 100755 --- a/buildscript +++ b/buildscript @@ -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 diff --git a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh index 27e3874..317d0a6 100755 --- a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh +++ b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh @@ -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"