From 48a56062ca7cc19e4fbe8127dc459ee26c4e25a4 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Fri, 10 Jun 2016 22:33:45 +0300 Subject: [PATCH] a few 3g modem fixes --- board/common/overlay/etc/init.d/S35wifi | 2 +- board/common/overlay/etc/init.d/S36ppp | 10 ++++++++++ configs/raspberrypi_defconfig | 1 + writeimage.sh | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/board/common/overlay/etc/init.d/S35wifi b/board/common/overlay/etc/init.d/S35wifi index 61cb4f78c2..0332ba5b91 100755 --- a/board/common/overlay/etc/init.d/S35wifi +++ b/board/common/overlay/etc/init.d/S35wifi @@ -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 diff --git a/board/common/overlay/etc/init.d/S36ppp b/board/common/overlay/etc/init.d/S36ppp index af33db7030..041b042b83 100755 --- a/board/common/overlay/etc/init.d/S36ppp +++ b/board/common/overlay/etc/init.d/S36ppp @@ -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 diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig index 4740959b6a..6a3008f10f 100644 --- a/configs/raspberrypi_defconfig +++ b/configs/raspberrypi_defconfig @@ -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" diff --git a/writeimage.sh b/writeimage.sh index 70c0d6f5b4..940af69325 100755 --- a/writeimage.sh +++ b/writeimage.sh @@ -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