parent
8c4ec5a1d7
commit
056fe3950a
|
@ -0,0 +1,7 @@
|
||||||
|
DISTRIB_ID='%D'
|
||||||
|
DISTRIB_RELEASE='%V'
|
||||||
|
DISTRIB_REVISION=''
|
||||||
|
DISTRIB_TARGET='%S'
|
||||||
|
DISTRIB_ARCH='%A'
|
||||||
|
DISTRIB_DESCRIPTION='ImmortalWrt Template'
|
||||||
|
DISTRIB_TAINTS='%t'
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo -e "\nRunning CoreMark test,please wait ..."
|
||||||
|
|
||||||
|
Scores=$(cat /tmp/coremark.log 2> /dev/null | grep "CoreMark 1.0" | awk '{print $4}')
|
||||||
|
Processer=$(awk -F ':[ ]' '/model name/{printf ($2);exit}' /proc/cpuinfo)
|
||||||
|
Time=$(grep "Total time" /tmp/coremark.log | awk '{print $4}')
|
||||||
|
[[ -z "${Processer}" ]] && Processer=Unknown
|
||||||
|
|
||||||
|
echo -e "\nProcesser: ${Processer}\nScore: ${Scores}\nTime costs: ${Time}"
|
|
@ -9,27 +9,17 @@ Diy_Core() {
|
||||||
|
|
||||||
INCLUDE_AutoUpdate=true
|
INCLUDE_AutoUpdate=true
|
||||||
INCLUDE_AutoBuild_Tools=true
|
INCLUDE_AutoBuild_Tools=true
|
||||||
INCLUDE_mt7621_OC1000MHz=true
|
|
||||||
INCLUDE_DRM_I915=true
|
INCLUDE_DRM_I915=true
|
||||||
|
|
||||||
INCLUDE_SSR_Plus=true
|
|
||||||
INCLUDE_Passwall=true
|
|
||||||
INCLUDE_HelloWorld=false
|
|
||||||
INCLUDE_Bypass=false
|
|
||||||
INCLUDE_OpenClash=true
|
|
||||||
INCLUDE_OAF=false
|
|
||||||
INCLUDE_Argon=true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Diy-Part1() {
|
Diy-Part1() {
|
||||||
Diy_Part1_Base
|
Diy_Part1_Base
|
||||||
|
|
||||||
Replace_File Customize/mac80211.sh package/kernel/mac80211/files/lib/wifi
|
|
||||||
Replace_File Customize/coremark.sh package/lean/coremark
|
|
||||||
Replace_File Customize/cpuinfo_x86 package/lean/autocore/files/x86/sbin cpuinfo
|
|
||||||
Update_Makefile xray-core package/lean/helloworld/xray-core
|
Update_Makefile xray-core package/lean/helloworld/xray-core
|
||||||
Update_Makefile exfat package/kernel/exfat
|
Update_Makefile exfat package/kernel/exfat
|
||||||
|
|
||||||
|
ExtraPackages git other OpenClash https://github.com/vernesong master
|
||||||
|
ExtraPackages git other openwrt-passwall https://github.com/xiaorouji main
|
||||||
ExtraPackages git other luci-app-argon-config https://github.com/jerrykuku
|
ExtraPackages git other luci-app-argon-config https://github.com/jerrykuku
|
||||||
ExtraPackages git other luci-app-adguardhome https://github.com/Hyy2001X
|
ExtraPackages git other luci-app-adguardhome https://github.com/Hyy2001X
|
||||||
ExtraPackages git other luci-app-shutdown https://github.com/Hyy2001X
|
ExtraPackages git other luci-app-shutdown https://github.com/Hyy2001X
|
||||||
|
@ -38,8 +28,8 @@ Diy-Part1() {
|
||||||
ExtraPackages svn other luci-app-socat https://github.com/Lienol/openwrt-package/trunk
|
ExtraPackages svn other luci-app-socat https://github.com/Lienol/openwrt-package/trunk
|
||||||
ExtraPackages svn other luci-app-usb3disable https://github.com/immortalwrt/luci/trunk/applications
|
ExtraPackages svn other luci-app-usb3disable https://github.com/immortalwrt/luci/trunk/applications
|
||||||
ExtraPackages svn other luci-app-filebrowser https://github.com/immortalwrt/luci/trunk/applications
|
ExtraPackages svn other luci-app-filebrowser https://github.com/immortalwrt/luci/trunk/applications
|
||||||
ExtraPackages svn other filebrowser https://github.com/immortalwrt/immortalwrt/trunk/package/ctcgfw
|
ExtraPackages svn other filebrowser https://github.com/immortalwrt/packages/trunk/utils
|
||||||
ExtraPackages svn lean luci-app-eqos https://github.com/immortalwrt/immortalwrt/trunk/package/ntlf9t
|
ExtraPackages svn other luci-app-eqos https://github.com/immortalwrt/immortalwrt/trunk/package/ntlf9t
|
||||||
ExtraPackages git other luci-app-bearDropper https://github.com/NateLol
|
ExtraPackages git other luci-app-bearDropper https://github.com/NateLol
|
||||||
ExtraPackages git other luci-app-onliner https://github.com/rufengsuixing
|
ExtraPackages git other luci-app-onliner https://github.com/rufengsuixing
|
||||||
}
|
}
|
||||||
|
@ -47,6 +37,21 @@ Diy-Part1() {
|
||||||
Diy-Part2() {
|
Diy-Part2() {
|
||||||
Diy_Part2_Base
|
Diy_Part2_Base
|
||||||
ExtraPackages svn other/../../feeds/packages/admin netdata https://github.com/openwrt/packages/trunk/admin
|
ExtraPackages svn other/../../feeds/packages/admin netdata https://github.com/openwrt/packages/trunk/admin
|
||||||
|
|
||||||
|
Replace_File Customize/uhttpd.po feeds/luci/applications/luci-app-uhttpd/po/zh-cn
|
||||||
|
Replace_File Customize/webadmin.po package/lean/luci-app-webadmin/po/zh-cn
|
||||||
|
Replace_File Customize/mwan3.config package/feeds/packages/mwan3/files/etc/config mwan3
|
||||||
|
|
||||||
|
case ${TARGET_PROFILE} in
|
||||||
|
d-team_newifi-d2)
|
||||||
|
Replace_File Customize/mac80211.sh package/kernel/mac80211/files/lib/wifi
|
||||||
|
Replace_File Customize/system_newifi-d2 package/base-files/files/etc/config system
|
||||||
|
Replace_File Customize/102-mt7621-fix-cpu-clk-add-clkdev.patch target/linux/ramips/patches-5.4
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
Replace_File Customize/system_common package/base-files/files/etc/config system
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
Diy-Part3() {
|
Diy-Part3() {
|
||||||
|
|
|
@ -4,13 +4,28 @@
|
||||||
# AutoBuild Functions
|
# AutoBuild Functions
|
||||||
|
|
||||||
GET_TARGET_INFO() {
|
GET_TARGET_INFO() {
|
||||||
|
Diy_Core
|
||||||
Home=${GITHUB_WORKSPACE}/openwrt
|
Home=${GITHUB_WORKSPACE}/openwrt
|
||||||
echo "Home Path: ${Home}"
|
|
||||||
[ -f ${GITHUB_WORKSPACE}/Openwrt.info ] && . ${GITHUB_WORKSPACE}/Openwrt.info
|
[ -f ${GITHUB_WORKSPACE}/Openwrt.info ] && . ${GITHUB_WORKSPACE}/Openwrt.info
|
||||||
Default_File="package/lean/default-settings/files/zzz-default-settings"
|
Owner_Repo="$(grep "https://github.com/[a-zA-Z0-9]" ${GITHUB_WORKSPACE}/.git/config | cut -c8-100)"
|
||||||
[ -f ${Default_File} ] && Lede_Version="$(egrep -o "R[0-9]+\.[0-9]+\.[0-9]+" ${Default_File})"
|
AB_Firmware_Info=${GITHUB_WORKSPACE}/openwrt/package/base-files/files/etc/openwrt_info
|
||||||
[[ -z ${Lede_Version} ]] && Lede_Version="Openwrt"
|
Source_Repo="$(grep "https://github.com/[a-zA-Z0-9]" ${Home}/.git/config | cut -c8-100)"
|
||||||
Openwrt_Version="${Lede_Version}-${Compile_Date}"
|
Source_Owner="$(echo "${Source_Repo}" | egrep -o "[a-z]+" | awk 'NR==4')"
|
||||||
|
case ${Source_Owner} in
|
||||||
|
coolsnowwolf)
|
||||||
|
Version_File="package/lean/default-settings/files/zzz-default-settings"
|
||||||
|
Old_Version="$(egrep -o "R[0-9]+\.[0-9]+\.[0-9]+" ${Version_File})"
|
||||||
|
Openwrt_Version="${Old_Version}-${Compile_Date}"
|
||||||
|
|
||||||
|
;;
|
||||||
|
immortalwrt)
|
||||||
|
Version_File="package/base-files/files/etc/openwrt_release"
|
||||||
|
Openwrt_Version="${Compile_Date}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
Openwrt_Version=Unknown
|
||||||
|
;;
|
||||||
|
esac
|
||||||
x86_Test="$(egrep -o "CONFIG_TARGET.*DEVICE.*=y" .config | sed -r 's/CONFIG_TARGET_(.*)_DEVICE_(.*)=y/\1/')"
|
x86_Test="$(egrep -o "CONFIG_TARGET.*DEVICE.*=y" .config | sed -r 's/CONFIG_TARGET_(.*)_DEVICE_(.*)=y/\1/')"
|
||||||
if [[ "${x86_Test}" == "x86_64" ]];then
|
if [[ "${x86_Test}" == "x86_64" ]];then
|
||||||
TARGET_PROFILE="x86_64"
|
TARGET_PROFILE="x86_64"
|
||||||
|
@ -18,131 +33,112 @@ GET_TARGET_INFO() {
|
||||||
TARGET_PROFILE="$(egrep -o "CONFIG_TARGET.*DEVICE.*=y" .config | sed -r 's/.*DEVICE_(.*)=y/\1/')"
|
TARGET_PROFILE="$(egrep -o "CONFIG_TARGET.*DEVICE.*=y" .config | sed -r 's/.*DEVICE_(.*)=y/\1/')"
|
||||||
fi
|
fi
|
||||||
[[ -z "${TARGET_PROFILE}" ]] && TARGET_PROFILE="${Default_Device}"
|
[[ -z "${TARGET_PROFILE}" ]] && TARGET_PROFILE="${Default_Device}"
|
||||||
case "${TARGET_PROFILE}" in
|
case ${TARGET_PROFILE} in
|
||||||
x86_64)
|
x86_64)
|
||||||
grep "CONFIG_TARGET_IMAGES_GZIP=y" ${Home}/.config > /dev/null 2>&1
|
grep "CONFIG_TARGET_IMAGES_GZIP=y" ${Home}/.config > /dev/null 2>&1
|
||||||
if [[ ! $? -ne 0 ]];then
|
if [[ ! "$?" -ne 0 ]];then
|
||||||
Firmware_sfx="img.gz"
|
Firmware_Type="img.gz"
|
||||||
else
|
else
|
||||||
Firmware_sfx="img"
|
Firmware_Type="img"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
Firmware_sfx="bin"
|
Firmware_Type="bin"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
TARGET_BOARD="$(awk -F '[="]+' '/TARGET_BOARD/{print $2}' .config)"
|
TARGET_BOARD="$(awk -F '[="]+' '/TARGET_BOARD/{print $2}' .config)"
|
||||||
TARGET_SUBTARGET="$(awk -F '[="]+' '/TARGET_SUBTARGET/{print $2}' .config)"
|
TARGET_SUBTARGET="$(awk -F '[="]+' '/TARGET_SUBTARGET/{print $2}' .config)"
|
||||||
Github_Repo="$(grep "https://github.com/[a-zA-Z0-9]" ${GITHUB_WORKSPACE}/.git/config | cut -c8-100)"
|
|
||||||
AutoBuild_Info=${GITHUB_WORKSPACE}/openwrt/package/base-files/files/etc/openwrt_info
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Diy_Part1_Base() {
|
Diy_Part1_Base() {
|
||||||
Diy_Core
|
Diy_Core
|
||||||
Mkdir package/lean
|
Replace_File Customize/Depends/banner package/base-files/files/etc
|
||||||
Replace_File Customize/banner package/base-files/files/etc
|
if [[ "${INCLUDE_AutoUpdate}" == "true" ]];then
|
||||||
if [[ "${INCLUDE_SSR_Plus}" == "true" ]];then
|
ExtraPackages git lean luci-app-autoupdate https://github.com/Hyy2001X main
|
||||||
ExtraPackages git lean helloworld https://github.com/fw876 master
|
Replace_File Scripts/AutoUpdate.sh package/base-files/files/bin
|
||||||
#sed -i 's/143/143,25,5222,6969,1337,2710/' package/lean/helloworld/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
AutoUpdate_Version=$(awk 'NR==6' package/base-files/files/bin/AutoUpdate.sh | awk -F '[="]+' '/Version/{print $2}')
|
||||||
sed -i 's/143/143,8080/' package/lean/helloworld/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
sed -i "s?Openwrt?Openwrt ${Openwrt_Version} / AutoUpdate ${AutoUpdate_Version}?g" package/base-files/files/etc/banner
|
||||||
fi
|
else
|
||||||
if [[ "${INCLUDE_HelloWorld}" == "true" ]];then
|
sed -i "s?Openwrt?Openwrt ${Openwrt_Version}?g" package/base-files/files/etc/banner
|
||||||
ExtraPackages git lean luci-app-vssr https://github.com/jerrykuku master
|
|
||||||
ExtraPackages git other lua-maxminddb https://github.com/jerrykuku master
|
|
||||||
PKG_Finder d package xray-core
|
|
||||||
[[ -z "${PKG_RESULT}" ]] && ExtraPackages svn other xray-core https://github.com/fw876/helloworld/trunk
|
|
||||||
fi
|
|
||||||
if [[ "${INCLUDE_Bypass}" == "true" ]];then
|
|
||||||
ExtraPackages git other luci-app-bypass https://github.com/garypang13 main
|
|
||||||
find package/*/ feeds/*/ -maxdepth 2 -path "*luci-app-bypass/Makefile" | xargs -i sed -i 's/shadowsocksr-libev-ssr-redir/shadowsocksr-libev-alt/g' {}
|
|
||||||
find package/*/ feeds/*/ -maxdepth 2 -path "*luci-app-bypass/Makefile" | xargs -i sed -i 's/shadowsocksr-libev-ssr-server/shadowsocksr-libev-server/g' {}
|
|
||||||
fi
|
|
||||||
if [[ "${INCLUDE_OpenClash}" == "true" ]];then
|
|
||||||
ExtraPackages git other OpenClash https://github.com/vernesong master
|
|
||||||
fi
|
fi
|
||||||
if [[ "${INCLUDE_AutoBuild_Tools}" == "true" ]];then
|
if [[ "${INCLUDE_AutoBuild_Tools}" == "true" ]];then
|
||||||
Replace_File Scripts/AutoBuild_Tools.sh package/base-files/files/bin
|
Replace_File Scripts/AutoBuild_Tools.sh package/base-files/files/bin
|
||||||
fi
|
fi
|
||||||
if [[ "${INCLUDE_Passwall}" == "true" ]];then
|
|
||||||
ExtraPackages git other openwrt-passwall https://github.com/xiaorouji main
|
|
||||||
fi
|
|
||||||
if [[ "${INCLUDE_mt7621_OC1000MHz}" == "true" ]];then
|
|
||||||
Replace_File Customize/102-mt7621-fix-cpu-clk-add-clkdev.patch target/linux/ramips/patches-5.4
|
|
||||||
fi
|
|
||||||
if [[ "${INCLUDE_OAF}" == "true" ]];then
|
|
||||||
echo "Warning: OpenAppFilter may conflict with FLowoffload/SFE/Turbo ACC !"
|
|
||||||
ExtraPackages git other OpenAppFilter https://github.com/destan19
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Diy_Part2_Base() {
|
Diy_Part2_Base() {
|
||||||
Diy_Core
|
|
||||||
GET_TARGET_INFO
|
GET_TARGET_INFO
|
||||||
Replace_File Customize/uhttpd.po feeds/luci/applications/luci-app-uhttpd/po/zh-cn
|
|
||||||
Replace_File Customize/webadmin.po package/lean/luci-app-webadmin/po/zh-cn
|
Replace_File Customize/Depends/cpuinfo_x86 package/lean/autocore/files/x86/sbin cpuinfo
|
||||||
Replace_File Customize/mwan3.config package/feeds/packages/mwan3/files/etc/config mwan3
|
case ${Source_Owner} in
|
||||||
if [[ "${INCLUDE_Argon}" == "true" ]];then
|
coolsnowwolf)
|
||||||
if [ -f "${Default_File}" ];then
|
|
||||||
ExtraPackages git lean luci-theme-argon https://github.com/jerrykuku 18.06
|
ExtraPackages git lean luci-theme-argon https://github.com/jerrykuku 18.06
|
||||||
else
|
ExtraPackages git lean helloworld https://github.com/fw876 master
|
||||||
ExtraPackages git other luci-theme-argon https://github.com/jerrykuku
|
Update_Makefile xray-core package/lean/helloworld/xray-core
|
||||||
fi
|
sed -i 's/143/143,25,5222,6969,1337,2710/' package/lean/helloworld/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
||||||
fi
|
Replace_File Customize/Depends/coremark_lede.sh package/lean/coremark coremark.sh
|
||||||
|
ExtraPackages svn other/../../feeds/packages/admin netdata https://github.com/openwrt/packages/trunk/admin
|
||||||
|
|
||||||
|
sed -i "s?iptables?#iptables?g" ${Version_File} > /dev/null 2>&1
|
||||||
|
sed -i "s?${Old_Version}?${Old_Version} Compiled by ${Author} [${Display_Date}]?g" $Version_File
|
||||||
|
|
||||||
if [[ "${INCLUDE_DRM_I915}" == "true" ]];then
|
if [[ "${INCLUDE_DRM_I915}" == "true" ]];then
|
||||||
Replace_File Customize/config-5.4 target/linux/x86
|
Replace_File Customize/Depends/config-5.4 target/linux/x86
|
||||||
fi
|
fi
|
||||||
case ${TARGET_PROFILE} in
|
;;
|
||||||
d-team_newifi-d2)
|
immortalwrt)
|
||||||
Replace_File Customize/system_newifi-d2 package/base-files/files/etc/config system
|
sed -i 's/143/143,25,5222,6969,1337,2710/' package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr
|
||||||
|
Replace_File Customize/Depends/coremark_ImmortalWrt.sh package/base-files/files/etc coremark.sh
|
||||||
|
|
||||||
|
Replace_File Customize/Depends/ImmortalWrt package/base-files/files/etc openwrt_release
|
||||||
|
sed -i "s?Template?Compiled by ${Author} [${Display_Date}]?g" $Version_File
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
Replace_File Customize/system_common package/base-files/files/etc/config system
|
ExtraPackages git other luci-theme-argon https://github.com/jerrykuku
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
[ -f "${Default_File}" ] && sed -i "s?iptables?#iptables?g" ${Default_File} > /dev/null 2>&1
|
|
||||||
if [[ "${INCLUDE_AutoUpdate}" == "true" ]];then
|
echo "${Openwrt_Version}" > ${AB_Firmware_Info}
|
||||||
ExtraPackages git lean luci-app-autoupdate https://github.com/Hyy2001X main
|
echo "${Owner_Repo}" >> ${AB_Firmware_Info}
|
||||||
sed -i '/luci-app-autoupdate/d' .config > /dev/null 2>&1
|
echo "${TARGET_PROFILE}" >> ${AB_Firmware_Info}
|
||||||
echo -e "\nCONFIG_PACKAGE_luci-app-autoupdate=y" >> .config
|
echo "${Firmware_Type}" >> ${AB_Firmware_Info}
|
||||||
Replace_File Scripts/AutoUpdate.sh package/base-files/files/bin
|
|
||||||
AutoUpdate_Version=$(awk 'NR==6' package/base-files/files/bin/AutoUpdate.sh | awk -F '[="]+' '/Version/{print $2}')
|
|
||||||
[[ -z "${AutoUpdate_Version}" ]] && AutoUpdate_Version="Unknown"
|
|
||||||
sed -i "s?Openwrt?Openwrt ${Openwrt_Version} / AutoUpdate ${AutoUpdate_Version}?g" package/base-files/files/etc/banner
|
|
||||||
echo "AutoUpdate Version: ${AutoUpdate_Version}"
|
|
||||||
else
|
|
||||||
sed -i "s?Openwrt?Openwrt ${Openwrt_Version}?g" package/base-files/files/etc/banner
|
|
||||||
fi
|
|
||||||
[[ -z "${Author}" ]] && Author="Unknown"
|
|
||||||
[ -f "$Default_File" ] && sed -i "s?${Lede_Version}?${Lede_Version} Compiled by ${Author} [${Display_Date}]?g" $Default_File
|
|
||||||
echo "${Openwrt_Version}" > ${AutoBuild_Info}
|
|
||||||
echo "${Github_Repo}" >> ${AutoBuild_Info}
|
|
||||||
echo "${TARGET_PROFILE}" >> ${AutoBuild_Info}
|
|
||||||
echo "${Firmware_sfx}" >> ${AutoBuild_Info}
|
|
||||||
|
|
||||||
echo "Author: ${Author}"
|
echo "Author: ${Author}"
|
||||||
echo "Openwrt Version: ${Openwrt_Version}"
|
echo "Github: ${Owner_Repo}"
|
||||||
echo "Router: ${TARGET_PROFILE}"
|
echo "Router: ${TARGET_PROFILE}"
|
||||||
echo "Github: ${Github_Repo}"
|
echo "Firmware Version: ${Openwrt_Version}"
|
||||||
echo "Firmware Type: ${Firmware_sfx}"
|
echo "Firmware Type: ${Firmware_Type}"
|
||||||
|
echo "Source Github: ${Source_Repo}"
|
||||||
}
|
}
|
||||||
|
|
||||||
Diy_Part3_Base() {
|
Diy_Part3_Base() {
|
||||||
Diy_Core
|
|
||||||
GET_TARGET_INFO
|
GET_TARGET_INFO
|
||||||
|
case ${Source_Owner} in
|
||||||
|
immortalwrt)
|
||||||
|
_Firmware=immortalwrt
|
||||||
|
_Legacy_Firmware=combined-squashfs
|
||||||
|
_EFI_Firmware=uefi-gpt-squashfs
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_Firmware=openwrt
|
||||||
|
_Legacy_Firmware=generic-squashfs-combined
|
||||||
|
_EFI_Firmware=generic-squashfs-combined-efi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Firmware_Path="bin/targets/${TARGET_BOARD}/${TARGET_SUBTARGET}"
|
Firmware_Path="bin/targets/${TARGET_BOARD}/${TARGET_SUBTARGET}"
|
||||||
Mkdir bin/Firmware
|
Mkdir bin/Firmware
|
||||||
case "${TARGET_PROFILE}" in
|
case "${TARGET_PROFILE}" in
|
||||||
x86_64)
|
x86_64)
|
||||||
cd ${Firmware_Path}
|
cd ${Firmware_Path}
|
||||||
Legacy_Firmware=openwrt-${TARGET_BOARD}-${TARGET_SUBTARGET}-generic-squashfs-combined.${Firmware_sfx}
|
Legacy_Firmware=${_Firmware}-${TARGET_BOARD}-${TARGET_SUBTARGET}-${_Legacy_Firmware}.${Firmware_Type}
|
||||||
EFI_Firmware=openwrt-${TARGET_BOARD}-${TARGET_SUBTARGET}-generic-squashfs-combined-efi.${Firmware_sfx}
|
EFI_Firmware=${_Firmware}-${TARGET_BOARD}-${TARGET_SUBTARGET}-${_EFI_Firmware}.${Firmware_Type}
|
||||||
AutoBuild_Firmware="AutoBuild-${TARGET_PROFILE}-${Openwrt_Version}"
|
AutoBuild_Firmware="AutoBuild-${TARGET_PROFILE}-${Openwrt_Version}"
|
||||||
if [ -f "${Legacy_Firmware}" ];then
|
if [ -f "${Legacy_Firmware}" ];then
|
||||||
_MD5=$(md5sum ${Legacy_Firmware} | cut -d ' ' -f1)
|
_MD5=$(md5sum ${Legacy_Firmware} | cut -d ' ' -f1)
|
||||||
_SHA256=$(sha256sum ${Legacy_Firmware} | cut -d ' ' -f1)
|
_SHA256=$(sha256sum ${Legacy_Firmware} | cut -d ' ' -f1)
|
||||||
touch ${Home}/bin/Firmware/${AutoBuild_Firmware}.detail
|
touch ${Home}/bin/Firmware/${AutoBuild_Firmware}.detail
|
||||||
echo -e "\nMD5:${_MD5}\nSHA256:${_SHA256}" > ${Home}/bin/Firmware/${AutoBuild_Firmware}-Legacy.detail
|
echo -e "\nMD5:${_MD5}\nSHA256:${_SHA256}" > ${Home}/bin/Firmware/${AutoBuild_Firmware}-Legacy.detail
|
||||||
mv -f ${Legacy_Firmware} ${Home}/bin/Firmware/${AutoBuild_Firmware}-Legacy.${Firmware_sfx}
|
mv -f ${Legacy_Firmware} ${Home}/bin/Firmware/${AutoBuild_Firmware}-Legacy.${Firmware_Type}
|
||||||
echo "Legacy Firmware is detected !"
|
echo "Legacy Firmware is detected !"
|
||||||
fi
|
fi
|
||||||
if [ -f "${EFI_Firmware}" ];then
|
if [ -f "${EFI_Firmware}" ];then
|
||||||
|
@ -150,14 +146,14 @@ Diy_Part3_Base() {
|
||||||
_SHA256=$(sha256sum ${EFI_Firmware} | cut -d ' ' -f1)
|
_SHA256=$(sha256sum ${EFI_Firmware} | cut -d ' ' -f1)
|
||||||
touch ${Home}/bin/Firmware/${AutoBuild_Firmware}-UEFI.detail
|
touch ${Home}/bin/Firmware/${AutoBuild_Firmware}-UEFI.detail
|
||||||
echo -e "\nMD5:${_MD5}\nSHA256:${_SHA256}" > ${Home}/bin/Firmware/${AutoBuild_Firmware}-UEFI.detail
|
echo -e "\nMD5:${_MD5}\nSHA256:${_SHA256}" > ${Home}/bin/Firmware/${AutoBuild_Firmware}-UEFI.detail
|
||||||
cp ${EFI_Firmware} ${Home}/bin/Firmware/${AutoBuild_Firmware}-UEFI.${Firmware_sfx}
|
cp ${EFI_Firmware} ${Home}/bin/Firmware/${AutoBuild_Firmware}-UEFI.${Firmware_Type}
|
||||||
echo "UEFI Firmware is detected !"
|
echo "UEFI Firmware is detected !"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
cd ${Home}
|
cd ${Home}
|
||||||
Default_Firmware="openwrt-${TARGET_BOARD}-${TARGET_SUBTARGET}-${TARGET_PROFILE}-squashfs-sysupgrade.${Firmware_sfx}"
|
Default_Firmware="${_Firmware}-${TARGET_BOARD}-${TARGET_SUBTARGET}-${TARGET_PROFILE}-squashfs-sysupgrade.${Firmware_Type}"
|
||||||
AutoBuild_Firmware="AutoBuild-${TARGET_PROFILE}-${Openwrt_Version}.${Firmware_sfx}"
|
AutoBuild_Firmware="AutoBuild-${TARGET_PROFILE}-${Openwrt_Version}.${Firmware_Type}"
|
||||||
AutoBuild_Detail="AutoBuild-${TARGET_PROFILE}-${Openwrt_Version}.detail"
|
AutoBuild_Detail="AutoBuild-${TARGET_PROFILE}-${Openwrt_Version}.detail"
|
||||||
echo "Firmware: ${AutoBuild_Firmware}"
|
echo "Firmware: ${AutoBuild_Firmware}"
|
||||||
mv -f ${Firmware_Path}/${Default_Firmware} bin/Firmware/${AutoBuild_Firmware}
|
mv -f ${Firmware_Path}/${Default_Firmware} bin/Firmware/${AutoBuild_Firmware}
|
||||||
|
|
Loading…
Reference in New Issue