Merge branch 'master' into DetectAndAutoLoadEthernetDrivers

This commit is contained in:
Scott Kilau 2022-06-21 17:18:15 -05:00
commit 20d0995a04
6 changed files with 96 additions and 14 deletions

View File

@ -164,6 +164,45 @@ The next time you boot your camera, make sure your USB Ethernet Adapter is conne
---
Network Interface Bonding Support
```
BONDING_ENABLED="false"
BONDING_PRIMARY_INTERFACE="eth0"
BONDING_SECONDARY_INTERFACE="wlan0"
BONDING_LINK_MONITORING_FREQ_MS="100"
BONDING_DOWN_DELAY_MS="5000"
BONDING_UP_DELAY_MS="5000"
```
Bonding description is best described here:
https://wiki.debian.org/Bonding#Configuration_-_Example_2_.28.22Laptop-Mode.22.29:
("Laptop-Mode")
Tie cable and wireless network interfaces (RJ45/WLAN) together to define a single, virtual (i.e. bonding) network interface (e.g. bond0).
As long as the network cable is connected, its interface (e.g. eth0) is used for the network traffic. If you pull the RJ45-plug, ifenslave switches over to the wireless interface (e.g. wlan0) transparently, without any loss of network packages.
After reconnecting the network cable, ifenslave switches back to eth0 ("failover mode").
From the outside (=network) view it doesn't matter which interface is active. The bonding device presents its own software-defined (i.e. virtual) MAC address, different from the hardware defined MACs of eth0 or wlan0.
The dhcp server will use this MAC to assign an ip address to the bond0 device. So the computer has one unique ip address under which it can be identified. Without bonding each interface would have its own ip address.
BONDING_PRIMARY_INTERFACE
Specifies the interface that should be the primary. Typically "eth0".
BONDING_SECONDARY_INTERFACE
Specifies the interface that should be the secondary. Typically "wlan0".
BONDING_LINK_MONITORING_FREQ_MS
Specifies the MII link monitoring frequency in milliseconds. This determines how often the link state of each slave is inspected for link failures.
BONDING_DOWN_DELAY_MS
Specifies the time, in milliseconds, to wait before disabling a slave after a link failure has been detected. This option is only valid for the miimon link monitor. The downdelay value should be a multiple of the miimon value; if not, it will be rounded down to the nearest multiple.
BONDING_UP_DELAY_MS
Specifies the time, in milliseconds, to wait before enabling a slave after a link recovery has been detected. This option is only valid for the miimon link monitor. The updelay value should be a multiple of the miimon value; if not, it will be rounded down to the nearest multiple.
---
USB Direct Support:
```

BIN
SD_ROOT/wz_mini/bin/dnsmasq Executable file

Binary file not shown.

View File

@ -12,29 +12,31 @@ exec > >(busybox tee -a ${LOG_FILE}) 2>&1
setup() {
echo "Create Upgrade directory"
mkdir /opt/Upgrade
echo "Create Upgrade staging directory"
mkdir /opt/.Upgrade
echo "Create backup files directory"
mkdir /opt/Upgrade/preserve
mkdir /opt/.Upgrade/preserve
echo "Download latest master"
wget --no-check-certificate https://github.com/gtxaspec/wz_mini_hacks/archive/refs/heads/master.zip -O /opt/Upgrade/wz_mini.zip; sync
wget --no-check-certificate https://github.com/gtxaspec/wz_mini_hacks/archive/refs/heads/master.zip -O /opt/.Upgrade/wz_mini.zip; sync
echo "Extract archive"
unzip /opt/Upgrade/wz_mini.zip -d /opt/Upgrade/
echo "Extract master archive"
unzip /opt/.Upgrade/wz_mini.zip -d /opt/.Upgrade/
echo "Verify file integrity"
cd /opt/Upgrade/wz_mini_hacks-master
echo "Verify extracted file integrity"
cd /opt/.Upgrade/wz_mini_hacks-master
md5sum -c file.chk
if [ $? -eq 0 ]; then
echo "files OK"
echo "File verification successful!"
echo "Move staging directory to perform upgrade"
mv /opt/.Upgrade/ /opt/Upgrade/
install_upgrade_script
else
echo "Failure: archive has corrupted files"
echo "Delete failed upgrade dir"
rm -rf /opt/Upgrade
echo "Failure: Extracted files may be corrupt. Aborting upgrade."
echo "Delete failed upgrade staging directory"
rm -rf /opt/.Upgrade
exit 1
fi
@ -98,6 +100,19 @@ fi
echo "UPGRADE MODE"
echo "Verify extracted file integrity"
cd /opt/Upgrade/wz_mini_hacks-master
md5sum -c file.chk
if [ $? -eq 0 ]; then
echo "File verification successful!"
else
echo "Failure: Extracted files may be corrupt. Aborting upgrade."
echo "Delete failed upgrade directory"
rm -rf /opt/Upgrade
exit 1
fi
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
@ -133,6 +148,7 @@ reboot
if [[ "$1" == "unattended" ]]; then
echo "Unattended upgrade!"
rm -rf /opt/.Upgrade
rm -rf /opt/Upgrade
sync
setup
@ -149,11 +165,12 @@ else
read -r -p "${1:-wz_mini, this will download the latest version from github and upgrade your system. Are you sure? [y/N]} " response
case "$response" in
[yY][eE][sS]|[yY])
if [[ -d /opt/Upgrade ]]; then
if [[ -d /opt/.Upgrade ]]; then
echo "WARNING: Old Upgrade directory exists"
read -r -p "${1:-Unable to proceed, must DELETE old Upgrade directory, are you sure? [y/N]} " response
case "$response" in
[yY][eE][sS]|[yY])
rm -rf /opt/.Upgrade
rm -rf /opt/Upgrade
sync
setup

View File

@ -0,0 +1,15 @@
listen-address=127.0.0.1
port=53
bind-interfaces
user=root
group=root
pid-file=/var/run/dnsmasq.pid
domain-needed
bogus-priv
dns-forward-max=150
cache-size=1000
neg-ttl=3600
no-poll
resolv-file=/opt/wz_mini/etc/resolv.dnsmasq
#log-facility=-
#log-queries

View File

@ -0,0 +1,4 @@
#List your desired upstream dns servers here
#nameserver 8.8.8.8
#nameserver 8.8.4.4

View File

@ -1,5 +1,6 @@
72349f3e54a44146d63dc775d37045b1 SD_ROOT/factory_t31_ZMC6tiIDQN
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/mnt/.gitignore
28cf061770da7b83fbc3752c455a02c3 SD_ROOT/wz_mini/etc/dnsmasq.conf
34c6a4c3a941ff2becd9f487826d7692 SD_ROOT/wz_mini/etc/uvc.config
ad7d1a2f9db3079617731b5854ce3b6a SD_ROOT/wz_mini/etc/init.d/wz_cam.sh
0774518c06d6ef8e7181d35f194777cc SD_ROOT/wz_mini/etc/init.d/wz_init.sh
@ -12,6 +13,7 @@ e3034eac02d8eda9902ca9cf89f0a586 SD_ROOT/wz_mini/etc/inittab
2c2df1b9cb603f9c31c46162d6ac307f SD_ROOT/wz_mini/etc/alsa/alsa.conf
9e5591da95042bcca910403bde25dc60 SD_ROOT/wz_mini/etc/fstab
c838ac76efbe3d3fc3c4805789a6519f SD_ROOT/wz_mini/etc/uvc_jxf23.config
f08b7b96247b3ebd74eee451370d22db SD_ROOT/wz_mini/etc/resolv.dnsmasq
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/etc/configs/.gitignore
d0541c45c77ad3c5f27f06f03547c4f2 SD_ROOT/wz_mini/etc/shadow
c838ac76efbe3d3fc3c4805789a6519f SD_ROOT/wz_mini/etc/uvc_v2.config
@ -43,13 +45,14 @@ c5d2801b7117b8db6275647110e6c8f1 SD_ROOT/wz_mini/bin/iwconfig.sh
78aaf46b312749d71c1f93a97f80fa74 SD_ROOT/wz_mini/bin/nm
02c62618633915a282a547411524ed3c SD_ROOT/wz_mini/bin/v4l2rtspserver
a9b8e51b956806e27021e6524ba917ed SD_ROOT/wz_mini/bin/ranlib
2393ba8bfe8c86775b8eb7b40fa2fe57 SD_ROOT/wz_mini/bin/dnsmasq
c23e3da466dc9701bee036ec034583b7 SD_ROOT/wz_mini/bin/rsync
ff5a2354e4be9cc244f3ac8f304e930a SD_ROOT/wz_mini/bin/size
a8970288e72c871bff6a4484f1e733d6 SD_ROOT/wz_mini/bin/readelf
41b56bb30f02bce5f5e2598073151e16 SD_ROOT/wz_mini/bin/ffmpeg
e37474a12d76cae16336476cba61e8b8 SD_ROOT/wz_mini/bin/neofetch
7fcc716cda1e024dae1045050a135beb SD_ROOT/wz_mini/bin/audioplay_t31
03a42f7f175f88903c0dc52013f11205 SD_ROOT/wz_mini/bin/upgrade-run.sh
18acd856dd104377c35ca6121409f9cf SD_ROOT/wz_mini/bin/upgrade-run.sh
e6a6a9dd8ce138686083a3d4303cea40 SD_ROOT/wz_mini/bin/iperf3
0468ffb319707687557353242a518923 SD_ROOT/wz_mini/bin/wg
65510c6c4d0db4b4679fc92d1c617fdd SD_ROOT/wz_mini/bin/rtmp-stream.sh
@ -186,3 +189,7 @@ bd383994491e4bdca81788c168feb2eb SD_ROOT/wz_mini/lib/libasound.so.2
f6f0d5a9ebd916de6bdb9695067809ae SD_ROOT/wz_mini/lib/libaudioProcess.so
aa102e670336c6bf165f1a9925d9d4fc SD_ROOT/wz_mini/wz_mini.conf
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/tmp/.gitignore
00b99816217a740f5169709ef01eddf6 v2_install/compile_image.sh
ff15869fe24297b9a5f75335a458a44f v2_install/fw_tool.sh
9625b325d7cf317bc9bc796312be82db v2_install/v2_kernel.bin
f01d641b98388e273c1f0ba682ebc75b v2_install/.gitignore