add loongarch cpu support

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
This commit is contained in:
xiaoqiang zhao 2023-12-25 23:19:41 +08:00
parent ccd5d9f526
commit 1a0b5bc054

View file

@ -2206,6 +2206,10 @@ get_cpu() {
[[ -z "$cpu" ]] && cpu="$(awk -F':' '/family/ {printf $2; exit}' "$cpu_file")"
;;
"loongarch"*)
cpu="$(awk -F':' '/Model Name/ {print $2; exit}' "$cpu_file")"
;;
*)
cpu="$(awk -F '\\s*: | @' \
'/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {