修复 Openwrt 18.06 19.07 固件生成错误(by teasiu)
This commit is contained in:
parent
c433797df2
commit
742bea0671
|
@ -14,6 +14,8 @@ GET_TARGET_INFO() {
|
||||||
if [[ ! ${Current_Branch} == master ]];then
|
if [[ ! ${Current_Branch} == master ]];then
|
||||||
Current_Branch="$(echo ${Current_Branch} | egrep -o "[0-9]+.[0-9]+")"
|
Current_Branch="$(echo ${Current_Branch} | egrep -o "[0-9]+.[0-9]+")"
|
||||||
Openwrt_Version_="R${Current_Branch}-"
|
Openwrt_Version_="R${Current_Branch}-"
|
||||||
|
else
|
||||||
|
Openwrt_Version_="R18.06-"
|
||||||
fi
|
fi
|
||||||
AB_Firmware_Info=package/base-files/files/etc/openwrt_info
|
AB_Firmware_Info=package/base-files/files/etc/openwrt_info
|
||||||
case ${Source_Owner} in
|
case ${Source_Owner} in
|
||||||
|
@ -30,7 +32,13 @@ GET_TARGET_INFO() {
|
||||||
Openwrt_Version="${Openwrt_Version_}${Compile_Date}"
|
Openwrt_Version="${Openwrt_Version_}${Compile_Date}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
x86_Test="$(egrep -o "CONFIG_TARGET.*DEVICE.*=y" .config | sed -r 's/CONFIG_TARGET_(.*)_DEVICE_(.*)=y/\1/')"
|
while [[ -z "${x86_Test}" ]]
|
||||||
|
do
|
||||||
|
x86_Test="$(egrep -o "CONFIG_TARGET.*DEVICE.*=y" .config | sed -r 's/CONFIG_TARGET_(.*)_DEVICE_(.*)=y/\1/')"
|
||||||
|
[[ ! -z "${x86_Test}" ]] && break
|
||||||
|
x86_Test="$(egrep -o "CONFIG_TARGET.*Generic=y" .config | sed -r 's/CONFIG_TARGET_(.*)_Generic=y/\1/')"
|
||||||
|
[[ -z "${x86_Test}" ]] && TIME "Can not obtain the TARGET_PROFILE !" && exit 1
|
||||||
|
done
|
||||||
if [[ "${x86_Test}" == "x86_64" ]];then
|
if [[ "${x86_Test}" == "x86_64" ]];then
|
||||||
TARGET_PROFILE="x86_64"
|
TARGET_PROFILE="x86_64"
|
||||||
else
|
else
|
||||||
|
@ -60,6 +68,7 @@ GET_TARGET_INFO() {
|
||||||
echo "TARGET_BOARD=${TARGET_BOARD}" >> ${Home}/TARGET_INFO
|
echo "TARGET_BOARD=${TARGET_BOARD}" >> ${Home}/TARGET_INFO
|
||||||
echo "TARGET_SUBTARGET=${TARGET_SUBTARGET}" >> ${Home}/TARGET_INFO
|
echo "TARGET_SUBTARGET=${TARGET_SUBTARGET}" >> ${Home}/TARGET_INFO
|
||||||
echo "Home=${Home}" >> ${Home}/TARGET_INFO
|
echo "Home=${Home}" >> ${Home}/TARGET_INFO
|
||||||
|
echo "Current_Branch=${Current_Branch}" >> ${Home}/TARGET_INFO
|
||||||
|
|
||||||
echo "${Openwrt_Version}" > ${AB_Firmware_Info}
|
echo "${Openwrt_Version}" > ${AB_Firmware_Info}
|
||||||
echo "${Owner_Repo}" >> ${AB_Firmware_Info}
|
echo "${Owner_Repo}" >> ${AB_Firmware_Info}
|
||||||
|
@ -119,9 +128,6 @@ Firmware-Diy_Base() {
|
||||||
sed -i "s?Template?Compiled by ${Author} [${Display_Date}]?g" $Version_File
|
sed -i "s?Template?Compiled by ${Author} [${Display_Date}]?g" $Version_File
|
||||||
[[ "${INCLUDE_DRM_I915}" == "true" ]] && Replace_File CustomFiles/Depends/i915-4.19 target/linux/x86 config-4.19
|
[[ "${INCLUDE_DRM_I915}" == "true" ]] && Replace_File CustomFiles/Depends/i915-4.19 target/linux/x86 config-4.19
|
||||||
;;
|
;;
|
||||||
openwrt)
|
|
||||||
[[ "${INCLUDE_DRM_I915}" == "true" ]] && Replace_File CustomFiles/Depends/i915-4.14 target/linux/x86 config-4.14
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case ${Source_Owner} in
|
case ${Source_Owner} in
|
||||||
|
@ -139,22 +145,26 @@ Firmware-Diy_Base() {
|
||||||
|
|
||||||
if [[ "${INCLUDE_Obsolete_PKG_Compatible}" == "true" ]];then
|
if [[ "${INCLUDE_Obsolete_PKG_Compatible}" == "true" ]];then
|
||||||
TIME "Start to run Obsolete_Package_Compatible Scripts ..."
|
TIME "Start to run Obsolete_Package_Compatible Scripts ..."
|
||||||
case ${Current_Branch} in
|
if [[ ${Source_Owner} == openwrt ]];then
|
||||||
19.07 | 21.02)
|
case ${Current_Branch} in
|
||||||
Replace_File CustomFiles/Patches/0003-upx-ucl-${Current_Branch}.patch ./
|
19.07 | 21.02)
|
||||||
cat 0003-upx-ucl-${Current_Branch}.patch | patch -p1 > /dev/null 2>&1
|
Replace_File CustomFiles/Patches/0003-upx-ucl-${Current_Branch}.patch ./
|
||||||
ExtraPackages svn ../feeds/packages/lang golang https://github.com/coolsnowwolf/packages/trunk/lang
|
cat 0003-upx-ucl-${Current_Branch}.patch | patch -p1 > /dev/null 2>&1
|
||||||
|
ExtraPackages svn ../feeds/packages/lang golang https://github.com/coolsnowwolf/packages/trunk/lang
|
||||||
|
|
||||||
TIME "Start to convert zh-cn translation files to zh_Hans ..."
|
TIME "Start to convert zh-cn translation files to zh_Hans ..."
|
||||||
Replace_File Scripts/Convert_Translation.sh package
|
Replace_File Scripts/Convert_Translation.sh package
|
||||||
cd ./package
|
cd ./package
|
||||||
bash ./Convert_Translation.sh
|
bash ./Convert_Translation.sh
|
||||||
cd ..
|
cd ..
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
TIME "[ERROR] Current branch: [${Current_Branch}] is not supported !"
|
TIME "[ERROR] Current branch: [${Current_Branch}] is not supported !"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
else
|
||||||
|
TIME "[ERROR] Current source: [${Source_Owner}] is not supported !"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,11 +174,25 @@ PS_Firmware() {
|
||||||
case ${Source_Owner} in
|
case ${Source_Owner} in
|
||||||
immortalwrt)
|
immortalwrt)
|
||||||
_Firmware=immortalwrt
|
_Firmware=immortalwrt
|
||||||
_Legacy_Firmware=combined-squashfs
|
|
||||||
_EFI_Firmware=uefi-gpt-squashfs
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
_Firmware=openwrt
|
_Firmware=openwrt
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case ${Current_Branch} in
|
||||||
|
19.07 | 18.06)
|
||||||
|
case ${Source_Owner} in
|
||||||
|
immortalwrt)
|
||||||
|
_Legacy_Firmware=combined-squashfs
|
||||||
|
_EFI_Firmware=uefi-gpt-squashfs
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_Legacy_Firmware=combined-squashfs
|
||||||
|
_EFI_Firmware=combined-squashfs-efi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
_Legacy_Firmware=generic-squashfs-combined
|
_Legacy_Firmware=generic-squashfs-combined
|
||||||
_EFI_Firmware=generic-squashfs-combined-efi
|
_EFI_Firmware=generic-squashfs-combined-efi
|
||||||
;;
|
;;
|
||||||
|
@ -217,9 +241,9 @@ PS_Firmware() {
|
||||||
_MD5=$(md5sum bin/Firmware/${AutoBuild_Firmware} | cut -d ' ' -f1)
|
_MD5=$(md5sum bin/Firmware/${AutoBuild_Firmware} | cut -d ' ' -f1)
|
||||||
_SHA256=$(sha256sum bin/Firmware/${AutoBuild_Firmware} | cut -d ' ' -f1)
|
_SHA256=$(sha256sum bin/Firmware/${AutoBuild_Firmware} | cut -d ' ' -f1)
|
||||||
echo -e "\nMD5:${_MD5}\nSHA256:${_SHA256}" > bin/Firmware/${AutoBuild_Detail}
|
echo -e "\nMD5:${_MD5}\nSHA256:${_SHA256}" > bin/Firmware/${AutoBuild_Detail}
|
||||||
TIME "Common Firmware is detected !"
|
TIME "Firmware is detected !"
|
||||||
else
|
else
|
||||||
TIME "[ERROR] Common Firmware is not detected !"
|
TIME "[ERROR] Firmware is not detected !"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue