mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
* Link to the WiKi, it's a bit more explainy ;). * More WiFi trickery for some HW revs * Fix Rev2 detection under KSM That's to future-proof it, the other end of this hasn't made it into current KSM build yet. * Resync nickel.sh w/ current rcS We don't have CPU, but we have PLATFORM, which is based on CPU, so, that'll do :). * Go back to using rmmod instead of modprobe -r Functionally identical on current FW, will potentially avoid getting outsmarted by modprobe if Kobo ever deigns shipping an actually usable Linux system one day... * Don't crash if screensavers directory doesn't exist c.f., https://www.mobileread.com/forums/showpost.php?p=3706979&postcount=2919
19 lines
662 B
Bash
Executable File
19 lines
662 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Load wifi modules and enable wifi.
|
|
|
|
lsmod | grep -q sdio_wifi_pwr || insmod "/drivers/${PLATFORM}/wifi/sdio_wifi_pwr.ko"
|
|
# Moar sleep!
|
|
usleep 250000
|
|
# WIFI_MODULE_PATH = /drivers/$PLATFORM/wifi/$WIFI_MODULE.ko
|
|
lsmod | grep -q "${WIFI_MODULE}" || insmod "${WIFI_MODULE_PATH}"
|
|
# Race-y as hell, don't try to optimize this!
|
|
sleep 1
|
|
|
|
ifconfig "${INTERFACE}" up
|
|
[ "$WIFI_MODULE" != "8189fs" ] && [ "${WIFI_MODULE}" != "8189es" ] && wlarm_le -i "${INTERFACE}" up
|
|
|
|
pidof wpa_supplicant >/dev/null \
|
|
|| env -u LD_LIBRARY_PATH \
|
|
wpa_supplicant -D wext -s -i "${INTERFACE}" -O /var/run/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B
|