mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-25 23:07:17 +00:00
add swap and logic
This commit is contained in:
parent
4db9570833
commit
a2cb715d21
@ -83,11 +83,12 @@ to:
|
||||
```
|
||||
ENABLE_USB_ETH="true"
|
||||
```
|
||||
the next time you boot your camera, make sure your USB Ethernet Adapter is connected to the camera and ethernet. The camera has to be setup initially with Wi-Fi for this to work. After setup, Wi-Fi is no longer needed.
|
||||
the next time you boot your camera, make sure your USB Ethernet Adapter is connected to the camera and ethernet. The camera has to be setup initially with Wi-Fi for this to work. After setup, Wi-Fi is no longer needed, as long as you are using the USB Ethernet Adapter. Note that using USB Ethernet disables the onboard Wi-Fi.
|
||||
|
||||
|
||||
## Latest Updates
|
||||
|
||||
* 04-14-22: Possible memory leak with some USB adapters used, added 128MB swap file and logic as workaround to prevent oom killing
|
||||
* 04-13-22: Firmware updates are disabled by default, there is a bug in the bootloader that corrupts the kernel partition requiring the re-flash of the camera if an update is processed and the memory card is removed before next boot. The bootloader proceeds to copy the partitions and the system will not boot unless re-flashed. pending investigation.
|
||||
* 04-12-22: Updated, custom kernel loads all required items from micro sd card. System modification no longer needed.
|
||||
* 04-05-22: Update readme to indicate that telnet mod nor DNS spoofing is required for installation, and add pre-requisites section.
|
||||
|
@ -21,6 +21,15 @@ cp /opt/wz_mini/etc/shadow /tmp/.shadow
|
||||
mount --bind /tmp/.shadow /etc/shadow
|
||||
chmod 400 /etc/shadow
|
||||
|
||||
if [[ -f /opt/wz_mini/swap.gz ]]; then
|
||||
echo "swap archive present, extracting"
|
||||
gzip -d /opt/wz_mini/swap.gz
|
||||
mkswap /opt/wz_mini/swap
|
||||
sync;echo 3 > /proc/sys/vm/drop_caches;free
|
||||
else
|
||||
echo "swap archive not present, not extracting"
|
||||
fi
|
||||
|
||||
{ sleep 30; /media/mmc/wz_mini/run_mmc.sh > /media/mmc/wz_mini/log/wz_mini_hacks.log; } &
|
||||
|
||||
/linuxrc
|
||||
|
@ -19,6 +19,14 @@ else
|
||||
fi
|
||||
|
||||
if [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
||||
|
||||
if [[ -f /media/mmc/wz_mini/swap ]]; then
|
||||
echo "swap exists, enable"
|
||||
swapon /media/mmc/wz_mini/swap
|
||||
else
|
||||
echo "swap missing, system stability with usb potentially comprimised"
|
||||
fi
|
||||
|
||||
ifconfig eth0 down
|
||||
ifconfig wlan0 down
|
||||
|
||||
@ -27,8 +35,8 @@ if [[ "$ENABLE_USB_ETH" == "true" ]]; then
|
||||
|
||||
ifconfig wlan0 up
|
||||
pkill udhcpc
|
||||
udhcpc -i wlan0 -H $HOSTNAME -p /var/run/udhcpc.pid -b
|
||||
sleep 5
|
||||
udhcpc -i wlan0 -x hostname:$HOSTNAME -p /var/run/udhcpc.pid -b
|
||||
# sleep 5
|
||||
mount -o bind /media/mmc/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
|
||||
else
|
||||
echo "usb ethernet disabled"
|
||||
@ -46,8 +54,7 @@ if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
|
||||
|
||||
ifconfig wlan0 up
|
||||
pkill udhcpc
|
||||
udhcpc -i wlan0 -H $HOSTNAME -p /var/run/udhcpc.pid -b
|
||||
|
||||
udhcpc -i wlan0 -x hostname:$HOSTNAME -p /var/run/udhcpc.pid -b
|
||||
sleep 5
|
||||
mount -o bind /media/mmc/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
|
||||
else
|
||||
|
BIN
SD_ROOT/wz_mini/swap.gz
Normal file
BIN
SD_ROOT/wz_mini/swap.gz
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user