Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion general/package/goke-osdrv-gk7205v200/files/script/load_goke
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,16 @@ if [ $# -lt 1 ]; then
fi

if [ $b_arg_insmod -eq 1 ]; then
# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t goke "SENSOR: ${SENSOR}"
else
Expand All @@ -467,7 +477,15 @@ if [ $b_arg_insmod -eq 1 ]; then
export SENSOR=${SENSOR_DETECT:=unknown}
remove_detect
logger -s -p daemon.info -t goke "Get data from ipcinfo and set SENSOR as ${SENSOR}"
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t goke "Writing ${SENSOR} to U-Boot ENV"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t goke "Writing ${SENSOR} to U-Boot ENV"
Comment thread
openipc-ai marked this conversation as resolved.
fi
fi
fi
fi
Expand Down
20 changes: 19 additions & 1 deletion general/package/goke-osdrv-gk7205v500/files/script/load_goke
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,16 @@ if [ $# -lt 1 ]; then
fi

if [ $b_arg_insmod -eq 1 ]; then
# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t goke "SENSOR: ${SENSOR}"
else
Expand All @@ -279,7 +289,15 @@ if [ $b_arg_insmod -eq 1 ]; then
export SENSOR=${SENSOR_DETECT:=unknown}
remove_detect
logger -s -p daemon.info -t goke "Get data from ipcinfo and set SENSOR as ${SENSOR}"
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t goke "Writing ${SENSOR} to U-Boot ENV"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t goke "Writing ${SENSOR} to U-Boot ENV"
fi
Comment thread
openipc-ai marked this conversation as resolved.
fi
fi
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ if [ "$chipid" != "8136" ] && [ "$chipid" != "8135" ]; then
exit
fi

# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t grainmedia "Manualy set SENSOR as ${SENSOR}"
else
Expand All @@ -32,7 +42,15 @@ else
SENSOR_DETECT=$(ipcinfo --short-sensor)
export SENSOR=${SENSOR_DETECT:=unknown}
logger -s -p daemon.info -t grainmedia "Get data from ipcinfo and set SENSOR as ${SENSOR}"
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t grainmedia "Write detected ${SENSOR} to U-Boot ENV"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t grainmedia "Write detected ${SENSOR} to U-Boot ENV"
fi
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,16 @@ fi
# SENSOR=${SENSOR:=imx307}
#

# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t hisilicon "Manualy set SENSOR as ${SENSOR}"
else
Expand All @@ -466,7 +476,15 @@ else
export SENSOR=${SENSOR_DETECT:=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"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t hisilicon "Write detected ${SENSOR} to U-Boot ENV"
fi
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,16 @@ calc_mmz_info
# Sensor config
# SENSOR=${SENSOR:=imx307}
#
# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t hisilicon "Manualy set SENSOR as ${SENSOR}"
else
Expand All @@ -449,7 +459,15 @@ else
export SENSOR=${SENSOR_DETECT:=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"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t hisilicon "Write detected ${SENSOR} to U-Boot ENV"
fi
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,16 @@ fi
# SENSOR=${SENSOR:=imx307}
#

# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t hisilicon "Manualy set SENSOR as ${SENSOR}"
else
Expand All @@ -503,7 +513,15 @@ else
export SENSOR=${SENSOR_DETECT:=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"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t hisilicon "Write detected ${SENSOR} to U-Boot ENV"
fi
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,16 @@ fi
# Sensor config
# SENSOR=${SENSOR:=imx307}
#
# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t hisilicon "Manualy set SENSOR as ${SENSOR}"
else
Expand All @@ -594,7 +604,15 @@ else
export SENSOR=${SENSOR_DETECT:=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"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t hisilicon "Write detected ${SENSOR} to U-Boot ENV"
fi
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,16 @@ fi
# Sensor config
# SENSOR=${SENSOR:=imx307}
#
# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t hisilicon "Manualy set SENSOR as ${SENSOR}"
else
Expand All @@ -407,7 +417,15 @@ else
export SENSOR=${SENSOR_DETECT:=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"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t hisilicon "Write detected ${SENSOR} to U-Boot ENV"
fi
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,16 @@ fi

calc_mmz_info

# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t hisilicon "Manualy set SENSOR as ${SENSOR}"
else
Expand All @@ -362,7 +372,15 @@ else
export SENSOR=${SENSOR_DETECT:=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"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t hisilicon "Write detected ${SENSOR} to U-Boot ENV"
fi
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,16 @@ fi
# Sensor config
# SENSOR=${SENSOR:=imx307}
#
# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t hisilicon "Manualy set SENSOR as ${SENSOR}"
else
Expand All @@ -407,7 +417,15 @@ else
export SENSOR=${SENSOR_DETECT:=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"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t hisilicon "Write detected ${SENSOR} to U-Boot ENV"
fi
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,16 @@ fi

calc_mmz_info

# A failed probe used to be stored as sensor=unknown, and rcS exports the
# stored value into SENSOR before this ever runs -- so an already-latched
# camera arrives here with SENSOR=unknown, takes the "set manually" branch
# below, and never probes again however the real fault is fixed. Treat it
# as unset and drop it from the environment so this boot re-detects. #2428.
if [ "$SENSOR" = "unknown" ]; then
SENSOR=
fw_setenv sensor
fi

if [ -n "$SENSOR" ]; then
logger -s -p daemon.info -t hisilicon "Manualy set SENSOR as ${SENSOR}"
else
Expand All @@ -362,7 +372,15 @@ else
export SENSOR=${SENSOR_DETECT:=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"
# Do not persist a failed detection. The fw_printenv branch above wins
# whenever `sensor` exists, so writing "unknown" here latches the camera
# into "SENSOR is not detected, aborting..." for good -- detection never
# runs again and nothing says why. Seen on a GK7202V500 in #2428.
# load_ingenic has always cleared the variable instead of storing the
# miss; this is the same behaviour, reached by not writing at all.
if [ "$SENSOR" != "unknown" ]; then
fw_setenv sensor $SENSOR && logger -s -p daemon.info -t hisilicon "Write detected ${SENSOR} to U-Boot ENV"
fi
fi
fi

Expand Down
Loading
Loading