mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			Respect enforced SoC. (#582)
							parent
							
								
									91df33f194
								
							
						
					
					
						commit
						a2e2e7b343
					
				|  | @ -3,7 +3,7 @@ | ||||||
| # OpenIPC.org | v.20221118 | # OpenIPC.org | v.20221118 | ||||||
| # | # | ||||||
| 
 | 
 | ||||||
| scr_version=1.0.15 | scr_version=1.0.16 | ||||||
| 
 | 
 | ||||||
| args=" $@" | args=" $@" | ||||||
| 
 | 
 | ||||||
|  | @ -40,14 +40,16 @@ do_update_kernel() { | ||||||
| 	echo_c 33 "\nKernel" | 	echo_c 33 "\nKernel" | ||||||
| 	echo "Update kernel from $x" | 	echo "Update kernel from $x" | ||||||
| 	[ ! -f "$x" ] && die "File $x not found" | 	[ ! -f "$x" ] && die "File $x not found" | ||||||
| 	local ksoc=$(od -j 32 -N 32 -S 1 -A n "$x" | cut -d- -f3) |   if [ "1" != "$skip_soc" ]; then | ||||||
| 	# FIXME: Ingenic kernels do not include proper SoC identifiers. | 		local ksoc=$(od -j 32 -N 32 -S 1 -A n "$x" | cut -d- -f3) | ||||||
| 	case "$soc" in | 		# FIXME: Ingenic kernels do not include proper SoC identifiers. | ||||||
| 	t31) [ "t" != "$ksoc" ] && die "Wrong SoC!" ;; | 		case "$soc" in | ||||||
| 	t21) [ "" != "$ksoc" ] && die "Wrong SoC!" ;; | 		t31) [ "t" != "$ksoc" ] && die "Wrong SoC!" ;; | ||||||
| 	*) check_soc "$ksoc" | 		t21) [ "" != "$ksoc" ] && die "Wrong SoC!" ;; | ||||||
| 	esac | 		*) check_soc "$ksoc" | ||||||
| 	compare_versions "$kernel_version" "$(get_kernel_version "$x")" && return 0 | 		esac | ||||||
|  | 		compare_versions "$kernel_version" "$(get_kernel_version "$x")" && return 0 | ||||||
|  | 	fi | ||||||
| 	flashcp -v "$x" "$kernel_device" | 	flashcp -v "$x" "$kernel_device" | ||||||
| 	echo_c 32 "Kernel updated to $(get_kernel_version "$kernel_device")" | 	echo_c 32 "Kernel updated to $(get_kernel_version "$kernel_device")" | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue