Commit 7e2aaa23 authored by fuyanbin's avatar fuyanbin
Browse files

读取固件获取rockchip 芯片信息

parent 607e77ca
Pipeline #55414 passed with stages
in 2 minutes and 44 seconds
...@@ -360,71 +360,9 @@ __pack_super_img() { ...@@ -360,71 +360,9 @@ __pack_super_img() {
} }
__get_chip_from_parameter() { __get_chip_from_parameter() {
local parameter_file
local chip local chip
parameter_file="$1" chip=$(rkChipInfo "$IMAGE_FILE" | awk '{print $1}')
chip=$(grep "MACHINE:" "$parameter_file" | grep -i -P -o "rk\d+") printf "RK%s" "$chip"
if [[ -z "$chip" ]]
then
chip=$(grep "MACHINE_MODEL:" "$parameter_file" | grep -i -P -o "rk\d+")
fi
chip=${chip^^}
case $chip in
PX30 | RK3358)
parameter="RKPX30"
;;
RK1808 | RK3399PRO_NPU)
parameter="RK180A"
;;
RK3036)
parameter="RK303A"
;;
RK3126 | RK3128)
parameter="RK312A"
;;
RK3128H)
parameter="RK312X"
;;
RK3229)
parameter="RK3229"
;;
RK3288)
parameter="RK320A"
;;
RK3308)
parameter="RK3308"
;;
RK3326)
parameter="RK3326"
;;
RK3318)
parameter="RK322H"
;;
RK3328)
parameter="RK322H"
;;
RK3399)
parameter="RK330C"
;;
RK3568)
parameter="RK3568"
;;
RK3566)
parameter="RK3568"
;;
RK3562)
parameter="RK3562"
;;
RK3588)
parameter="RK3588"
;;
RV1126)
parameter="RK1126"
;;
*)
echo "Bad MACHINE_MODEL: $chip in parameter.txt"
esac
printf "%s" "$parameter"
} }
__is_sparse_system() { __is_sparse_system() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment