a few 3g modem fixes

This commit is contained in:
Calin Crisan 2016-06-10 22:33:45 +03:00
parent 31ea9d82e3
commit 48a56062ca
4 changed files with 13 additions and 2 deletions

View File

@ -10,7 +10,7 @@ iface=wlan0
driver=wext
sys_watch_conf="/etc/watch.conf"
boot_watch_conf="/etc/watch.conf"
boot_watch_conf="/boot/watch.conf"
watch_conf="/data/etc/watch.conf"
link_watch=yes

View File

@ -47,6 +47,12 @@ watch() {
done
}
udev_trigger_add() {
for ((i = 0; i < $1; i++)); do
/sbin/udevadm trigger --type=devices --action=add
done
}
start() {
test -e $conf/auth || touch $conf/auth
test -e $conf/extra || touch $conf/extra
@ -57,6 +63,10 @@ start() {
# wait for modem
modem=$(head -n 1 $conf/modem)
if ! [ -e /dev/$modem ]; then
udev_trigger_add 4 &
fi
count=0
while true; do
if [ -e /dev/$modem ] || [ $count -gt $link_watch_timeout ]; then

View File

@ -6,6 +6,7 @@ BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi"
BR2_OPTIMIZE_2=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_GLIBC_VERSION_2_22=y
BR2_BINUTILS_VERSION_2_25_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_OPTIMIZATION="-pipe"

View File

@ -23,7 +23,7 @@ function msg() {
echo ":: $1"
}
while getopts "a:d:f:h:i:ln:o:p:s:w" o; do
while getopts "a:d:f:h:i:lm:n:o:p:s:w" o; do
case "$o" in
d)
SDCARD_DEV=$OPTARG