OpenWrt Forum Archive

Topic: DLink DIR-320NRU aka DIR320 h/w ver B1 - garbage comes through UART.

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Occasionally bought subj instead of DIR-320.
This router is equipped with RALINK RT5350 SOC with 32M RAM onboard. I connected UART console to the router and gained U-Boot loader commands
Since it's just new MIPS incarnation, I've  compiled OpenWRT for RT305X router and then I have flashed it into device. I also manually set 32M memory limit. Now when the device is restarted, U-boot loads the kernel and starts it. Right after that I receive only garbage coming from UART. Looks like the system is not hanged, it sends something through UART, and even reacts to my input but port parameters are changed and I receive only broken characters. I tried to find proper UART settings but I completely failed, no one worked. Network is still down, 192.168.1.1 does not respond to ping.
What can be wrong with UART?  What is SERIAL_CLOCK_DIVISOR? Why CPU is started at 360MHz, then run at 320?
Boot log from console:

U-Boot 1.1.3 (Mar 31 2011 - 13:19:43)

Board: Ralink APSoC DRAM:  32 MB
rt2880 uboot v0.00e04 05/25/2006
SERIAL_CLOCK_DIVISOR =16 
kaiker,,CONFIG_BAUDRATE =57600 
SDRAM SIZE:02000000
Top of RAM usable for U-Boot at: 82000000
Reserving 319k for U-Boot at: 81fb0000
Reserving 260k for malloc() at: 81f6f000
Reserving 44 Bytes for Board Info at: 81f6efd4
Reserving 36 Bytes for Global Data at: 81f6efb0
Reserving 128k for boot params() at: 81f4efb0
Stack Pointer at: 81f4ef98
relocate_code Pointer at: 81fb0000
Now running in RAM - U-Boot at: 81fb0000

monitor_flash_len =124244 
-blah-blah-blah
spi_wait_nsec: 42 
spi device id: ef 40 17 0 0 (40170000)
find flash: W25Q64BV
raspi_read: from:30000 len:1000 
.raspi_read: from:30000 len:1000 
.Before: 3000
reg 2000
After: 3000
============================================ 
Ralink UBoot Version: 3.5.2.0
-------------------------------------------- 
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping 
DRAM_TYPE: SDRAM 
DRAM_SIZE: 256 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:Mar 31 2011  Time:13:19:43
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384 

 ##### The CPU freq = 360 MHZ #### 
 estimate memory size =32 Mbytes
raspi_read: from:40004 len:6 
.
Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 

You choosed 4
raspi_read: from:40004 len:6 
4: System Enter Boot Command Line Interface.
U-Boot 1.1.3 (Mar 31 2011 - 13:19:43)
RT5350 # printenv
bootcmd=tftp
baudrate=57600
ethaddr="00:AA:BB:CC:DD:10"
ramargs=setenv bootargs root=/dev/ram rw
addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off
addmisc=setenv bootargs $(bootargs) console=ttyS0,$(baudrate) ethaddr=$(ethaddr) panic=1
flash_self=run ramargs addip addmisc;bootm $(kernel_addr) $(ramdisk_addr)
kernel_addr=BFC40000
u-boot=u-boot.bin
load=tftp 8A100000 $(u-boot)
u_b=protect off 1:0-1;era 1:0-1;cp.b 8A100000 BC400000 $(filesize)
loadfs=tftp 8A100000 root.cramfs
u_fs=era bc540000 bc83ffff;cp.b 8A100000 BC540000 $(filesize)
test_tftp=tftp 8A100000 root.cramfs;run test_tftp
ethact=Eth0 (10/100-M)
filesize=35f87d
fileaddr=80800000
ipaddr=192.168.0.1
serverip=192.168.0.2
autostart=no
bootfile=firmware.tftp
bootargs=mem=32M console=ttyS1,57600n8
bootdelay=10
stdin=serial
stdout=serial
stderr=serial

Environment size: 875/4092 bytes
RT5350 # reset
-blah-blah-blah
3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40 
.   Image Name:   MIPS OpenWrt Linux-2.6.39.4
   Created:      2011-11-20   4:14:31 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2423308 Bytes =  2.3 MB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:24fa0c 
Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32
Starting kernel ...
Linux version 2.6.39.4 (ee@linux-ysqy) (gcc version 4.5.4 20110808 (prerelease) (Linaro GCC 4.5-2011.08) ) #1 Sat Nov 19 23:14:25 EST 2011
bootconsole [early0] enabled
CPU revision is: 0001964c (MIPS 24Kc)
Ralink RT5350   id:1 rev:3 running at 320.00 MHz
Determined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line:  mem=32M console=ttyS1,57600n8 console=ttyS1,57600 rootfstype=squashfs,jffs2
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
Writing ErrCtl register=0006a850
Readback ErrCtl register=0006a850
Memory: 28152k/32768k available (2219k kernel code, 4616k reserved, 402k data, 1564k init, 0k highmem)
SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:48
|?|?||?|?|??p|?????p??p??

(Last edited by elmot on 21 Nov 2011, 07:32)

Please try to correct CPU clock in target/linux/ramips//files/arch/mips/ralink/rt305x/clock.c from 320000000 to 360000000 and post result here.

Eventually could do that. Result is almost the same

3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
.   Image Name:   MIPS OpenWrt Linux-2.6.39.4
   Created:      2011-11-27  19:27:34 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    805379 Bytes = 786.5 kB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:c4a03
.............   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32

Starting kernel ...

Linux version 2.6.39.4 (ee@linux-ysqy) (gcc version 4.5.4 20110808 (prerelease)(Linaro GCC 4.5-2011.08) ) #2 Sun Nov 27 14:27:16 EST 2011
bootconsole [early0] enabled
CPU revision is: 0001964c (MIPS 24Kc)
Ralink RT5350   id:1 rev:3 running at 360.00 MHz
Determined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line:  board=DIR-600-B2 mtdparts=physmap-flash.0:192k(u-boot)ro,4k(devdata)ro,64k(devconf)ro,832k(kernel),2944k(rootfs),3776k@0x50000(firmware)console=ttyS1,57600 rootfstype=squashfs,jffs2 mem=32M
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
Writing ErrCtl register=0006a850
Readback ErrCtl register=0006a850
Memory: 30024k/32768k available (1849k kernel code, 2744k reserved, 316k data, 52k init, 0k highmem)
SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:48
??????????????

I've sent a letter to main D-Link headquarters with firmware source request. Will wait...

I have a dir320 nru router
it a multiple problem
1. flash - SPI
2. chip Ralink RT5350
OpenWrt trunk no have this driver..................
i found part of driver in WiveNG router project

git clone git://gitorious.org/wive-rtnl-ralink-rt305x-routers-firmware/wive-rtnl-ralink-rt305x-routers-firmware.git Wive-RTNL/

in kernel config chose target RT5350 and driver for this chip

2emlot - please post a photo or manual how to connect UART console to board

Thanks, EugeneSCH, will have a look

Console wiring. NRU version does not have soldered pins, only placeholders on the board. Wires have to be connected with solder there. Look:
http://img-fotki.yandex.ru/get/3416/23255069.0/0_71d77_b3aab861_orig.jpg
Note! Console starts at 57600 bps, not 115200
Note! be careful with empty central contact -  it's +3.3. Do not shorten it to other wires.

(Last edited by elmot on 19 Dec 2011, 23:22)

The link http://forum.ixbt.com/topic.cgi?id=14:49199-100  says that it dir320NRU = DIR300NR B5 only without USB
photo of board
http://s017.radikal.ru/i417/1111/77/72eabc83b169t.jpg - dir 320NRU
http://s017.radikal.ru/i405/1111/57/c113dc422773t.jpg - dir300NRU B5

this is true. if you download and unzip the firmware for them it is seen that the kernel and root file system is identical.
Dir 300B5 firmware - ftp://ftp.dlink.ru/pub/Router/DIR-300_N … 110414.fwz
it a TAR archive

Dir320B1 firmware ftp://ftp.dlink.ru/pub/Router/DIR-320_N … 110803.bin
decompressing it with BINWALK, DD, SQUASHFS_3.2 tools


dir300nrub5 source here -
http://ftp.dlink.ru/pub/Router/DIR-300_ … 94.tar.bz2

---------------------
Upd
Testing .....
take the kernel of dir300b5, load on the tftp - download goes well. the system starts up.
then compile the source code from dlink ftp, pack to u-boot , load and get the garbage to the console.

(Last edited by EugeneSCH on 26 Dec 2011, 05:50)

I don't know. Is OpenWRT working on Dir-320 nru or NOT?

No, it does not.

(Last edited by elmot on 13 Jan 2012, 20:29)

in dd-wrt forum http://www.dd-wrt.com/phpBB2/viewtopic. … d4a96810c5

get dir600b5 source, then compile kernel with default params
boot from tftp
normal boot only mtd not recognizing corrctly

Starting kernel ...


LINUX started...

 THIS IS ASIC
is_RT3052 = 0, is_RT3352 = 0
is_RT3350 = 0, is_RT5350 = 1
Linux version 2.6.33.2 (user@gw1) (gcc version 4.3.3 (GCC) ) #1 Thu Jan 19 00:00                                                                             :49 YEKT 2012

 The CPU feqenuce set to 360 MHz
bootconsole [early0] enabled
CPU revision is: 0001964c (MIPS 24Kc)
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Zone PFN ranges:
  DMA      0x00000000 -> 0x00001000
  Normal   0x00001000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock1 noinitrd
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
Writing ErrCtl register=0003251f
Readback ErrCtl register=0003251f
Memory: 28976k/32768k available (2623k kernel code, 3792k reserved, 613k data, 1                                                                             52k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:128
setup_irq 6
CPU frequency 360.00 MHz
[debug] (r4k_clockevent_init line: 172)
[debug] 128 aba9500 (r4k_clockevent_init line: 176)
[debug] (r4k_clockevent_init line: 185)
[debug] irq: 5 , 800086d4 , (r4k_clockevent_init line: 195)
4,[debug] (r4k_clockevent_init line: 217)
5,[debug] (r4k_clockevent_init line: 222)
setup_irq 5
[debug] (r4k_clockevent_init line: 228)
If the above line no "setup_irq 5", mean irq for timer is not installed
Calibrating delay loop... 239.61 BogoMIPS (lpj=479232)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 8192 (order: 3, 32768 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Load RT2880 Timer Module(Wdg/Soft)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
alg: No test for lzma (lzma-generic)
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler cfq registered (default)
Ralink gpio driver initialized
HDLC line discipline maxframe=4096
N_HDLC line discipline registered.
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A
console [ttyS1] enabled, bootconsole disabled12) is a 16550A
console [ttyS1] enabled, bootconsole disabled
deice id : ef 40 17 0 0 (40170000)
25064BVSIG(ef 40170000) (8192 Kbytes)
mtd .name = raspi, .size = 0x00800000 (0M) .erasesize = 0x00000008 (0K) .numeras                                                                             eregions = 65536
Creating 8 MTD partitions on "raspi":
0x000000000000-0x000000800000 : "rootfs"
0x000000050000-0x0000003e0000 : "upgrade"
0x000000040000-0x000000050000 : "devconf"
0x000000030000-0x000000040000 : "devdata"
0x0000003e0000-0x000000400000 : "langpack"
0x000000000000-0x000000400000 : "flash"
0x000000000000-0x000000030000 : "u-boot"
0x000000030000-0x000000038000 : "boot env"
MAC_ADRH -- : 0x00000000
MAC_ADRL -- : 0x00000000
Ralink APSoC Ethernet Driver Initilization. v2.0  256 rx/tx descriptors allocate                                                                             d, mtu = 1500!
eth2: set mac address
MAC_ADRH -- : 0x0000000c
MAC_ADRL -- : 0x43288081
PROC INIT OK!
rt3052 access driver initialization.
PPP generic driver version 2.4.2
PPP MPPE Compression module registered
NET: Registered protocol family 24
skb rate limit initialization.
GACT probability NOT on
u32 classifier
    Actions configured
nf_conntrack version 0.5.0 (452 buckets, 1808 max)
nf_conntrack_rtsp v0.6.21 loading
nf_conntrack_rtsp  port #0: 554
nf_conntrack_rtsp  port #1: 557
xt_time: kernel timezone is -0000
nf_nat_rtsp v0.6.21 loading
BCM fast NAT: INIT
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
List of all partitions:
1f00            8192 mtdblock0 (driver?)
1f01            8192 mtdblock1 (driver?)
1f02            3648 mtdblock2 (driver?)
1f03              64 mtdblock3 (driver?)
1f04              64 mtdblock4 (driver?)
1f05             128 mtdblock5 (driver?)
1f06            4096 mtdblock6 (driver?)
1f07             192 mtdblock7 (driver?)
1f08              32 mtdblock8 (driver?)
No filesystem could mount root, tried:  squashfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,1)

i dot need boot from mtd, work with usb flash

(Last edited by EugeneSCH on 19 Jan 2012, 03:59)

urrrgh/////////

resume

kernel from Wive-NG project was compile and boot dir320
in config - change cpu to 5350
RAM-32M
Disable autodetect RAM size
Device drive - MTD - RAlink - (0xE0000) MTD Kernel Partition Size
FS - JFFS2 support
etc on you need(usb,ipv6)
in openwrt add

console::askfirst:/bin/ash --login

to /etc/inittab to give console on UART interface
boot

Starting kernel ...

Linux version 2.6.21.8 (sfstudio_at_mail.ru@wive-ng.sf.net) (gcc version 4.5.3 (GCC) ) #0 Thu Feb 9 00:55:59 YEKT 2012
ASIC mode LINUX started...
The CPU frequency set to 360 MHz
CPU revision is: 0001964c (MIPS 24K)
Fixed Ramsize = 32 MBytes
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Built 1 zonelists.  Total pages: 8128
Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock4 ro init=/sbin/init
Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, linesize 32 bytes.
Synthesized clear page handler (25 instructions).
Synthesized copy page handler (44 instructions).
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
Cache parity protection disabled
cause = f080806c, status = 11000000
PID hash table entries: 128 (order: 7, 512 bytes)
calculating r4koff... 00057e40(360000)
CPU frequency 360.00 MHz
Using 180.000 MHz high precision timer.
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 29996k/32768k available (63k kernel code, 2772k reserved, 2241k data, 104k init, 0k highmem)
Mount-cache hash table entries: 512
softirq RT prio: 24.
NET: Registered protocol family 16
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
deice id : ef 40 17 0 0 (40170000)
W25Q64BV(ef 40170000) (8192 Kbytes)
mtd .name = raspi, .size = 0x00800000 (8M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
Creating 6 MTD partitions on "raspi":
0x00000000-0x00030000 : "Bootloader"
0x00030000-0x00040000 : "Config"
0x00040000-0x00050000 : "Factory"
0x00050000-0x00130000 : "Kernel"
0x00130000-0x007e0000 : "RootFS"
0x007e0000-0x00800000 : "RW-FS"
Load Timer Module(Wdg/Soft)
Load Ralink DFS Timer Module
NVRAM: Kernel NVRAM start init.
NVRAM: Particion 0 CRC a05a35aa OK.
NVRAM: initialized
squashfs: version 3.4 (2008/08/26) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
Ralink gpio driver initialized
Number of GPIO=52
Generic RTC Driver v1.07
Ralink APSoC Hardware Watchdog Timer
Serial: 8250/16550 driver $Revision: 1.6 $ 2 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0xb0000500 (irq = 37) is a 16550A
serial8250: ttyS1 at I/O 0xb0000c00 (irq = 12) is a 16550A
block2mtd: version $Revision: 1.1.1.1 $
i8042.c: i8042 controller self test timeout.
nf_conntrack version 0.5.0 (16384 buckets, 4096 max)
TCP cubic registered
ip_tables: (C) 2000-2006 Netfilter Core Team, NAT Fastpath init.
NET: Registered protocol family 1
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
Ralink HW NAT Module Load
VFS: Mounted root (squashfs filesystem) readonly.
mount /proc file system ok!
mount /sys file system ok!
mount /dev file system ok!
mount /var file system ok!
Freeing unused kernel memory: 104k freed
Build the /dev/console node.
init started: BusyBox v1.19.3 (2011-12-26 12:05:03 YEKT)

Please press Enter to activate this console. PPP generic driver version 2.4.2
PPP vpn led has gpio 14
NET: Registered protocol family 24
sysinit: ls: /sys/class/ieee80211: No such file or directory

sysinit: rm: can't remove 'leds': Read-only file system

sysinit: uci: I/O error

sysinit: rm: can't remove 'luci-i18n-english': Read-only file system

sysinit: uci: I/O error

sysinit: rm: can't remove 'luci-theme-openwrt': Read-only file system

sysinit: touch: /etc/config/network: Read-only file system

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: uci: Entry not found

sysinit: rm: can't remove 'network': Read-only file system

sysinit: uci: I/O error

sysinit: uci: I/O error

sysinit: uci: I/O error

sysinit: uci: I/O error

sysinit: uci: I/O error

sysinit: uci: I/O error

sysinit: uci: I/O error

sysinit: uci: I/O error

sysinit: uci: I/O error

sysinit: uci: I/O error

sysinit: portmap: fork: No such deviceiptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: iptables: No chain/target/match by that name.

sysinit: rootfs on / type rootfs (rw)

sysinit: /dev/root on / type squashfs (ro,noatime)

sysinit: proc on /proc type proc (rw,noatime)

sysinit: sysfs on /sys type sysfs (rw,noatime)

sysinit: tmpfs on /dev type tmpfs (rw,noatime)

sysinit: tmpfs on /tmp type tmpfs (rw,noatime)

sysinit: qwewrty

safdsf console



BusyBox v1.19.3 (2011-12-26 12:05:03 YEKT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 ATTITUDE ADJUSTMENT (bleeding edge, r29756) ----------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@OpenWrt:/#
 insmod raeth
[17179601.496000] MAC_ADRH -- : 0x00000000
[17179601.500000] MAC_ADRL -- : 0x00000000
[17179601.504000] Ralink APSoC Ethernet Driver Initilization. v2.0  256 rx/tx descriptors allocated, mtu = 1500!
[17179601.508000] MAC_ADRH -- : 0x0000000c
[17179601.512000] MAC_ADRL -- : 0x43305077
[17179601.516000] PROC INIT OK!

 ifconfig eth2 up
[17179651.548000]
[17179651.548000] phy_tx_ring = 0x01f98000, tx_ring = 0xa1f98000
[17179651.548000]
[17179651.548000] phy_rx_ring0 = 0x01f99000, rx_ring0 = 0xa1f99000
[17179651.552000] RT305x_ESW: Link Status Changed


root@(none):/# vconfig add eth2 1
root@(none):/# vconfig add eth2 2
root@(none):/# vconfig add eth2 3
root@(none):/# vconfig add eth2 4
root@(none):/# vconfig add eth2 5
root@(none):/# ifconfig eth2.1
eth2.1    Link encap:Ethernet  HWaddr 00:0C:43:30:50:77
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

 ifconfig eth2.5 hw ether 1C:7E:E5:D3:01:D1
[17179680.212000] eth2.5: Setting MAC address to  1c 7e e5 d3 01 d1.
[17179680.216000] device eth2 entered promiscuous mode
[17179680.220000] VLAN (eth2.5):  Setting underlying device (eth2) to promiscious mode.
root@(none):/# brctl addbr br0
br0 eth2.1
brctl addif br0 eth2.2
brctl addif br0 eth2.3
brctl addif br0 eth2.4
root@(none):/# brctl addif br0 eth2.1
[17179689.616000] device eth2.1 entered promiscuous mode
root@(none):/# brctl addif br0 eth2.2
[17179689.628000] device eth2.2 entered promiscuous mode
root@(none):/# brctl addif br0 eth2.3
[17179689.640000] device eth2.3 entered promiscuous mode
root@(none):/# brctl addif br0 eth2.4
[17179689.652000] device eth2.4 entered promiscuous mode
root@(none):/# ifconfig eth2.5 up
ifconfig eth2.4 up
ifconfig eth2.3 up
ifconfig eth2.2 up
ifconfig eth2.1 up
ifconfig br0 up

root@(none):/# ifconfig br0 192.168.0.1 netmask 255.255.255.0 up

root@(none):/# ping 192.168.0.100
PING 192.168.0.100 (192.168.0.100): 56 data bytes
64 bytes from 192.168.0.100: seq=0 ttl=128 time=2.046 ms
64 bytes from 192.168.0.100: seq=1 ttl=128 time=1.056 ms
64 bytes from 192.168.0.100: seq=2 ttl=128 time=0.983 ms

ifconfig eth2.5 10.9.27.99 netmask 255.255.255.0 up
root@(none):/# ping 10.9.27.1
PING 10.9.27.1 (10.9.27.1): 56 data bytes

--- 10.9.27.1 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss

any body know how openwrt work with vlan?
in original firmware

# ifconfig br0 down
[17179735.576000] br0: port 5(ra0) entering disabled state
[17179735.580000] br0: port 4(eth2.1) entering disabled state
[17179735.584000] br0: port 3(eth2.2) entering disabled state
[17179735.588000] br0: port 2(eth2.3) entering disabled state
[17179735.592000] br0: port 1(eth2.4) entering disabled state
# brctl delbr br0
[17179737.224000] device ra0 left promiscuous mode
[17179737.228000] br0: port 5(ra0) entering disabled state
[17179737.232000] eth2.1: dev_set_promiscuity(master, -1)
[17179737.236000] device eth2.1 left promiscuous mode
[17179737.240000] br0: port 4(eth2.1) entering disabled state
[17179737.244000] eth2.2: dev_set_promiscuity(master, -1)
[17179737.248000] device eth2.2 left promiscuous mode
[17179737.252000] br0: port 3(eth2.2) entering disabled state
[17179737.256000] eth2.3: dev_set_promiscuity(master, -1)
[17179737.260000] device eth2.3 left promiscuous mode
[17179737.264000] br0: port 2(eth2.3) entering disabled state
[17179737.268000] eth2.4: dev_set_promiscuity(master, -1)
[17179737.272000] device eth2 left promiscuous mode
[17179737.276000] device eth2.4 left promiscuous mode
[17179737.280000] br0: port 1(eth2.4) entering disabled state
#
# vconfig rem eth2.5
Removed VLAN -:eth2.5:-
# vconfig rem eth2.4
Removed VLAN -:eth2.4:-
# vconfig rem eth2.3
Removed VLAN -:eth2.3:-
# vconfig rem eth2.2
Removed VLAN -:eth2.2:-
# vconfig rem eth2.1
Removed VLAN -:eth2.1:-
# ifconfig
eth2      Link encap:Ethernet  HWaddr 1C:7E:E5:D3:01:D0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:127 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2823 (2.7 KiB)  TX bytes:10571 (10.3 KiB)
          Interrupt:3

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3009 (2.9 KiB)  TX bytes:3009 (2.9 KiB)

ra0       Link encap:Ethernet  HWaddr 1C:7E:E5:D3:01:D0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:252 (252.0 B)  TX bytes:0 (0.0 B)
          Interrupt:4

# vconfig add eth2 1
Added VLAN with VID == 1 to IF -:eth2:-
# vconfig add eth2 2
Added VLAN with VID == 2 to IF -:eth2:-
# vconfig add eth2 3
Added VLAN with VID == 3 to IF -:eth2:-
# vconfig add eth2 4
Added VLAN with VID == 4 to IF -:eth2:-
# vconfig add eth2 5
Added VLAN with VID == 5 to IF -:eth2:-
# brctl addbr br0
# brctl addif br0 eth2.1
[17179841.532000] device eth2.1 entered promiscuous mode
# brctl addif br0 eth2.2
[17179843.336000] device eth2.2 entered promiscuous mode
# brctl addif br0 eth2.3
[17179844.460000] device eth2.3 entered promiscuous mode
# brctl addif br0 eth2.4
[17179845.724000] device eth2.4 entered promiscuous mode
# ifconfig br0 192.168.0.1 netmask 255.255.255.0 up
#
# ifconfig eth2.5 hw ether  1C:7E:E5:D3:01:D1
[  132.628000] eth2.5: Setting MAC address to  1c 7e e5 d3 01 d1.
# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.1c7ee5d301d0       no              eth2.1
                                                        eth2.2
                                                        eth2.3
                                                        eth2.4
#
# ifconfig br0
br0       Link encap:Ethernet  HWaddr 1C:7E:E5:D3:01:D0
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:458 (458.0 B)  TX bytes:0 (0.0 B)

# ping 192.168.0.100
PING 192.168.0.100 (192.168.0.100): 56 data bytes
64 bytes from 192.168.0.100: seq=0 ttl=128 time=3.532 ms
64 bytes from 192.168.0.100: seq=1 ttl=128 time=0.986 ms

# ifconfig eth2.5 10.9.27.99 netmask 255.255.255.0 up
# ping 10.9.27.1
PING 10.9.27.1 (10.9.27.1): 56 data bytes
[  214.512000] RT305x_ESW: Link Status Changed
[  216.868000] RT305x_ESW: Link Status Changed
[  218.664000] RT305x_ESW: Link Status Changed
64 bytes from 10.9.27.1: seq=12 ttl=64 time=1011.370 ms
64 bytes from 10.9.27.1: seq=13 ttl=64 time=5.980 ms
64 bytes from 10.9.27.1: seq=14 ttl=64 time=0.954 ms
64 bytes from 10.9.27.1: seq=15 ttl=64 time=1.011 ms

what ??? where error??? vconfig wrong version?? driver ?? or ??
this bridge not working and when i give kernel & modules from original firmware and boot  it with FS from openwrt
if this problem was confirmed that only statupt scripts need edit to normal work

(Last edited by EugeneSCH on 13 Feb 2012, 12:33)

NExt,
for this work need to configure internal switch
it' configured with /bin/switch utility

# switch
Usage:
 switch dump                                 - dump switch table
 switch clear                                - clear switch table
 switch add [mac] [portmap]                  - add an entry to switch table
 switch add [mac] [portmap] [vlan idx]       - add an entry to switch table
 switch add [mac] [portmap] [vlan idx] [age] - add an entry to switch table
 switch ingress-rate on [port] [Mbps]        - set ingress rate limit on port 0~4
 switch egress-rate on [port] [Mbps]         - set egress rate limit on port 0~4
 switch ingress-rate off [port]              - del ingress rate limit on port 0~4
 switch egress-rate off [port]               - del egress rate limit on port 0~4
 switch filt [mac]                           - add an SA filtering entry (with portmap 1111111) to switch table
 switch filt [mac] [portmap]                 - add an SA filtering entry to switch table
 switch filt [mac] [portmap] [vlan idx]      - add an SA filtering entry to switch table
 switch filt [mac] [portmap] [vlan idx] [age]- add an SA filtering entry to switch table
 switch del [mac]                            - delete an entry from switch table
 switch del [mac] [vlan idx]                 - delete an entry from switch table
 switch vlan dump                            - dump switch table
 switch vlan set [vlan idx] [vid] [portmap]  - set vlan id and associated member
 switch reg r [offset]                       - register read from offset
 switch reg w [offset] [value]               - register write value to offset
#switch vlan dump
idx   vid  portmap
  0     1  1-----1
  1     2  -1----1
  2     3  --1---1
  3     4  ---1--1
  4     5  ----1-1
  5     6  1111111
  6     7  1111111
  7     8  1111111
  8     9  1111111
  9    10  1111111
 10    11  1111111
 11    12  1111111
 12    13  1111111
 13    14  1111111
 14    15  1111111
 15    16  1111111
# switch reg r 14
switch reg read offset=14, value=401555
# switch reg r 50
switch reg read offset=50, value=2001
# switch reg r 98
switch reg read offset=98, value=7f3f
# switch reg r e4
switch reg read offset=e4, value=1f
# switch reg r 40
switch reg read offset=40, value=2001
# switch reg r 44
switch reg read offset=44, value=4003
# switch reg r 48
switch reg read offset=48, value=1005
# switch reg r 70
switch reg read offset=70, value=48444241
# switch reg r 74
switch reg read offset=74, value=ffffff50

after config  with this code switch assotiated to vlan in prev message work fine

root@OpenWrt:/# ifconfig br0
br0       Link encap:Ethernet  HWaddr 1C:7E:E5:D3:01:D0
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::1e7e:e5ff:fed3:1d0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:642 errors:0 dropped:0 overruns:0 frame:0
          TX packets:388 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:60206 (58.7 KiB)  TX bytes:189778 (185.3 KiB)

root@OpenWrt:/# ping 192.168.0.100
PING 192.168.0.100 (192.168.0.100): 56 data bytes
64 bytes from 192.168.0.100: seq=0 ttl=128 time=0.902 ms
64 bytes from 192.168.0.100: seq=1 ttl=128 time=0.851 ms
64 bytes from 192.168.0.100: seq=2 ttl=128 time=0.812 ms
64 bytes from 192.168.0.100: seq=3 ttl=128 time=0.846 ms

--- 192.168.0.100 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.812/0.852/0.902 ms
root@OpenWrt:/# ping 10.9.27.1
PING 10.9.27.1 (10.9.27.1): 56 data bytes
64 bytes from 10.9.27.1: seq=0 ttl=64 time=2.491 ms
64 bytes from 10.9.27.1: seq=1 ttl=64 time=0.868 ms
64 bytes from 10.9.27.1: seq=2 ttl=64 time=0.863 ms
64 bytes from 10.9.27.1: seq=3 ttl=64 time=0.877 ms

--- 10.9.27.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.863/1.274/2.491 ms
root@OpenWrt:/# ip ro
10.9.27.0/24 dev eth2.5  proto kernel  scope link  src 10.9.27.99
192.168.0.0/24 dev br0  proto kernel  scope link  src 192.168.0.1
root@OpenWrt:/# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.1c7ee5d301d0       no              eth2.1
                                                        eth2.2
                                                        eth2.3
                                                        eth2.4

(Last edited by EugeneSCH on 21 Feb 2012, 06:20)

its work!
Network - work. (on boot, interface speed set to 10Mb\s, from console manual change it to 100
WiFI - wok, need test
USB - work
internal flash - work RW
overlayfs -not work, replace with mini_fo

Need testers with UART

EugeneSCH wrote:

its work!
Network - work. (on boot, interface speed set to 10Mb\s, from console manual change it to 100
WiFI - wok, need test
USB - work
internal flash - work RW
overlayfs -not work, replace with mini_fo

Need testers with UART

Can u upload firmware?

EugeneSCH wrote:

Need testers with UART

I have dir-320nru and usb-to-uart adapter. What should I do with uart?

Is there a way to install OpenWRT on the dir-320nru? Or, the process is still in beta? If possible, a link to a fresh discussion or installation instruction!

EugeneSCH wrote:

its work!
Network - work. (on boot, interface speed set to 10Mb\s, from console manual change it to 100
WiFI - wok, need test
USB - work
internal flash - work RW
overlayfs -not work, replace with mini_fo

Need testers with UART

Any continuation of this project? I'm trying to port RT5350 chip into OpenWRT. With me un-branded router with RT5350, 64MB DRAM and SPI Flash EN25Q64 (8M). Can you shed the light of which trunk version and changes you make to get it working?

Dear ugeneSCH

How to complie the kernel?

Is still in the testing phase of the process? Link to a new discussion or installation instructions!

The discussion might have continued from here.