修改 Default_Device 为 Default_TARGET_PROFILE
This commit is contained in:
		
							parent
							
								
									4968cccfd2
								
							
						
					
					
						commit
						51533a62cb
					
				|  | @ -4,9 +4,9 @@ | ||||||
| 
 | 
 | ||||||
| Diy_Core() { | Diy_Core() { | ||||||
| 	Author=Hyy2001 | 	Author=Hyy2001 | ||||||
| 	Default_Device= | 	Default_TARGET_PROFILE=auto | ||||||
| 	Short_Firmware_Date=true | 	Short_Firmware_Date=true | ||||||
| 	Default_LAN_IP=192.168.1.1 | 	Default_LAN_IP=false | ||||||
| 
 | 
 | ||||||
| 	INCLUDE_AutoBuild_Features=true | 	INCLUDE_AutoBuild_Features=true | ||||||
| 	INCLUDE_DRM_I915=true | 	INCLUDE_DRM_I915=true | ||||||
|  | @ -19,5 +19,8 @@ Firmware-Diy() { | ||||||
| 	d-team_newifi-d2) | 	d-team_newifi-d2) | ||||||
| 		Copy CustomFiles/mac80211.sh package/kernel/mac80211/files/lib/wifi | 		Copy CustomFiles/mac80211.sh package/kernel/mac80211/files/lib/wifi | ||||||
| 		# Copy CustomFiles/system_d-team_newifi-d2 package/base-files/files/etc/config system | 		# Copy CustomFiles/system_d-team_newifi-d2 package/base-files/files/etc/config system | ||||||
|  | 	;; | ||||||
|  | 	*) | ||||||
|  | 		: | ||||||
| 	esac | 	esac | ||||||
| } | } | ||||||
|  | @ -36,14 +36,21 @@ GET_INFO() { | ||||||
| 		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/')" | ||||||
| 		[[ -n ${x86_Test} ]] && break | 		[[ -n ${x86_Test} ]] && break | ||||||
| 		x86_Test="$(egrep -o "CONFIG_TARGET.*Generic=y" .config | sed -r 's/CONFIG_TARGET_(.*)_Generic=y/\1/')" | 		x86_Test="$(egrep -o "CONFIG_TARGET.*Generic=y" .config | sed -r 's/CONFIG_TARGET_(.*)_Generic=y/\1/')" | ||||||
| 		[[ -z ${x86_Test} ]] && TIME "[ERROR] Can not obtain the TARGET_PROFILE !" && exit 1 | 		[[ -z ${x86_Test} ]] && TIME "[ERROR] Can not obtain the TARGET_PROFILE,please check!" && exit 1 | ||||||
| 	done | 	done | ||||||
| 	[[ ${x86_Test} == x86_64 ]] && { | 	[[ ${x86_Test} == x86_64 ]] && { | ||||||
| 		TARGET_PROFILE=x86_64 | 		TARGET_PROFILE=x86_64 | ||||||
| 	} || { | 	} || { | ||||||
| 		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/')" | ||||||
| 	} | 	} | ||||||
| 	[[ -z ${TARGET_PROFILE} ]] && TARGET_PROFILE="${Default_Device}" | 	[[ -z ${TARGET_PROFILE} ]] && { | ||||||
|  | 		if [[ -n ${Default_TARGET_PROFILE} && ${Default_TARGET_PROFILE} != auto ]];then | ||||||
|  | 			TARGET_PROFILE="${Default_TARGET_PROFILE}" | ||||||
|  | 		else | ||||||
|  | 			TIME "[ERROR] Can not obtain the TARGET_PROFILE,please check!" | ||||||
|  | 			exit 1 | ||||||
|  | 		fi | ||||||
|  | 	} | ||||||
| 	[[ ${TARGET_PROFILE} == x86_64 ]] && { | 	[[ ${TARGET_PROFILE} == x86_64 ]] && { | ||||||
| 		[[ $(cat ${Home}/.config) =~ CONFIG_TARGET_IMAGES_GZIP=y ]] && Firmware_Type=img.gz || Firmware_Type=img  | 		[[ $(cat ${Home}/.config) =~ CONFIG_TARGET_IMAGES_GZIP=y ]] && Firmware_Type=img.gz || Firmware_Type=img  | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue