mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-22 05:27:24 +00:00
change camera model detection
This commit is contained in:
parent
1082f675fd
commit
7d43095b72
@ -10,8 +10,7 @@ Using this project can potentially expose your device to the open internet depen
|
|||||||
|
|
||||||
## Related Projects:
|
## Related Projects:
|
||||||
* wz_mini_debian: run full debian in a chroot, on the camera! (coming soon)
|
* wz_mini_debian: run full debian in a chroot, on the camera! (coming soon)
|
||||||
|
* ~~wz_mini_utils: various statically compiled binaries for use with the camera (mipsel)~~ (deprecated, all utils now located in wz_mini/bin)
|
||||||
~~* wz_mini_utils: various statically compiled binaries for use with the camera (mipsel)~~ (deprecated, all utils now located in wz_mini/bin)
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@ -382,6 +381,7 @@ NOTE: if you are upgrading a V2 camera from a release older than 06-16-22, you m
|
|||||||
|
|
||||||
## Latest Updates
|
## Latest Updates
|
||||||
|
|
||||||
|
* 06-16-22: Simplified the camera model detection method throughout wz_mini.
|
||||||
* 06-16-22: fix scp client bug, allow user modifications to app_init, updated initramfs script, moved upgrade-run to PATH, revised kernel module paths, added ENABLE_RTL8189FS_DRIVER option for v2/v3, updated kernels for v2/v3. ( NOTE: this is a major upgrade, file names for the init scripts have changed, if you are upgrading the V2, do not use the upgrade-run.sh script )
|
* 06-16-22: fix scp client bug, allow user modifications to app_init, updated initramfs script, moved upgrade-run to PATH, revised kernel module paths, added ENABLE_RTL8189FS_DRIVER option for v2/v3, updated kernels for v2/v3. ( NOTE: this is a major upgrade, file names for the init scripts have changed, if you are upgrading the V2, do not use the upgrade-run.sh script )
|
||||||
* 06-14-22: Updated v4l2rtspserver, fixes to prevent rare low memory situations and RTSP server crashes, fixed intermittant failed RTSP HD stream, script logic updates.
|
* 06-14-22: Updated v4l2rtspserver, fixes to prevent rare low memory situations and RTSP server crashes, fixed intermittant failed RTSP HD stream, script logic updates.
|
||||||
* 06-12-22: Added additional audio variables for tuning in libcallback, various bug fixes in wz_user. Added `gather_wz_logs.sh` script for users to share debug logs.
|
* 06-12-22: Added additional audio variables for tuning in libcallback, various bug fixes in wz_user. Added `gather_wz_logs.sh` script for users to share debug logs.
|
||||||
|
@ -71,44 +71,26 @@ export WZMINI_CFG=/opt/wz_mini/wz_mini.conf
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
#WCV3 AUDIO GPIO
|
#Set the correct GPIO for the audio driver (T31 only)
|
||||||
GPIO=63
|
if [ -f /opt/wz_mini/tmp/.HL_PAN2 ]; then
|
||||||
V2="false"
|
GPIO=7
|
||||||
|
elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
|
||||||
|
GPIO=63
|
||||||
|
fi
|
||||||
|
|
||||||
#Check model, change GPIO is HL_PAN2
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
if [[ "$V2" == "false" ]]; then
|
insmod /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/lib/modules/3.10.14/extra/audio.ko
|
||||||
mount -t jffs2 /dev/mtdblock6 /configs
|
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/usr/share/audio/upgrade_mode_v2.wav $AUDIO_PROMPT_VOLUME
|
||||||
if [[ $(cat /configs/.product_config | grep PRODUCT_MODEL) == "PRODUCT_MODEL=HL_PAN2" ]]; then
|
rmmod audio
|
||||||
umount /configs
|
|
||||||
GPIO=7
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "not HL_PAN2"
|
insmod /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
||||||
|
/opt/wz_mini/bin/audioplay_t31 /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/usr/share/audio/upgrade_mode.wav $AUDIO_PROMPT_VOLUME
|
||||||
|
rmmod audio
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#test for v2
|
|
||||||
if [ -b /dev/mtdblock9 ]; then
|
|
||||||
mount -t jffs2 /dev/mtdblock9 /params
|
|
||||||
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
|
||||||
V2="true"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [[ "$V2" == "true" ]]; then
|
|
||||||
insmod /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/lib/modules/3.10.14/extra/audio.ko
|
|
||||||
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/usr/share/audio/upgrade_mode_v2.wav $AUDIO_PROMPT_VOLUME
|
|
||||||
rmmod audio
|
|
||||||
else
|
|
||||||
insmod /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
|
||||||
/opt/wz_mini/bin/audioplay_t31 /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/usr/share/audio/upgrade_mode.wav $AUDIO_PROMPT_VOLUME
|
|
||||||
rmmod audio
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo UPGRADE MODE
|
echo UPGRADE MODE
|
||||||
|
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "Upgrading kernel"
|
echo "Upgrading kernel"
|
||||||
flashcp -v /opt/Upgrade/wz_mini_hacks-master/v2_install/v2_kernel.bin /dev/mtd1
|
flashcp -v /opt/Upgrade/wz_mini_hacks-master/v2_install/v2_kernel.bin /dev/mtd1
|
||||||
fi
|
fi
|
||||||
|
@ -21,22 +21,7 @@ set -x
|
|||||||
echo "welcome to wz_cam.sh"
|
echo "welcome to wz_cam.sh"
|
||||||
echo "PID $$"
|
echo "PID $$"
|
||||||
|
|
||||||
#test for v2
|
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
||||||
v2_test() {
|
|
||||||
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
|
||||||
V2="true"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if mountpoint -q /params; then
|
|
||||||
echo "params already mounted"
|
|
||||||
v2_test
|
|
||||||
else
|
|
||||||
mount -t jffs2 /dev/mtdblock9 /params
|
|
||||||
v2_test
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$V2" == "false" ]; then
|
|
||||||
|
|
||||||
cp /opt/wz_mini/etc/uvc.config /opt/wz_mini/usr/bin/uvc.config
|
cp /opt/wz_mini/etc/uvc.config /opt/wz_mini/usr/bin/uvc.config
|
||||||
|
|
||||||
|
@ -36,40 +36,59 @@ echo '
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
#WCV3 AUDIO GPIO
|
|
||||||
GPIO=63
|
|
||||||
V2="false"
|
|
||||||
|
|
||||||
#replace stock busybox
|
#replace stock busybox
|
||||||
mount --bind /opt/wz_mini/bin/busybox /bin/busybox
|
mount --bind /opt/wz_mini/bin/busybox /bin/busybox
|
||||||
|
|
||||||
#test for v2
|
echo "replace stock fstab"
|
||||||
|
mount --bind /opt/wz_mini/etc/fstab /etc/fstab
|
||||||
|
|
||||||
|
echo "mount workplace dir"
|
||||||
|
mount -t tmpfs /opt/wz_mini/tmp
|
||||||
|
|
||||||
|
echo "install busybox applets"
|
||||||
|
mkdir /opt/wz_mini/tmp/.bin
|
||||||
|
/opt/wz_mini/bin/busybox --install -s /opt/wz_mini/tmp/.bin
|
||||||
|
|
||||||
|
##DETECT CAMERA MODEL & PLATFORM TYPE
|
||||||
|
#V2=WYZEC1-JZ
|
||||||
|
#PANv1=WYZECP1_JEF
|
||||||
|
#PANv2=HL_PAN2
|
||||||
|
#V3=WYZE_CAKP2JFUS
|
||||||
|
#DB3=WYZEDB3
|
||||||
|
|
||||||
|
#mtdblock9 only exists on the T20 platform, indicating V2 or PANv1
|
||||||
if [ -b /dev/mtdblock9 ]; then
|
if [ -b /dev/mtdblock9 ]; then
|
||||||
mount -t jffs2 /dev/mtdblock9 /params
|
mkdir /opt/wz_mini/tmp/params
|
||||||
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
mount -t jffs2 /dev/mtdblock9 /opt/wz_mini/tmp/params
|
||||||
V2="true"
|
touch /opt/wz_mini/tmp/.$(cat /opt/wz_mini/tmp/params/config/.product_config | grep PRODUCT_MODEL | sed -e 's#.*=\(\)#\1#')
|
||||||
fi
|
touch /opt/wz_mini/tmp/.T20
|
||||||
|
umount /opt/wz_mini/tmp/params
|
||||||
|
rm -rf /opt/wz_mini/tmp/params
|
||||||
|
elif [ -b /dev/mtdblock6 ]; then
|
||||||
|
mkdir /opt/wz_mini/tmp/configs
|
||||||
|
mount -t jffs2 /dev/mtdblock6 /opt/wz_mini/tmp/configs
|
||||||
|
touch /opt/wz_mini/tmp/.$(cat /opt/wz_mini/tmp/configs/.product_config | grep PRODUCT_MODEL | sed -e 's#.*=\(\)#\1#')
|
||||||
|
touch /opt/wz_mini/tmp/.T31
|
||||||
|
umount /opt/wz_mini/tmp/configs
|
||||||
|
rm -rf /opt/wz_mini/tmp/configs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Check model, change GPIO is HL_PAN2
|
#Set the correct GPIO for the audio driver (T31 only)
|
||||||
if [[ "$V2" == "false" ]]; then
|
if [ -f /opt/wz_mini/tmp/.HL_PAN2 ]; then
|
||||||
mount -t jffs2 /dev/mtdblock6 /configs
|
GPIO=7
|
||||||
if [[ $(cat /configs/.product_config | grep PRODUCT_MODEL) == "PRODUCT_MODEL=HL_PAN2" ]]; then
|
elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
|
||||||
umount /configs
|
GPIO=63
|
||||||
GPIO=7
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "not HL_PAN2"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -e /opt/wz_mini/etc/.first_boot ]]; then
|
if [ -e /opt/wz_mini/etc/.first_boot ]; then
|
||||||
echo "first boot already completed"
|
echo "first boot already completed"
|
||||||
else
|
else
|
||||||
echo "first boot, initializing"
|
echo "first boot, initializing"
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/extra/audio.ko
|
#May need different gpio for PANv1
|
||||||
|
#We don't rmmod this module, as it is marked [permanent] by the kernel on T20
|
||||||
|
insmod /opt/wz_mini/lib/modules/3.10.14/extra/audio.ko sign_mode=0
|
||||||
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/init_v2.wav $AUDIO_PROMPT_VOLUME
|
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/init_v2.wav $AUDIO_PROMPT_VOLUME
|
||||||
rmmod audio
|
|
||||||
else
|
else
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
||||||
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/init.wav $AUDIO_PROMPT_VOLUME
|
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/init.wav $AUDIO_PROMPT_VOLUME
|
||||||
@ -88,25 +107,13 @@ echo "mounting tmpfs"
|
|||||||
mount -t tmpfs /tmp
|
mount -t tmpfs /tmp
|
||||||
|
|
||||||
echo "mount system to replace factorycheck with dummy, to prevent bind unmount"
|
echo "mount system to replace factorycheck with dummy, to prevent bind unmount"
|
||||||
if [[ ! "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
||||||
mount /dev/mtdblock3 /system
|
mount /dev/mtdblock3 /system
|
||||||
mount --bind /opt/wz_mini/bin/factorycheck /system/bin/factorycheck
|
mount --bind /opt/wz_mini/bin/factorycheck /system/bin/factorycheck
|
||||||
else
|
|
||||||
echo "v2 doesn't need factorycheck"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /tmp/usrflag
|
touch /tmp/usrflag
|
||||||
|
|
||||||
echo "replace stock fstab"
|
|
||||||
mount --bind /opt/wz_mini/etc/fstab /etc/fstab
|
|
||||||
|
|
||||||
echo "mount workplace dir"
|
|
||||||
mount -t tmpfs /opt/wz_mini/tmp
|
|
||||||
|
|
||||||
echo "install busybox applets"
|
|
||||||
mkdir /opt/wz_mini/tmp/.bin
|
|
||||||
/opt/wz_mini/bin/busybox --install -s /opt/wz_mini/tmp/.bin
|
|
||||||
|
|
||||||
echo "create workspace directory"
|
echo "create workspace directory"
|
||||||
mkdir /opt/wz_mini/tmp/.storage
|
mkdir /opt/wz_mini/tmp/.storage
|
||||||
|
|
||||||
@ -124,7 +131,7 @@ sed -i '/system\/\lib/s/$/:\/opt\/wz_mini\/lib/' /opt/wz_mini/tmp/.storage/rcS
|
|||||||
#sed -i '/^# Run init script.*/i#Hook Library PATH here\nexport LD_LIBRARY_PATH=/tmp/test/lib:$LD_LIBRARY_PATH\n' /opt/wz_mini/tmp/.storage/rcS
|
#sed -i '/^# Run init script.*/i#Hook Library PATH here\nexport LD_LIBRARY_PATH=/tmp/test/lib:$LD_LIBRARY_PATH\n' /opt/wz_mini/tmp/.storage/rcS
|
||||||
#sed -i '/^# Run init script.*/i#Hook system PATH here\nexport PATH=/tmp/test/bin:$PATH\n' /opt/wz_mini/tmp/.storage/rcS
|
#sed -i '/^# Run init script.*/i#Hook system PATH here\nexport PATH=/tmp/test/bin:$PATH\n' /opt/wz_mini/tmp/.storage/rcS
|
||||||
|
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
mount -t jffs2 /dev/mtdblock4 /system
|
mount -t jffs2 /dev/mtdblock4 /system
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -147,10 +154,8 @@ mount --bind /opt/wz_mini/tmp/.storage/shadow /etc/shadow
|
|||||||
chmod 400 /etc/shadow
|
chmod 400 /etc/shadow
|
||||||
|
|
||||||
if [[ -e /opt/wz_mini/swap.gz ]]; then
|
if [[ -e /opt/wz_mini/swap.gz ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/extra/audio.ko
|
|
||||||
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/swap_v2.wav $AUDIO_PROMPT_VOLUME
|
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/swap_v2.wav $AUDIO_PROMPT_VOLUME
|
||||||
rmmod audio
|
|
||||||
else
|
else
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
||||||
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/swap.wav $AUDIO_PROMPT_VOLUME
|
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/swap.wav $AUDIO_PROMPT_VOLUME
|
||||||
@ -161,10 +166,10 @@ if [[ -e /opt/wz_mini/swap.gz ]]; then
|
|||||||
mkswap /opt/wz_mini/swap
|
mkswap /opt/wz_mini/swap
|
||||||
sync;echo 3 > /proc/sys/vm/drop_caches
|
sync;echo 3 > /proc/sys/vm/drop_caches
|
||||||
else
|
else
|
||||||
echo "swap archive not present, not extracting"
|
echo "swap archive missing, not extracting"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d /opt/wz_mini/usr/share/terminfo ]]; then
|
if [ -d /opt/wz_mini/usr/share/terminfo ]; then
|
||||||
echo "terminfo already present"
|
echo "terminfo already present"
|
||||||
else
|
else
|
||||||
echo "terminfo not present, extract"
|
echo "terminfo not present, extract"
|
||||||
|
@ -16,7 +16,7 @@ exec 1> $LOG_NAME.log 2>&1
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
if [[ -e /tmp/dbgflag ]];then
|
if [ -e /tmp/dbgflag ];then
|
||||||
echo "debug mode, disabled"
|
echo "debug mode, disabled"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -40,20 +40,14 @@ if [ -d /lib/modules ]; then
|
|||||||
mount --bind /opt/wz_mini/lib/modules /lib/modules
|
mount --bind /opt/wz_mini/lib/modules /lib/modules
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /params/config/.product_config ]; then
|
|
||||||
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
|
||||||
V2="true"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
## REPLACE STOCK MODULES
|
## REPLACE STOCK MODULES
|
||||||
|
|
||||||
if [[ "$ENABLE_RTL8189FS_DRIVER" == "true" ]]; then
|
if [[ "$ENABLE_RTL8189FS_DRIVER" == "true" ]]; then
|
||||||
#V2/V3 ONLY
|
#V2/V3 ONLY [DB3 untested]
|
||||||
echo "Enable RTL8189FS"
|
echo "Enable RTL8189FS"
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
|
||||||
sed -i 's/\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
sed -i 's/\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
else
|
elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
|
||||||
sed -i 's/\/system\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
sed -i 's/\/system\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -62,7 +56,7 @@ fi
|
|||||||
|
|
||||||
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] && ! [[ -e /tmp/dbgflag ]]; then
|
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] && ! [[ -e /tmp/dbgflag ]]; then
|
||||||
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] && [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]] && [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "load video loopback driver at video6 video7"
|
echo "load video loopback driver at video6 video7"
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6,7
|
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6,7
|
||||||
else
|
else
|
||||||
@ -70,7 +64,7 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "tru
|
|||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=1,2
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=1,2
|
||||||
fi
|
fi
|
||||||
elif [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
elif [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "load video loopback driver at video7"
|
echo "load video loopback driver at video7"
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=7
|
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=7
|
||||||
else
|
else
|
||||||
@ -78,7 +72,7 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]] || [[ "$RTSP_LOW_RES_ENABLED" == "tru
|
|||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=2
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/v4l2loopback.ko video_nr=2
|
||||||
fi
|
fi
|
||||||
elif [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
elif [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "load video loopback driver at video6"
|
echo "load video loopback driver at video6"
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6
|
insmod /opt/wz_mini/lib/modules/3.10.14/extra/v4l2loopback_V2.ko video_nr=6
|
||||||
else
|
else
|
||||||
|
@ -33,7 +33,7 @@ hostname_set() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
first_run_check() {
|
first_run_check() {
|
||||||
if [[ -e /opt/wz_mini/tmp/.wz_user_firstrun ]]; then
|
if [ -e /opt/wz_mini/tmp/.wz_user_firstrun ]; then
|
||||||
echo "wz_user.sh already run once, exit."
|
echo "wz_user.sh already run once, exit."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -76,7 +76,7 @@ eth_wlan_up() {
|
|||||||
ifconfig wlan0 up
|
ifconfig wlan0 up
|
||||||
pkill udhcpc
|
pkill udhcpc
|
||||||
udhcpc -i wlan0 -x hostname:$HOSTNAME -p /var/run/udhcpc.pid -b
|
udhcpc -i wlan0 -x hostname:$HOSTNAME -p /var/run/udhcpc.pid -b
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /system/bin/wpa_cli
|
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /system/bin/wpa_cli
|
||||||
else
|
else
|
||||||
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
|
mount -o bind /opt/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
|
||||||
@ -86,7 +86,7 @@ eth_wlan_up() {
|
|||||||
|
|
||||||
wpa_check() {
|
wpa_check() {
|
||||||
#Check if wpa_supplicant has been created by iCamera
|
#Check if wpa_supplicant has been created by iCamera
|
||||||
if [[ -e /tmp/wpa_supplicant.conf ]]; then
|
if [ -e /tmp/wpa_supplicant.conf ]; then
|
||||||
echo "wpa_supplicant.conf ready"
|
echo "wpa_supplicant.conf ready"
|
||||||
wlanold_check $1
|
wlanold_check $1
|
||||||
else
|
else
|
||||||
@ -103,7 +103,7 @@ wpa_check() {
|
|||||||
|
|
||||||
wlanold_check() {
|
wlanold_check() {
|
||||||
#Have we renamed interfaces yet?
|
#Have we renamed interfaces yet?
|
||||||
if [[ -d /sys/class/net/wlanold ]]; then
|
if [ -d /sys/class/net/wlanold ]; then
|
||||||
echo "wlanold exist"
|
echo "wlanold exist"
|
||||||
eth_wlan_up
|
eth_wlan_up
|
||||||
else
|
else
|
||||||
@ -123,7 +123,7 @@ netloop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
swap_enable() {
|
swap_enable() {
|
||||||
if [[ -e /opt/wz_mini/swap ]]; then
|
if [ -e /opt/wz_mini/swap ]; then
|
||||||
echo "Swap file exists"
|
echo "Swap file exists"
|
||||||
if cat /proc/swaps | grep "mini" ; then
|
if cat /proc/swaps | grep "mini" ; then
|
||||||
echo "Swap is already enabled"
|
echo "Swap is already enabled"
|
||||||
@ -165,12 +165,11 @@ done
|
|||||||
first_run_check
|
first_run_check
|
||||||
wait_wlan
|
wait_wlan
|
||||||
|
|
||||||
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
#Set module dir depending on platform
|
||||||
V2="true"
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14"
|
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14"
|
||||||
else
|
else
|
||||||
V2="false"
|
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__"
|
||||||
KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
swap_enable
|
swap_enable
|
||||||
@ -193,8 +192,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ENABLE_IPTABLES" == "true" ]]; then
|
if [[ "$ENABLE_IPTABLES" == "true" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "v2 has iptables built in"
|
echo "T20 has iptables built in"
|
||||||
else
|
else
|
||||||
insmod /lib/modules/3.10.14__isvp_swan_1.0__/kernel/net/netfilter/x_tables.ko
|
insmod /lib/modules/3.10.14__isvp_swan_1.0__/kernel/net/netfilter/x_tables.ko
|
||||||
insmod /lib/modules/3.10.14__isvp_swan_1.0__/kernel/net/ipv4/netfilter/ip_tables.ko
|
insmod /lib/modules/3.10.14__isvp_swan_1.0__/kernel/net/ipv4/netfilter/ip_tables.ko
|
||||||
@ -236,7 +235,7 @@ if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
|
|||||||
|
|
||||||
HOST_MACADDR=$(echo "$HOSTNAME"|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
|
HOST_MACADDR=$(echo "$HOSTNAME"|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/')
|
||||||
|
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo connect > /sys/devices/platform/jz-dwc2/dwc2/udc/dwc2/soft_connect
|
echo connect > /sys/devices/platform/jz-dwc2/dwc2/udc/dwc2/soft_connect
|
||||||
sleep 1
|
sleep 1
|
||||||
devmem 0x10000040 32 0x0b800096
|
devmem 0x10000040 32 0x0b800096
|
||||||
@ -252,7 +251,7 @@ if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
|
|||||||
|
|
||||||
insmod $KMOD_PATH/kernel/drivers/usb/gadget/libcomposite.ko
|
insmod $KMOD_PATH/kernel/drivers/usb/gadget/libcomposite.ko
|
||||||
|
|
||||||
if [[ "$V2" == "false" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T31 ]; then
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/u_ether.ko
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/u_ether.ko
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/usb_f_ncm.ko
|
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/usb_f_ncm.ko
|
||||||
fi
|
fi
|
||||||
@ -341,7 +340,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ENABLE_EXT4" == "true" ]]; then
|
if [[ "$ENABLE_EXT4" == "true" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
insmod $KMOD_PATH/kernel/lib/crc16.ko
|
insmod $KMOD_PATH/kernel/lib/crc16.ko
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -370,8 +369,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ENABLE_MP4_WRITE" == "true" ]]; then
|
if [[ "$ENABLE_MP4_WRITE" == "true" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "mp4_write is not supported on v2"
|
echo "mp4_write is not supported on T20"
|
||||||
else
|
else
|
||||||
/opt/wz_mini/bin/cmd mp4write on
|
/opt/wz_mini/bin/cmd mp4write on
|
||||||
echo "mp4_write enabled"
|
echo "mp4_write enabled"
|
||||||
@ -382,7 +381,7 @@ fi
|
|||||||
|
|
||||||
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
||||||
|
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
HI_VIDEO_DEV="/dev/video6"
|
HI_VIDEO_DEV="/dev/video6"
|
||||||
else
|
else
|
||||||
HI_VIDEO_DEV="/dev/video1"
|
HI_VIDEO_DEV="/dev/video1"
|
||||||
@ -407,7 +406,7 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_ENC_PARAMETER" != "" ]]; then
|
if [[ "$RTSP_HI_RES_ENC_PARAMETER" != "" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
if [[ $RTSP_HI_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
||||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:0:4:$RTSP_HI_RES_ENC_PARAMETER" > /dev/null 2>&1 &
|
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:0:4:$RTSP_HI_RES_ENC_PARAMETER" > /dev/null 2>&1 &
|
||||||
sleep 5
|
sleep 5
|
||||||
@ -425,7 +424,7 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_MAX_BITRATE" != "" ]]; then
|
if [[ "$RTSP_HI_RES_MAX_BITRATE" != "" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:28:4:$RTSP_HI_RES_MAX_BITRATE" > /dev/null 2>&1 &
|
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:28:4:$RTSP_HI_RES_MAX_BITRATE" > /dev/null 2>&1 &
|
||||||
sleep 5
|
sleep 5
|
||||||
else
|
else
|
||||||
@ -435,8 +434,8 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_TARGET_BITRATE" != "" ]]; then
|
if [[ "$RTSP_HI_RES_TARGET_BITRATE" != "" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "not supported on v2"
|
echo "not supported on T20"
|
||||||
else
|
else
|
||||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:48:4:$RTSP_HI_RES_TARGET_BITRATE" > /dev/null 2>&1 &
|
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:48:4:$RTSP_HI_RES_TARGET_BITRATE" > /dev/null 2>&1 &
|
||||||
sleep 5
|
sleep 5
|
||||||
@ -444,7 +443,7 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_HI_RES_FPS" != "" ]]; then
|
if [[ "$RTSP_HI_RES_FPS" != "" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:8:4:$RTSP_HI_RES_FPS" > /dev/null 2>&1 &
|
watch -n30 -t "/system/bin/impdbg --enc_rc_s 0:8:4:$RTSP_HI_RES_FPS" > /dev/null 2>&1 &
|
||||||
sleep 5
|
sleep 5
|
||||||
else
|
else
|
||||||
@ -461,7 +460,7 @@ fi
|
|||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
||||||
|
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
LOW_VIDEO_DEV="/dev/video7"
|
LOW_VIDEO_DEV="/dev/video7"
|
||||||
else
|
else
|
||||||
LOW_VIDEO_DEV="/dev/video2"
|
LOW_VIDEO_DEV="/dev/video2"
|
||||||
@ -486,7 +485,7 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_ENC_PARAMETER" != "" ]]; then
|
if [[ "$RTSP_LOW_RES_ENC_PARAMETER" != "" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
if [[ $RTSP_LOW_RES_ENC_PARAMETER =~ "^[0|1|2|4|8]$" ]]; then
|
||||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:0:4:$RTSP_LOW_RES_ENC_PARAMETER" > /dev/null 2>&1 &
|
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:0:4:$RTSP_LOW_RES_ENC_PARAMETER" > /dev/null 2>&1 &
|
||||||
sleep 5
|
sleep 5
|
||||||
@ -503,7 +502,7 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_MAX_BITRATE" != "" ]]; then
|
if [[ "$RTSP_LOW_RES_MAX_BITRATE" != "" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:28:4:$RTSP_LOW_RES_MAX_BITRATE" > /dev/null 2>&1 &
|
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:28:4:$RTSP_LOW_RES_MAX_BITRATE" > /dev/null 2>&1 &
|
||||||
sleep 5
|
sleep 5
|
||||||
else
|
else
|
||||||
@ -512,15 +511,15 @@ if [[ "$RTSP_LOW_RES_ENABLED" == "true" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_TARGET_BITRATE" != "" ]]; then
|
if [[ "$RTSP_LOW_RES_TARGET_BITRATE" != "" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
echo "not supported on v2"
|
echo "not supported on T20"
|
||||||
else
|
else
|
||||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:48:4:$RTSP_LOW_RES_TARGET_BITRATE" > /dev/null 2>&1 &
|
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:48:4:$RTSP_LOW_RES_TARGET_BITRATE" > /dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$RTSP_LOW_RES_FPS" != "" ]]; then
|
if [[ "$RTSP_LOW_RES_FPS" != "" ]]; then
|
||||||
if [[ "$V2" == "true" ]]; then
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:8:4:$RTSP_LOW_RES_FPS" > /dev/null 2>&1 &
|
watch -n30 -t "/system/bin/impdbg --enc_rc_s 1:8:4:$RTSP_LOW_RES_FPS" > /dev/null 2>&1 &
|
||||||
sleep 5
|
sleep 5
|
||||||
else
|
else
|
||||||
@ -552,7 +551,7 @@ fi
|
|||||||
|
|
||||||
hostname_set
|
hostname_set
|
||||||
touch /opt/wz_mini/tmp/.wz_user_firstrun
|
touch /opt/wz_mini/tmp/.wz_user_firstrun
|
||||||
pkill -f dumpload #Kill dumpload so it won't waste cpu or ram gathering cores when something crashes
|
pkill -f dumpload #Kill dumpload so it won't waste cpu or ram gathering cores and uploading them when something crashes
|
||||||
sysctl -w kernel.core_pattern='|/bin/false'
|
sysctl -w kernel.core_pattern='|/bin/false'
|
||||||
dmesg_log
|
dmesg_log
|
||||||
trim_logs
|
trim_logs
|
||||||
|
@ -44,6 +44,9 @@ fi
|
|||||||
install_upgrade_script() {
|
install_upgrade_script() {
|
||||||
echo "Installing latest upgrade-script"
|
echo "Installing latest upgrade-script"
|
||||||
cp /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/bin/upgrade-run.sh /opt/wz_mini/bin/upgrade-run.sh
|
cp /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/bin/upgrade-run.sh /opt/wz_mini/bin/upgrade-run.sh
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
|
||||||
/opt/wz_mini/bin/upgrade-run.sh backup_begin
|
/opt/wz_mini/bin/upgrade-run.sh backup_begin
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,43 +71,30 @@ export WZMINI_CFG=/opt/wz_mini/wz_mini.conf
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
#WCV3 AUDIO GPIO
|
#Set the correct GPIO for the audio driver (T31 only)
|
||||||
GPIO=63
|
if [ -f /opt/wz_mini/tmp/.HL_PAN2 ]; then
|
||||||
V2="false"
|
GPIO=7
|
||||||
|
elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
|
||||||
|
GPIO=63
|
||||||
|
fi
|
||||||
|
|
||||||
#Check model, change GPIO is HL_PAN2
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
if [[ "$V2" == "false" ]]; then
|
insmod /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/lib/modules/3.10.14/extra/audio.ko
|
||||||
mount -t jffs2 /dev/mtdblock6 /configs
|
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/usr/share/audio/upgrade_mode_v2.wav $AUDIO_PROMPT_VOLUME
|
||||||
if [[ $(cat /configs/.product_config | grep PRODUCT_MODEL) == "PRODUCT_MODEL=HL_PAN2" ]]; then
|
rmmod audio
|
||||||
umount /configs
|
|
||||||
GPIO=7
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "not HL_PAN2"
|
insmod /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/extra/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
||||||
|
/opt/wz_mini/bin/audioplay_t31 /opt/Upgrade/wz_mini_hacks-master/SD_ROOT/wz_mini/usr/share/audio/upgrade_mode.wav $AUDIO_PROMPT_VOLUME
|
||||||
|
rmmod audio
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#test for v2
|
|
||||||
if [ -b /dev/mtdblock9 ]; then
|
|
||||||
mount -t jffs2 /dev/mtdblock9 /params
|
|
||||||
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
|
||||||
V2="true"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [[ "$V2" == "true" ]]; then
|
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14/kernel/audio.ko
|
|
||||||
LD_LIBRARY_PATH='/opt/wz_mini/lib' /opt/wz_mini/bin/audioplay_t20 /opt/wz_mini/usr/share/audio/upgrade_mode_v2.wav $AUDIO_PROMPT_VOLUME
|
|
||||||
rmmod audio
|
|
||||||
else
|
|
||||||
insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/audio.ko spk_gpio=$GPIO alc_mode=0 mic_gain=0
|
|
||||||
/opt/wz_mini/bin/audioplay_t31 /opt/wz_mini/usr/share/audio/upgrade_mode.wav $AUDIO_PROMPT_VOLUME
|
|
||||||
rmmod audio
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo UPGRADE MODE
|
echo UPGRADE MODE
|
||||||
|
|
||||||
|
if [ -f /opt/wz_mini/tmp/.T20 ]; then
|
||||||
|
echo "Upgrading kernel"
|
||||||
|
flashcp -v /opt/Upgrade/wz_mini_hacks-master/v2_install/v2_kernel.bin /dev/mtd1
|
||||||
|
fi
|
||||||
|
|
||||||
umount -l /opt/wz_mini/tmp
|
umount -l /opt/wz_mini/tmp
|
||||||
ls -l /opt/wz_mini/
|
ls -l /opt/wz_mini/
|
||||||
rm -rf /opt/wz_mini/*
|
rm -rf /opt/wz_mini/*
|
||||||
|
12
file.chk
12
file.chk
@ -1,10 +1,10 @@
|
|||||||
72349f3e54a44146d63dc775d37045b1 SD_ROOT/factory_t31_ZMC6tiIDQN
|
72349f3e54a44146d63dc775d37045b1 SD_ROOT/factory_t31_ZMC6tiIDQN
|
||||||
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/mnt/.gitignore
|
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/mnt/.gitignore
|
||||||
34c6a4c3a941ff2becd9f487826d7692 SD_ROOT/wz_mini/etc/uvc.config
|
34c6a4c3a941ff2becd9f487826d7692 SD_ROOT/wz_mini/etc/uvc.config
|
||||||
0ca440c725d13707e17f8bf4da6f02da SD_ROOT/wz_mini/etc/init.d/wz_cam.sh
|
ad7d1a2f9db3079617731b5854ce3b6a SD_ROOT/wz_mini/etc/init.d/wz_cam.sh
|
||||||
a96f3eb3c571e95490317e746a9d697f SD_ROOT/wz_mini/etc/init.d/wz_init.sh
|
0774518c06d6ef8e7181d35f194777cc SD_ROOT/wz_mini/etc/init.d/wz_init.sh
|
||||||
9d55cf0a4de134f12b2eb68f45efddd5 SD_ROOT/wz_mini/etc/init.d/wz_user.sh
|
f4e8ec1b1d69c3b5ba74c617ec7e73d0 SD_ROOT/wz_mini/etc/init.d/wz_user.sh
|
||||||
b346d78a55b0d30b161c15b8c55f8277 SD_ROOT/wz_mini/etc/init.d/wz_post.sh
|
48c4fd27a194459efda6e92b446f51a0 SD_ROOT/wz_mini/etc/init.d/wz_post.sh
|
||||||
e3034eac02d8eda9902ca9cf89f0a586 SD_ROOT/wz_mini/etc/inittab
|
e3034eac02d8eda9902ca9cf89f0a586 SD_ROOT/wz_mini/etc/inittab
|
||||||
840aa9c26726201f7cffbf001bee193a SD_ROOT/wz_mini/etc/uvc_jxf22.config
|
840aa9c26726201f7cffbf001bee193a SD_ROOT/wz_mini/etc/uvc_jxf22.config
|
||||||
2e2d5c1ebdcc16da6852e9cdd3ffc66c SD_ROOT/wz_mini/etc/wz_mini.conf.dist
|
2e2d5c1ebdcc16da6852e9cdd3ffc66c SD_ROOT/wz_mini/etc/wz_mini.conf.dist
|
||||||
@ -49,7 +49,7 @@ a8970288e72c871bff6a4484f1e733d6 SD_ROOT/wz_mini/bin/readelf
|
|||||||
41b56bb30f02bce5f5e2598073151e16 SD_ROOT/wz_mini/bin/ffmpeg
|
41b56bb30f02bce5f5e2598073151e16 SD_ROOT/wz_mini/bin/ffmpeg
|
||||||
e37474a12d76cae16336476cba61e8b8 SD_ROOT/wz_mini/bin/neofetch
|
e37474a12d76cae16336476cba61e8b8 SD_ROOT/wz_mini/bin/neofetch
|
||||||
7fcc716cda1e024dae1045050a135beb SD_ROOT/wz_mini/bin/audioplay_t31
|
7fcc716cda1e024dae1045050a135beb SD_ROOT/wz_mini/bin/audioplay_t31
|
||||||
ff3a5698bed114d813440564c2923d6d SD_ROOT/wz_mini/bin/upgrade-run.sh
|
4fc59ee666cd95f7af99cc75e21e455b SD_ROOT/wz_mini/bin/upgrade-run.sh
|
||||||
e6a6a9dd8ce138686083a3d4303cea40 SD_ROOT/wz_mini/bin/iperf3
|
e6a6a9dd8ce138686083a3d4303cea40 SD_ROOT/wz_mini/bin/iperf3
|
||||||
0468ffb319707687557353242a518923 SD_ROOT/wz_mini/bin/wg
|
0468ffb319707687557353242a518923 SD_ROOT/wz_mini/bin/wg
|
||||||
65510c6c4d0db4b4679fc92d1c617fdd SD_ROOT/wz_mini/bin/rtmp-stream.sh
|
65510c6c4d0db4b4679fc92d1c617fdd SD_ROOT/wz_mini/bin/rtmp-stream.sh
|
||||||
@ -77,7 +77,7 @@ ac9f3a5d097d25d5d972c3d2ad288df9 SD_ROOT/wz_mini/usr/bin/ucamera_v2
|
|||||||
cf049b9446094cc8a7e07a33cf91c4a8 SD_ROOT/wz_mini/usr/bin/watch_up.sh
|
cf049b9446094cc8a7e07a33cf91c4a8 SD_ROOT/wz_mini/usr/bin/watch_up.sh
|
||||||
b339aee882a5d1c943ad08e4282ec3fd SD_ROOT/wz_mini/usr/bin/iCamera-dbg
|
b339aee882a5d1c943ad08e4282ec3fd SD_ROOT/wz_mini/usr/bin/iCamera-dbg
|
||||||
20b061689308b2cee7edf3b9b906bca7 SD_ROOT/wz_mini/usr/bin/ucamera
|
20b061689308b2cee7edf3b9b906bca7 SD_ROOT/wz_mini/usr/bin/ucamera
|
||||||
d010b7a3e0c22fa6ea7fe1b53a13c119 SD_ROOT/wz_mini/usr/bin/upgrade-run.sh
|
4fc59ee666cd95f7af99cc75e21e455b SD_ROOT/wz_mini/usr/bin/upgrade-run.sh
|
||||||
580b1b6e91e72b4a4fef7b21d8954403 SD_ROOT/wz_mini/usr/bin/getSensorType
|
580b1b6e91e72b4a4fef7b21d8954403 SD_ROOT/wz_mini/usr/bin/getSensorType
|
||||||
4c780f0455481d106d47d89f0ae04ed5 SD_ROOT/wz_mini/lib/uClibc.tar
|
4c780f0455481d106d47d89f0ae04ed5 SD_ROOT/wz_mini/lib/uClibc.tar
|
||||||
9afeb088e4cbabbe0b04033b560204d0 SD_ROOT/wz_mini/lib/libimp.so
|
9afeb088e4cbabbe0b04033b560204d0 SD_ROOT/wz_mini/lib/libimp.so
|
||||||
|
Loading…
Reference in New Issue
Block a user