[OpenWrt-Devel] [PATCH] ramips: add support for belkin F7C027 wemo/homeautomatisation plug

2013-06-09 Thread Alexander Couzens
Signed-off-by: Alexander Couzens 
---
 target/linux/ramips/base-files/etc/diag.sh |   3 +
 .../etc/hotplug.d/firmware/10-rt2x00-eeprom|   1 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/F7C027.dts | 126 +
 target/linux/ramips/image/Makefile |   5 +
 target/linux/ramips/rt305x/profiles/belkin.mk  |  12 ++
 7 files changed, 151 insertions(+)
 create mode 100644 target/linux/ramips/dts/F7C027.dts

diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 1970ae0..be2fa56 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -129,6 +129,9 @@ get_status_led() {
xdxrn502j)
status_led="xdxrn502j:green:power"
;;
+   f7c027)
+   status_led="belkin:orange:status"
+;;
esac
 }
 
diff --git 
a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom 
b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 320e01d..41dabd9 100644
--- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -71,6 +71,7 @@ case "$FIRMWARE" in
dir-620-a1 | \
dir-620-d1 | \
esr-9753 | \
+   f7c027 | \
fonera20n | \
rt-n13u | \
freestation5 | \
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 63af00d..03ae25b 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -91,6 +91,9 @@ ramips_board_detect() {
*"ESR-9753")
name="esr-9753"
;;
+   *"F7C027")
+   name="f7c027"
+   ;;
*"F5D8235 v1")
name="f5d8235-v1"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index b2fa0bd..2d24f18 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -37,6 +37,7 @@ platform_check_image() {
dir-620-d1 | \
dap-1350 | \
esr-9753 | \
+   f7c027 | \
fonera20n | \
rt-n13u | \
freestation5 | \
diff --git a/target/linux/ramips/dts/F7C027.dts 
b/target/linux/ramips/dts/F7C027.dts
new file mode 100644
index 000..91d4383
--- /dev/null
+++ b/target/linux/ramips/dts/F7C027.dts
@@ -0,0 +1,126 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+   compatible = "F7C027", "ralink,rt5350-soc";
+   model = "Belkin F7C027";
+
+   palmbus@1000 {
+   sysc@0 {
+   ralink,pinmux = "spi", "uartlite", "jtag", "sdram";
+   ralink,uartmux = "gpio";
+   ralink,wdtmux = <1>;
+   };
+
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+
+   spi@b00 {
+   status = "okay";
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "mx25l12805d";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "mx25l12805d";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0x77>;
+   };
+
+   partition@7c {
+   label = "firmware2";
+   reg = <0x7c 0x77>;
+   };
+
+   partition@f3 {
+   label = "belkin_settings";
+ 

Re: [OpenWrt-Devel] Using JTAG on Ralink

2013-06-09 Thread Karl P


I've seen this a lot with openocd and arm cortex-m targets.  There's always lots 
of finger pointing, but it's "incompatible" gdb version and gdbserver version. 
It's to do with the gdbserver sending an XML memory map that your version of gdb 
doesn't understand.  (or at least, doesn't understand receiving it from the 
target)  The "easiest" is finding the "right" version of gdb to use with the 
gdbserver you're using, which may be an up or a downgrade.  There's some 
workarounds with manually specifying target type architecture and pointing to 
local memory map xml files and so on, but it's increasingly ugly.


Seeing as it looks like the gdb is built by openwrt, can you check if it has xml 
support built in?


Cheers,
Karl P


On 06/09/2013 02:06 AM, jonsm...@gmail.com wrote:

Any idea what I am doing wrong? Why are the registers too long?

jonsmirl@terra:/home/apps/openwrt$
./staging_dir/toolchain-mipsel_dsp_gcc-4.7.2_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-uclibc-gdb
GNU gdb (Linaro GDB) 7.5-2012.12-1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu
--target=mipsel-openwrt-linux-uclibc".
For bug reporting instructions, please see:
.
(gdb) target remote localhost:
Remote debugging using localhost:
Remote 'g' packet reply is too long:
62000a0040001050f780c080fc80439d11001050f780d0b2fc80d52ef580ca2ef5800040fb80a02ff580b02ff780ac72fc80ff8160c2fc80d830f58055aa55aa06000100424644202c80006004020080
(gdb) show architecture
The target architecture is set automatically (currently mips)
(gdb)


-

jonsmirl@terra:~$ openocd -f interface/olimex-arm-usb-ocd.cfg -f ralink.cfg
Open On-Chip Debugger 0.5.0 (2011-12-03-10:15)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
2000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
rt3050.cpu
Info : clock speed 2000 kHz
Info : JTAG tap: rt3050.cpu tap/device found: 0x1535024f (mfg: 0x127,
part: 0x5350, ver: 0x1)
Info : accepting 'telnet' connection from 
target state: halted
target halted in MIPS32 mode due to debug-request, pc: 0x8204
Info : accepting 'gdb' connection from 
Warn : acknowledgment received, but no packet pending
Info : dropped 'gdb' connection


--
Jon Smirl
jonsm...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 3g disconnect on WR703N (Mitch Kelly)

2013-06-09 Thread bjzhougong
FC1918 responses!

Sep  8 15:50:32 OpenWrt user.notice dnsmasq: Allowing 127.0.0.0/8 responses

Sep  8 15:50:36 OpenWrt daemon.info dnsmasq[1993]: started, version 2.62
cachesize 150

Sep  8 15:50:36 OpenWrt da emon.inf o dnsmasq[1993]: compile time options:
no-IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP
no-conntrack

Sep  8 15:50:36 OpenWrt daemon.info dnsmasq-dhcp[1993]: DHCP, IP range
192.168.22.100 -- 192.168.22.249, lease time 12h

Sep  8 15:50:36 OpenWrt daemon.info dnsmasq[1993]: using local addresses
only for domain lan

Sep  8 15:50:36 OpenWrt daemon.info dnsmasq[1993]: reading
/tmp/resolv.conf.auto

Sep  8 15:50:36 OpenWrt daemon.info dnsmasq[1993]: using nameserver
61.177.7.1#53

Sep  8 15:50:36 OpenWrt daemon.info dnsmasq[1993]: using nameserver
218.2.135.1#53

Sep  8 15:50:36 OpenWrt daemon.info dnsmasq[1993]: using local addresses
only for domain lan

Sep  8 15:50:36 OpenWrt daemon.info dnsmasq[1993]: read /etc/hosts - 1
addresses

Sep  8 15:50:36 OpenWrt daemon.info dnsmasq-dhcp[1993]: read /etc/ethers - 0
addresses

Sep  8 15:50: 38 OpenW rt daemon.info dnsmasq-dhcp[1993]:
DHCPREQUEST(br-lan) 192.168.22.178 68:a3:c4:64:66:14 

Sep  8 15:50:38 OpenWrt daemon.info dnsmasq-dhcp[1993]: DHCPACK(br-lan)
192.168.22.178 68:a3:c4:64:66:14 sinkin-ThinkPad-T420

Jun  8 15:06:50 OpenWrt daemon.info pppd[837]: System time change detected.

Jun  8 15:15:07 OpenWrt daemon.info hostapd: wlan0: STA 00:1c:bf:c8:bb:44
IEEE 802.11: authenticated

Jun  8 15:15:07 OpenWrt daemon.info hostapd: wlan0: STA 00:1c:bf:c8:bb:44
IEEE 802.11: associated (aid 2)

Jun  8 15:15:10 OpenWrt daemon.info dnsmasq-dhcp[1993]: DHCPDISCOVER(br-lan)
192.168.1.101 00:1c:bf:c8:bb:44 

Jun  8 15:15:10 OpenWrt daemon.info dnsmasq-dhcp[1993]: DHCPOFFER(br-lan)
192.168.22.152 00:1c:bf:c8:bb:44 

Jun  8 15:15:10 OpenWrt daemon.info dnsmasq-dhcp[1993]: DHCPREQUEST(br-lan)
192.168.22.152 00:1c:bf:c8:bb:44 

Jun  8 15:15:10 OpenWrt daemon. info dnsmasq-dhcp[1993]: DHCPACK(br-lan)
192.168.22.152 00:1c:bf:c8:bb:44 513d0cd75d5640b

Jun  8 15:18:12 OpenWrt daemon.info pppd[837]: No response to 10
echo-requests

Jun  8 15:18:12 OpenWrt daemon.notice pppd[837]: Serial link appears to be
disconnected.

Jun  8 15:18:12 OpenWrt daemon.info pppd[837]: Connect time 12.0 minutes.

Jun  8 15:18:12 OpenWrt daemon.info pppd[837]: Sent 43242 bytes, received
53310 bytes.

Jun  8 15:18:12 OpenWrt daemon.notice netifd: Interface 'wan' has lost the
connection

Jun  8 15:18:13 OpenWrt user.info firewall: removing wan (3g-wan) from zone
wan

Jun  8 15:18:18 OpenWrt daemon.notice pppd[837]: Connection terminated.

Jun  8 15:18:42 OpenWrt daemon.warn dnsmasq[1993]: no servers found in
/tmp/resolv.conf.auto, will retry



3. Our 3g.chat:

ABORT   BUSY

ABORT   'NO CARRIER'

ABORT   ERROR

REPORT  CONNECT

TIMEOUT 10

OK  "AT&FE0V1X1&D2&C1S0=0"

OK  "AT&FE0V1X1&D2&C1S0=0"

SAY "Calling EVDO"

TIMEOUT 30

OK  "ATDT#777"

CONNECT ' '



4. The network config:

config interface 'loopback'

option ifname 'lo'

&nbs p;   ; option proto 'static'

option ipaddr '127.0.0.1'

option netmask '255.0.0.0'



config interface 'lan'

option ifname 'eth0'

option type 'bridge'

option proto 'static'

option ipaddr '192.168.22.1'

option netmask '255.255.255.0'



config 'interface' 'wan'

option 'ifname' 'ppp0'

option 'proto' '3g'

option 'service' 'evdo'

    option 'device' '/dev/ttyUSB0'

option 'username' 'CARD'

option 'password' 'CARD'

option 'au to' '1'< /div>



5. The option of ppp:

logfile /dev/null

noipdefault

noaccomp

nopcomp

nocrtscts

lock

maxfail 0

lcp-echo-failure 10

lcp-echo-interval 3



-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20130609/fefd85da/attachment.html>

--

Subject: Digest Footer

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


--

End of openwrt-devel Digest, Vol 90, Issue 21
*___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 3g disconnect on WR703N

2013-06-09 Thread Dairyman

On 6/8/2013 8:10 PM, Mitch Kelly wrote:


Hi,

The 703N can only supply 200mA out the USB port, Its likely this issue 
is caused by the device using more power that can be supplied and the 
device resetting.


TP-Link have a compatibility Martix for devices, It is based on Power 
consumption, Not just drivers in stock firmware.


Mitch Kelly.


I and others run an OpenWRT based project that expands the USB modem 
capabilities of the firmware to include automatic connection, full LTE 
speeds for 4G modems and other modem related features.


We have come across this problem of disconnection shortly after 
connecting many times and it always has come down to lack of power being 
supplied to the modem. With over 7000 downloads of our firmware we have 
much experience in this area.


The WR703N can supply, if available, up to 1.25 amps to the USB port 
according to the specs of the switch chip that they use. The stock power 
supply that comes with the WR703N is rated at 1 amp by the sticker but 
we have found this is not always the case.


By using a better, higher rated power supply you'll see the problem 
disappear. Modems take much more power than you would think and a poor 
signal can add to the drain. An LTE modem in a low signal area can use 
up to 800ma, which is far more than the stock power supply can provide.


The issue of disconnections is seldom caused by the router firmware but 
seems to be power supply based in almost every case.


Ralph Deane

http://www.ofmodemsandmen.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] JFFS2 errors - how to fix ?

2013-06-09 Thread Tomislav Požega
brcm47xx platform with BCM5354, BARRIER BREAKER (Bleeding Edge, r36813)

i'm getting these jffs2 errors at each boot as well as system read-only
(doesn't allow to change passwd etc.)

Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
[ 10.328000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x0094: 0xadde instead
[ 10.336000] jffs2: Empty flash at 0x0098 ends at 0x1094
[ 10.344000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x1094: 0xadde instead
[ 10.356000] jffs2: Empty flash at 0x1098 ends at 0x2094
[ 10.36] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x2094: 0xadde instead
[ 10.38] jffs2: Empty flash at 0x2098 ends at 0x00010094
[ 10.388000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00010094: 0xadde instead
[ 10.408000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00020094: 0xadde instead
[ 10.444000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00040094: 0xadde instead
[ 19.688000] jffs2: Cowardly refusing to erase blocks on filesystem with no
valid JFFS2 nodes
[ 19.696000] jffs2: empty_blocks 0, bad_blocks 0, c->nr_blocks 192
switching to jffs2
- init -

at this time i can only suspect it has something to do with TRX offset
which is 94 in size.

boot log: https://docs.google.com/file/d/0B9q26mDpDIZoYU5ZbncxT0I4TGs/edit
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel