diff --git a/build.sh b/build.sh index eee0894..e5556df 100644 --- a/build.sh +++ b/build.sh @@ -735,6 +735,235 @@ private_source_packaging() { fi } +### 生成 OTA 文件 +generate_ota_file() { + echo -e "\n" + echo -e "${BOLD}${MAGENTA_COLOR}============================================================${RESET}" + echo -e "${BOLD}${MAGENTA_COLOR} 📱 生成 OTA 文件${RESET}" + echo -e "${BOLD}${MAGENTA_COLOR}============================================================${RESET}" + echo "" + + if [ "$platform" = "x86_64" ]; then + echo -e " ${BOLD}${YELLOW_COLOR}➤${RESET} ${BOLD}平台: ${GREEN_COLOR}x86_64${RESET}" + mkdir -p ota + OTA_URL="https://github.com/QuickWrt/ZeroWrt/releases/download" + VERSION=$(sed 's/v//g' version.txt) + SHA256=$(sha256sum bin/targets/x86/64*/*-generic-squashfs-combined-efi.img.gz | awk '{print $1}') + + echo -e " ${BOLD}${YELLOW_COLOR}➤${RESET} ${BOLD}生成固件信息...${RESET}" + cat > ota/fw.json < ota/rockchip.json <