add remote spotlight and fix library paths

This commit is contained in:
Alfonso Gamboa
2022-04-17 21:02:58 -07:00
parent 3f85828621
commit 0bb91bd8fb
7 changed files with 52 additions and 14 deletions

BIN
SD_ROOT/wz_mini/bin/socat Executable file

Binary file not shown.

View File

@@ -0,0 +1,13 @@
#!/bin/sh
if [[ "$1" == "on_high" ]]; then
echo -ne "\xaa\x55\x43\x05\x16\xff\x07\x02\x63" > /dev/ttyUSB0
elif [[ "$1" == "on_low" ]]; then
echo -ne "\xaa\x55\x43\x05\x16\x33\x07\x01\x97" > /dev/ttyUSB0
elif [[ "$1" == "off" ]]; then
echo -ne "\xaa\x55\x43\x05\x16\x00\x07\x01\x64" > /dev/ttyUSB0
else
echo "usage: spotlight_ctl on_high"
echo "usage: spotlight_ctl on_low"
echo "usage: spotlight_ctl off"
fi

BIN
SD_ROOT/wz_mini/bin/strace Executable file

Binary file not shown.

BIN
SD_ROOT/wz_mini/bin/tcpdump Executable file

Binary file not shown.

View File

@@ -10,7 +10,7 @@ fi
# Set terminal env
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/media/mmc/wz_mini/bin
export PATH=/system/bin:$PATH
export LD_LIBRARY_PATH=/system/lib
export LD_LIBRARY_PATH=/system/lib:/media/mmc/wz_mini/lib
export LD_LIBRARY_PATH=/thirdlib:$LD_LIBRARY_PATH
#export TZ=UTC-8

View File

@@ -12,6 +12,9 @@ ENABLE_USB_ETH="false"
ENABLE_USB_DIRECT="false"
USB_DIRECT_MAC_ADDR="02:01:02:03:04:08"
REMOTE_SPOTLIGHT="false"
REMOTE_SPOTLIGHT_HOST="0.0.0.0"
echo "run_mmc.sh start" > /dev/kmsg
if [[ -d /configs/.ssh ]]; then
@@ -73,10 +76,17 @@ if [[ "$DISABLE_FW_UPGRADE" == "true" ]]; then
mount --bind /tmp/.hosts_wz /etc/hosts
fi
echo set hostname
if [[ "$REMOTE_SPOTLIGHT" == "true" ]]; then
socat pty,link=/dev/ttyUSB0,raw tcp:$REMOTE_SPOTLIGHT_HOST:9000
fi
echo "set hostname"
hostname $HOSTNAME
echo Run dropbear ssh server
echo "bind /etc/profile for local shell"
mount --bind /media/mmc/wz_mini/etc/profile /etc/profile
echo "Run dropbear ssh server"
/media/mmc/wz_mini/bin/dropbearmulti dropbear -R -m
sleep 3