update install and booting method

This commit is contained in:
Alfonso Gamboa
2022-04-12 21:13:18 -07:00
parent fe9e712c38
commit b63fe86438
10 changed files with 118 additions and 137 deletions

BIN
SD_ROOT/factory_t31_ZMC6tiIDQN Executable file

Binary file not shown.

BIN
SD_ROOT/wz_mini/bin/busybox Normal file

Binary file not shown.

BIN
SD_ROOT/wz_mini/bin/dropbearmulti Executable file

Binary file not shown.

View File

@@ -0,0 +1 @@
root:aVG8.5PMEOfnQ:0:0:99999:7:::

55
SD_ROOT/wz_mini/run_mmc.sh Executable file
View File

@@ -0,0 +1,55 @@
#!/bin/sh
echo "check if ethernet adapter is present"
if [[ ! -d /sys/class/net/eth* ]]; then
echo "usb ethernet not present"
if [[ ! -d /sys/class/net/usb0* ]]; then
echo "usb host not present"
else
ifconfig usb0 down
ifconfig wlan0 down
/media/mmc/busybox ip link set wlan0 address 02:01:02:03:04:08
/media/mmc/busybox ip link set wlan0 name wlanold
/media/mmc/busybox ip link set usb0 name wlan0
ifconfig wlan0 up
udhcpc -i wlan0
/media/mmc/dropbearmulti dropbear -R -m &
sleep 5
mount -o bind /media/mmc/wpa_cli.sh /bin/wpa_cli
fi
else
ifconfig eth0 down
ifconfig wlan0 down
/media/mmc/busybox ip link set wlan0 name wlanold
/media/mmc/busybox ip link set eth0 name wlan0
ifconfig wlan0 up
udhcpc -i wlan0
/media/mmc/dropbearmulti dropbear -R -m &
sleep 5
mount -o bind /media/mmc/wpa_cli.sh /bin/wpa_cli
fi
echo set hostname
hostname WCV3_spare_test
echo Store dmesg logs
dmesg > /media/mmc/wz_mini/logs/dmesg.log
echo Run dropbear ssh server
/media/mmc/wz_mini/bin/dropbearmulti dropbear -R -m
#echo Disable remote firmware upgrade, uncomment lines below to enable
#mkdir /tmp/Upgrade
#mount -t tmpfs -o size=1,nr_inodes=1 none /tmp/Upgrade
#echo -e 127.0.0.1 localhost n127.0.0.1 wyze-upgrade-service.wyzecam.com > /tmp/hosts_wz
#mount --bind /tmp/hosts_wz /etc/hosts
sleep 3
#Place commands here to run 30 seconds after boot
#such as mount nfs, ping, etc
#mount -t nfs -o nolock,rw,noatime,nodiratime 192.168.1.1:/volume1 /media/mmc/record

Binary file not shown.

24
SD_ROOT/wz_mini/v3_init.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
###
###DO NOT MODIFY UNLESS YOU KNOW WHAT YOU ARE DOING
###
echo '
__ ________ __ __ _____ _ _ _____
\ \ / |___ / | \/ |_ _| \ | |_ _|
\ \ /\ / / / / | \ / | | | | \| | | |
\ \/ \/ / / / | |\/| | | | | . ` | | |
\ /\ / / /__ | | | |_| |_| |\ |_| |_
\/ \/ /_____| |_| |_|_____|_| \_|_____|
______
|______|
'
mount -t tmpfs /tmp
cp /opt/wz_mini/etc/shadow /tmp/
mount --bind /tmp/shadow /etc/shadow
chmod 400 /etc/shadow
{ sleep 30; /media/mmc/wz_mini/run_mmc.sh > /media/mmc/wz_mini/wz_mini_hacks.log; } &
/linuxrc