mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-22 05:27:24 +00:00
fix scripts for various v2 issues
This commit is contained in:
parent
a8ee51122a
commit
555042c6b4
@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
#On the V2, for some reason iCamera runs "sh -c iwlist wlan0 scan | grep 'ESSID:"<your wifi ssid>"' every 5 seconds.
|
||||
#Let's fake the output to reduce load
|
||||
#Let's fake the output, and increase put some sleep in to increase the "scan" times to every xx seconds to reduce load
|
||||
|
||||
ssid=$(cat /tmp/wpa_supplicant.conf | grep "ssid=\"" | cut -d'"' -f 2)
|
||||
|
||||
echo -e " ESSID:\""$ssid"\"\n"
|
||||
|
||||
sleep 30
|
||||
sleep 60
|
||||
|
||||
exit 0
|
||||
|
@ -23,11 +23,9 @@ set -x
|
||||
|
||||
#test for v2
|
||||
mount -t jffs2 /dev/mtdblock9 /params
|
||||
|
||||
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
||||
V2="true"
|
||||
fi
|
||||
umount /params
|
||||
|
||||
mount --bind /opt/wz_mini/bin/busybox /bin/busybox
|
||||
|
||||
|
@ -12,9 +12,13 @@ echo "PID $$"
|
||||
echo "mount kernel modules"
|
||||
mount --bind /opt/wz_mini/lib/modules /lib/modules
|
||||
|
||||
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
||||
V2="true"
|
||||
fi
|
||||
|
||||
if [[ $(cat /opt/wz_mini/run_mmc.sh | grep "RTSP_HI_RES_ENABLED\=") == "RTSP_HI_RES_ENABLED\=\"true\"" ]] || [[ $(cat /opt/wz_mini/run_mmc.sh | grep "RTSP_LOW_RES_ENABLED\=") == "RTSP_LOW_RES_ENABLED\=\"true\"" ]] && ! [[ -e /tmp/dbgflag ]]; then
|
||||
if [[ $(cat /opt/wz_mini/run_mmc.sh | grep "RTSP_LOW_RES_ENABLED\=") == "RTSP_LOW_RES_ENABLED\=\"true\"" ]] && [[ $(cat /opt/wz_mini/run_mmc.sh | grep "RTSP_HI_RES_ENABLED\=") == "RTSP_HI_RES_ENABLED\=\"true\"" ]]; then
|
||||
if [[ -d /etc/hotplug ]]; then
|
||||
if [[ "$V2" == "true"]]; then
|
||||
echo "load video loopback driver at video6 video7"
|
||||
insmod /opt/wz_mini/lib/modules/3.10.14_v2/kernel/v4l2loopback_V2.ko video_nr=6,7
|
||||
else
|
||||
@ -22,7 +26,7 @@ if [[ $(cat /opt/wz_mini/run_mmc.sh | grep "RTSP_HI_RES_ENABLED\=") == "RTSP_HI_
|
||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/v4l2loopback.ko video_nr=1,2
|
||||
fi
|
||||
elif [[ $(cat /opt/wz_mini/run_mmc.sh | grep "RTSP_LOW_RES_ENABLED\=") == "RTSP_LOW_RES_ENABLED\=\"true\"" ]]; then
|
||||
if [[ -d /etc/hotplug ]]; then
|
||||
if [[ "$V2" == "true"]]; then
|
||||
echo "load video loopback driver at video7"
|
||||
insmod /opt/wz_mini/lib/modules/3.10.14_v2/kernel/v4l2loopback_V2.ko video_nr=7
|
||||
else
|
||||
@ -30,7 +34,7 @@ if [[ $(cat /opt/wz_mini/run_mmc.sh | grep "RTSP_HI_RES_ENABLED\=") == "RTSP_HI_
|
||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/v4l2loopback.ko video_nr=2
|
||||
fi
|
||||
elif [[ $(cat /opt/wz_mini/run_mmc.sh | grep "RTSP_HI_RES_ENABLED\=") == "RTSP_HI_RES_ENABLED\=\"true\"" ]]; then
|
||||
if [[ -d /etc/hotplug ]]; then
|
||||
if [[ "$V2" == "true"]]; then
|
||||
echo "load video loopback driver at video6"
|
||||
insmod /opt/wz_mini/lib/modules/3.10.14_v2/kernel/v4l2loopback_V2.ko video_nr=6
|
||||
else
|
||||
|
@ -6,4 +6,7 @@ echo "inject callback library and run"
|
||||
|
||||
export LD_LIBRARY_PATH='/thirdlib:/system/lib:/opt/wz_mini/lib'
|
||||
|
||||
LD_PRELOAD='libcallback.so:libtinyalsa.so.2.0.0:libsetunbuf.so' /opt/wz_mini/tmp/.storage/iCamera
|
||||
#libcallback has setunbuf built-in
|
||||
#LD_PRELOAD='libcallback.so:libtinyalsa.so.2.0.0:libsetunbuf.so' /opt/wz_mini/tmp/.storage/iCamera
|
||||
|
||||
LD_PRELOAD='libcallback.so:libtinyalsa.so.2.0.0' /opt/wz_mini/tmp/.storage/iCamera
|
||||
|
@ -17,8 +17,7 @@ set -x
|
||||
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
||||
while [ ! -f /tmp/Upgrade/upgraderun.sh ]
|
||||
do
|
||||
sed -i '/pgrep/,+4d' /tmp/Upgrade/upgraderun.sh
|
||||
find /tmp/Upgrade > /opt/upgrade_find.log &
|
||||
# sed -i '/pgrep/,+4d' /tmp/Upgrade/upgraderun.sh
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
@ -55,7 +54,7 @@ set -x
|
||||
sed -i '/wc -c $KERNEL/,+14d' $upgrade_path
|
||||
#mv /tmp/Upgrade/upgraderun.sh /tmp/Upgrade/run_upg.sh
|
||||
#sh /tmp/Upgrade/run_upg.sh
|
||||
/tmp/Upgrade/system_upgrade.sh
|
||||
#/tmp/Upgrade/system_upgrade.sh
|
||||
else
|
||||
|
||||
if [[ -e /tmp/Upgrade/app ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user