Fix first time usage of load_hisilicon

When fw_env does not contain `sensor`$SNS_TYPE will always be ar0130 thus `insert_sns` never executes intended code for actually detected sensor.
pull/223/head
TheChatty 2022-05-13 23:04:33 +02:00 committed by GitHub
parent 0dbeaa8fe8
commit 8bc95dafcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -408,8 +408,8 @@ else
logger -s -p daemon.info -t hisilicon "Get data from environment and set SENSOR as ${SENSOR}"
else
insert_detect
SENSOR_DETECT=$(ipcinfo --short-sensor)
export SENSOR=${SENSOR_DETECT:=unknown}
SNS_TYPE=$(ipcinfo --short-sensor)
export SENSOR=${SNS_TYPE:=unknown}
remove_detect
logger -s -p daemon.info -t hisilicon "Get data from ipcinfo and set SENSOR as ${SENSOR}"
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t hisilicon "Write detected ${SENSOR} to U-Boot ENV"