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