OpenWrt Forum Archive

Topic: ALFA R36 Router Hacking

The content of this topic has been archived between 25 Mar 2018 and 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

im having big problems getting this to boot built the firmware but i could of done it wrong this is what i'm getting


## Booting image at bf050000 ...
   Image Name:   MIPS OpenWrt Linux-3.3.5
   Created:      2012-05-14   8:41:15 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    833354 Bytes = 813.8 kB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32

Starting kernel ...

[    0.000000] Linux version 3.3.5 (traxsboy@traxsboy-Aspire-7720G) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #8 Mon May 14 09:41:11 BST 2012
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3350 id:1 rev:2 running at 320.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  console=ttyS1,115200n8 root=/dev/mtdblock4 board=W502U rootfstype=squashfs,jffs2 noinitrd rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=000076a0
[    0.000000] Readback ErrCtl register=000076a0
[    0.000000] Memory: 29968k/32768k available (1911k kernel code, 2800k reserved, 319k data, 168k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 212.58 BogoMIPS (lpj=1062912)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.090000] Mount-cache hash table entries: 512
[    0.100000] NET: Registered protocol family 16
[    0.110000] MIPS: machine is ALFA Networks W502U
[    0.110000] gpiochip_add: registered GPIOs 0 to 23 on device: RT305X-GPIO0
[    0.120000] gpiochip_add: registered GPIOs 24 to 39 on device: RT305X-GPIO1
[    0.120000] gpiochip_add: registered GPIOs 40 to 51 on device: RT305X-GPIO2
[    0.140000] bio: create slab <bio-0> at 0
[    0.150000] Switching to clocksource MIPS
[    0.160000] NET: Registered protocol family 2
[    0.170000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.180000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.180000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.200000] TCP reno registered
[    0.200000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.210000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.210000] NET: Registered protocol family 1
[    0.260000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.270000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.280000] msgmni has been set to 58
[    0.290000] io scheduler noop registered
[    0.290000] io scheduler deadline registered (default)
[    0.300000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.300000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.310000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.320000] physmap platform flash device: 00800000 at bf000000
[    0.330000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022cb
[    0.340000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.350000]   Amd/Fujitsu Extended Query version 1.1.
[    0.350000] number of CFI chips: 1
[    0.370000] TCP westwood registered
[    0.380000] NET: Registered protocol family 17
[    0.380000] 8021q: 802.1Q VLAN Support v1.8
[    0.390000] VFS: Cannot open root device "mtdblock4" or unknown-block(0,0)
[    0.390000] Please append a correct "root=" boot option; here are the available partitions:
[    0.400000] 1f00            8192 mtdblock0  (driver?)
[    0.410000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

so far I've got it to boot from the sysupgrade file from a generic build going to test it more to see how it goes used option 2 and it booted

traxsboy - are you saying you got it booting using the openwrt-ramips-rt305x-w502u-squashfs-sysupgrade.bin build after compiling?

I've got it successfully booting via the aforementioned option 2 and tftp flashing the openwrt-ramips-rt305x-w502u-squashfs-sysupgrade.bin build after compiling from svn.

I'm going to attempt a web interface .img file, if I can get it working I'll update the wiki page for the R36/w502u since they are the same.

Anyone else even still interested in this? Took me long enough to pull this project back out and hack on it, and I don't see much traffic on it these days.


edit: quick dump of what I've got on pastebin. I'm going to clean it up and write a "how to" based on the serial option 2 flash of the w502u build. http://pastebin.com/T1Vv67Sx

(Last edited by badger32d on 6 Sep 2012, 19:54)

>Anyone else even still interested in this? Took me long enough to pull this project back out and hack on it, and I don't see much traffic on it these days.

we are definitely interested and actively using this board with openwrt.  It works very well.  We dont install from the sysupgrade however. we install the kernel and squashfs as two separate images.

I tried the kernel and squashfs several times as per ma.terol's guide on page 1 comment 6. Failed every time. Rebuilt without the HW550-3G designation (so all ramips-305x boards) and flashed the w502u image, that is what worked for me.

I'd be interested in how to do the other method - I'm addicted to tinkering with this right now, so it's a good time to figure this all out!

Thanks for the response lsoltero, I look forward to hearing what others are doing with this.

--Badger

what works for us is to build from a current svn update using RT288x/RT3xxx and RT305x based boards.
then select option 4 from uboot and ... where cp.b is modified appropriately for the size of the image.



setenv bootargs 'console=ttyS1,115200n8 root=/dev/mtdblock4 board=W502U rootfstype=squashfs,jffs2 noinitrd'
saveenv


tftp 0x80600000 openwrt-ramips-rt305x-uImage.bin
erase 0xbf050000 0xbf11ffff
cp.b 0x80600000 0xbf050000 c933b

tftp 0x80600000 openwrt-ramips-rt305x-root.squashfs
erase 0xbf120000 0xbf7fffff
cp.b 0x80600000 0xbf120000 003a0000

I'll try again - the only difference in what I did was the board in bootargs, I compiled for and used the HW550-3G. I did change the image size in the cp.b statement, but maybe the 550 build was corrupt.

Thanks for the response again.

--Badger

hello all,

so... i just did an svn update to get to the latest version of attitude adjustment and guess what... the ethernet ports now seem to be broken again.  The VLAN s get created but neither static or DHCP address are assigned to the units.  You can manually use ifconfig to assign the adaptes static IP addresses and you can ping then while logged in to the router but not over the network.  This was the same symptom we had before

https://dev.openwrt.org/changeset/29969

however... i just checked and the patch has been applied to the new code.  So its a mystery to me why this is not working.

I have a version of AA with kernel 3.2.5 that runs fine on this board.  However,  kernel 3.3.8 does not....

anyone have any ideas how to get the ethernet ports working again?

BTW... the wifi and all other devices seem to work as before.  So... as far as I can tell only the Ethernet ports are broken although I do get the occasinal watch dog reset in the kernel logs.

--luis

Hi,

Attempting to install openwrt to R36, I can't get any serial data from R36. Any help would be appreciated.

Here is what I have been doing so far: Connect the pins as shown in picture:

http://www.image-share.com/upload/1793/285m.jpg

Then execute this on bus pirate:

HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
9. DIO
x. exit(without change)

(1)>3
Set serial port speed: (bps)
 1. 300
 2. 1200
 3. 2400
 4. 4800
 5. 9600
 6. 19200
 7. 38400
 8. 57600
 9. 115200
10. BRG raw value

(1)>9
Data bits and parity:
 1. 8, NONE *default
 2. 8, EVEN
 3. 8, ODD
 4. 9, NONE
(1)>1
Stop bits:
 1. 1 *default
 2. 2
(1)>1
Receive polarity:
 1. Idle 1 *default
 2. Idle 0
(1)>1
Select output type:
 1. Open drain (H=Hi-Z, L=GND)
 2. Normal (H=3.3V, L=GND)

(1)>1
Ready
UART>(0)
 0.Macro menu
 1.Transparent bridge
 2. Live monitor
 3.Bridge with flow control
UART>(1)
UART bridge
Reset to exit
Are you sure? y 

As far as I understand, this switches bus pirate to transparent bridge mode and should display output from R36 serial interface, but I am getting no output at all. I have tried enabling/disabling flow control, changing rx/tx pins around. I also tried loopback test on bus pirate which worked OK.

thanks
Karolis

the serial port pinout for the w502u is identical to that of the Hornet.   Pin 1 is the one closest to the USB connector.
serial port settings are 115200,8,n,1 no flow control or carrier detect.

take care

--luis

lsoltero wrote:

the serial port pinout for the w502u is identical to that of the Hornet.   Pin 1 is the one closest to the USB connector.

Not sure what the Hornet is, but I am quite sure I have the pins figured out. It should be GND / TX / RX / VCC starting from pin 1.


lsoltero wrote:

serial port settings are 115200,8,n,1 no flow control or carrier detect.

Isn't this exactly what I have bus pirate configured for? Since I am new to bus pirate, I copy/pasted the output here.

thanks,
Karolis

here is the link to the alfa hornet-ub
http://wiki.openwrt.org/toh/alfa.network/hornet-ub
you will find the pintout there.

if this is not working then either
1. your serial port lever converter is not working
2. you don't have the pins assigned correctly
3. your terminal emulator does not work the way you think it does (i use kermit on a mac)
4. your R36 is busted.

sorry i could not be of more help...

take care.

--luis

I'm having a problem flashing my Alfa Network R36 with OpenWRT (openwrt-ramips-rt305x-uImage.bin & openwrt-ramips-rt305x-root.squashfs) from SVN. There is an error saying "VFS: Cannot open root device "mtdblock4" or unknown-block(0,0)". I've tried to re-flash the R36 over & over getting stuck with this error.

This is the output of the step taken during the flashing:

U-Boot 1.1.3 (May 14 2012 - 14:18:32)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb0000
flash_protect ON: from 0xBF000000 to 0xBF01D423
flash_protect ON: from 0xBF030000 to 0xBF030FFF
============================================
Ralink UBoot Version: 3.3
--------------------------------------------
ASIC 3052_MP2 (Port5<->None)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: NOR Flash
Date:May 14 2012  Time:14:18:32
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

##### The CPU freq = 320 MHZ ####

SDRAM bus set to 16 bit
SDRAM size =32 Mbytes

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.
   9: Load Boot Loader code then write to Flash via TFTP.

You choosed 4

0


4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (May 14 2012 - 14:18:32)
RT3052 # setenv bootargs 'console=ttyS1,115200n8 root=/dev/mtdblock4 board=W502U
rootfstype=squashfs,jffs2 noinitrd'
RT3052 # saveenv
Saving Environment to Flash...
File: env_flash.c, Func: saveenv, Line: 302
copy old content: sect_addr: BF030000  env_addr: BF030000  offset: 00000000
Protect off BF030000 ... BF03FFFF

b_end =BF7FFFFF
Un-Protecting sectors 10..10 in bank 1
Un-Protected 1 sectors
Erasing Flash...
b_end =BF7FFFFF
Erase Flash from 0xbf030000 to 0xbf03ffff in Bank # 1

erase sector  = 10
sect = 10,s_last = 10,erase poll = 884456
done
Erased 1 sectors
Writing to Flash... done

b_end =BF7FFFFF
Protecting sectors 10..10 in bank 1
Protected 1 sectors
RT3052 # tftp 0x80600000 openwrt-ramips-rt305x-uImage.bin

netboot_common, argc= 3

NetTxPacket = 0x81FE5640

KSEG1ADDR(NetTxPacket) = 0xA1FE5640

NetLoop,call eth_halt !

NetLoop,call eth_init !
Trying Eth0 (10/100-M)

Waitting for RX_DMA_BUSY status Start... done

Header Payload scatter function is Disable !!

ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
TFTP from server 10.10.10.3; our IP address is 10.10.10.123
Filename 'openwrt-ramips-rt305x-uImage.bin'.

TIMEOUT_COUNT=10,Load address: 0x80600000
Loading: Got ARP REPLY, set server/gtwy eth addr (c8:2a:14:01:85:06)
Got it
T Got ARP REQUEST, return our IP
#
first block received
################################################################
         #################################################################
         ##################################
done
Bytes transferred = 839013 (ccd65 hex)
NetBootFileXferSize= 000ccd65
RT3052 # erase 0xbf050000 0xbf11ffff

b_end =BF7FFFFF
Erase Flash from 0xbf050000 to 0xbf11ffff in Bank # 1

erase sector  = 12
sect = 12,s_last = 24,erase poll = 923626

erase sector  = 13
sect = 13,s_last = 24,erase poll = 920885

erase sector  = 14
*sect = 14,s_last = 24,erase poll = 907302

erase sector  = 15
sect = 15,s_last = 24,erase poll = 912879

erase sector  = 16
*sect = 16,s_last = 24,erase poll = 949205

erase sector  = 17
sect = 17,s_last = 24,erase poll = 928922

erase sector  = 18
*sect = 18,s_last = 24,erase poll = 902496

erase sector  = 19
sect = 19,s_last = 24,erase poll = 938975

erase sector  = 20
sect = 20,s_last = 24,erase poll = 922256

erase sector  = 21
*sect = 21,s_last = 24,erase poll = 913729

erase sector  = 22
sect = 22,s_last = 24,erase poll = 913854

erase sector  = 23
*sect = 23,s_last = 24,erase poll = 925475

erase sector  = 24
sect = 24,s_last = 24,erase poll = 930973
done
Erased 13 sectors
RT3052 # cp.b 0x80600000 0xbf050000 ccd65
Copy to Flash...
Copy 839013 byte to Flash...
addr = 0xBF0B187E ,cnt=439527
addr = 0xBF113112 ,cnt=40019 done
RT3052 # tftp 0x80600000 openwrt-ramips-rt305x-root.squashfs

netboot_common, argc= 3

KSEG1ADDR(NetTxPacket) = 0xA1FE5640

NetLoop,call eth_halt !

NetLoop,call eth_init !
Trying Eth0 (10/100-M)

ETH_STATE_ACTIVE!!
*** ERROR: `serverip' not set
RT3052 #reset

U-Boot 1.1.3 (May 14 2012 - 14:18:32)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb0000
flash_protect ON: from 0xBF000000 to 0xBF01D423
flash_protect ON: from 0xBF030000 to 0xBF030FFF
============================================
Ralink UBoot Version: 3.3
--------------------------------------------
ASIC 3052_MP2 (Port5<->None)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: NOR Flash
Date:May 14 2012  Time:14:18:32
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

##### The CPU freq = 320 MHZ ####

SDRAM bus set to 16 bit
SDRAM size =32 Mbytes

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.
   9: Load Boot Loader code then write to Flash via TFTP.

You choosed 4

0


4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (May 14 2012 - 14:18:32)
RT3052 # tftp 0x80600000 openwrt-ramips-rt305x-root.squashfs

netboot_common, argc= 3

NetTxPacket = 0x81FE5640

KSEG1ADDR(NetTxPacket) = 0xA1FE5640

NetLoop,call eth_halt !

NetLoop,call eth_init !
Trying Eth0 (10/100-M)

Waitting for RX_DMA_BUSY status Start... done

Header Payload scatter function is Disable !!

ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
TFTP from server 10.10.10.3; our IP address is 10.10.10.123
Filename 'openwrt-ramips-rt305x-root.squashfs'.

TIMEOUT_COUNT=10,Load address: 0x80600000
Loading: Got ARP REPLY, set server/gtwy eth addr (c8:2a:14:01:85:06)
Got it
T #
first block received
################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########
done
Bytes transferred = 1703936 (1a0000 hex)
NetBootFileXferSize= 001a0000
RT3052 # erase 0xbf120000 0xbf7fffff

b_end =BF7FFFFF
Erase Flash from 0xbf120000 to 0xbf7fffff in Bank # 1

erase sector  = 25
sect = 25,s_last = 134,erase poll = 905793

erase sector  = 26
sect = 26,s_last = 134,erase poll = 913961

erase sector  = 27
*sect = 27,s_last = 134,erase poll = 914332

erase sector  = 28
sect = 28,s_last = 134,erase poll = 937357

erase sector  = 29
*sect = 29,s_last = 134,erase poll = 916634

erase sector  = 30
sect = 30,s_last = 134,erase poll = 917960

erase sector  = 31
*sect = 31,s_last = 134,erase poll = 911410

erase sector  = 32
sect = 32,s_last = 134,erase poll = 905120

erase sector  = 33
sect = 33,s_last = 134,erase poll = 921065

erase sector  = 34
*sect = 34,s_last = 134,erase poll = 915220

erase sector  = 35
sect = 35,s_last = 134,erase poll = 919786

erase sector  = 36
*sect = 36,s_last = 134,erase poll = 904544

erase sector  = 37
sect = 37,s_last = 134,erase poll = 907201

erase sector  = 38
*sect = 38,s_last = 134,erase poll = 906665

erase sector  = 39
sect = 39,s_last = 134,erase poll = 936327

erase sector  = 40
sect = 40,s_last = 134,erase poll = 941321

erase sector  = 41
*sect = 41,s_last = 134,erase poll = 893844

erase sector  = 42
sect = 42,s_last = 134,erase poll = 911130

erase sector  = 43
*sect = 43,s_last = 134,erase poll = 908383

erase sector  = 44
sect = 44,s_last = 134,erase poll = 924135

erase sector  = 45
*sect = 45,s_last = 134,erase poll = 935341

erase sector  = 46
sect = 46,s_last = 134,erase poll = 906005

erase sector  = 47
*sect = 47,s_last = 134,erase poll = 931963

erase sector  = 48
sect = 48,s_last = 134,erase poll = 916189

erase sector  = 49
sect = 49,s_last = 134,erase poll = 730565

erase sector  = 50
*sect = 50,s_last = 134,erase poll = 759247

erase sector  = 51
sect = 51,s_last = 134,erase poll = 905761

erase sector  = 52
*sect = 52,s_last = 134,erase poll = 927495

erase sector  = 53
sect = 53,s_last = 134,erase poll = 923289

erase sector  = 54
sect = 54,s_last = 134,erase poll = 931667

erase sector  = 55
*sect = 55,s_last = 134,erase poll = 894431

erase sector  = 56
sect = 56,s_last = 134,erase poll = 906941

erase sector  = 57
*sect = 57,s_last = 134,erase poll = 922321

erase sector  = 58
sect = 58,s_last = 134,erase poll = 945511

erase sector  = 59
*sect = 59,s_last = 134,erase poll = 905686

erase sector  = 60
sect = 60,s_last = 134,erase poll = 905562

erase sector  = 61
sect = 61,s_last = 134,erase poll = 913183

erase sector  = 62
*sect = 62,s_last = 134,erase poll = 925926

erase sector  = 63
sect = 63,s_last = 134,erase poll = 907480

erase sector  = 64
*sect = 64,s_last = 134,erase poll = 905694

erase sector  = 65
sect = 65,s_last = 134,erase poll = 935981

erase sector  = 66
*sect = 66,s_last = 134,erase poll = 944697

erase sector  = 67
sect = 67,s_last = 134,erase poll = 945201

erase sector  = 68
*sect = 68,s_last = 134,erase poll = 943822

erase sector  = 69
sect = 69,s_last = 134,erase poll = 918539

erase sector  = 70
sect = 70,s_last = 134,erase poll = 934037

erase sector  = 71
*sect = 71,s_last = 134,erase poll = 916747

erase sector  = 72
sect = 72,s_last = 134,erase poll = 905754

erase sector  = 73
*sect = 73,s_last = 134,erase poll = 905842

erase sector  = 74
sect = 74,s_last = 134,erase poll = 924517

erase sector  = 75
*sect = 75,s_last = 134,erase poll = 929249

erase sector  = 76
sect = 76,s_last = 134,erase poll = 936047

erase sector  = 77
sect = 77,s_last = 134,erase poll = 906590

erase sector  = 78
*sect = 78,s_last = 134,erase poll = 922481

erase sector  = 79
sect = 79,s_last = 134,erase poll = 941176

erase sector  = 80
*sect = 80,s_last = 134,erase poll = 894832

erase sector  = 81
sect = 81,s_last = 134,erase poll = 907660

erase sector  = 82
*sect = 82,s_last = 134,erase poll = 943173

erase sector  = 83
sect = 83,s_last = 134,erase poll = 913677

erase sector  = 84
*sect = 84,s_last = 134,erase poll = 968274

erase sector  = 85
sect = 85,s_last = 134,erase poll = 910459

erase sector  = 86
sect = 86,s_last = 134,erase poll = 924996

erase sector  = 87
*sect = 87,s_last = 134,erase poll = 966647

erase sector  = 88
sect = 88,s_last = 134,erase poll = 912712

erase sector  = 89
*sect = 89,s_last = 134,erase poll = 928316

erase sector  = 90
sect = 90,s_last = 134,erase poll = 913635

erase sector  = 91
*sect = 91,s_last = 134,erase poll = 923367

erase sector  = 92
sect = 92,s_last = 134,erase poll = 930663

erase sector  = 93
*sect = 93,s_last = 134,erase poll = 906048

erase sector  = 94
sect = 94,s_last = 134,erase poll = 907363

erase sector  = 95
sect = 95,s_last = 134,erase poll = 920027

erase sector  = 96
*sect = 96,s_last = 134,erase poll = 906230

erase sector  = 97
sect = 97,s_last = 134,erase poll = 918468

erase sector  = 98
*sect = 98,s_last = 134,erase poll = 910242

erase sector  = 99
sect = 99,s_last = 134,erase poll = 907736

erase sector  = 100
*sect = 100,s_last = 134,erase poll = 955930

erase sector  = 101
sect = 101,s_last = 134,erase poll = 917131

erase sector  = 102
sect = 102,s_last = 134,erase poll = 933836

erase sector  = 103
*sect = 103,s_last = 134,erase poll = 906082

erase sector  = 104
sect = 104,s_last = 134,erase poll = 939863

erase sector  = 105
*sect = 105,s_last = 134,erase poll = 923453

erase sector  = 106
sect = 106,s_last = 134,erase poll = 895255

erase sector  = 107
*sect = 107,s_last = 134,erase poll = 923853

erase sector  = 108
sect = 108,s_last = 134,erase poll = 926763

erase sector  = 109
*sect = 109,s_last = 134,erase poll = 906215

erase sector  = 110
sect = 110,s_last = 134,erase poll = 911742

erase sector  = 111
sect = 111,s_last = 134,erase poll = 937213

erase sector  = 112
*sect = 112,s_last = 134,erase poll = 909709

erase sector  = 113
sect = 113,s_last = 134,erase poll = 927478

erase sector  = 114
*sect = 114,s_last = 134,erase poll = 918589

erase sector  = 115
sect = 115,s_last = 134,erase poll = 906213

erase sector  = 116
*sect = 116,s_last = 134,erase poll = 908162

erase sector  = 117
sect = 117,s_last = 134,erase poll = 930556

erase sector  = 118
sect = 118,s_last = 134,erase poll = 935583

erase sector  = 119
*sect = 119,s_last = 134,erase poll = 917271

erase sector  = 120
sect = 120,s_last = 134,erase poll = 906237

erase sector  = 121
*sect = 121,s_last = 134,erase poll = 911978

erase sector  = 122
sect = 122,s_last = 134,erase poll = 920181

erase sector  = 123
*sect = 123,s_last = 134,erase poll = 907766

erase sector  = 124
sect = 124,s_last = 134,erase poll = 945507

erase sector  = 125
sect = 125,s_last = 134,erase poll = 920109

erase sector  = 126
*sect = 126,s_last = 134,erase poll = 934846

erase sector  = 127
sect = 127,s_last = 134,erase poll = 922319

erase sector  = 128
*sect = 128,s_last = 134,erase poll = 927529

erase sector  = 129
sect = 129,s_last = 134,erase poll = 895298

erase sector  = 130
*sect = 130,s_last = 134,erase poll = 921419

erase sector  = 131
sect = 131,s_last = 134,erase poll = 921916

erase sector  = 132
*sect = 132,s_last = 134,erase poll = 942516

erase sector  = 133
sect = 133,s_last = 134,erase poll = 923465

erase sector  = 134
sect = 134,s_last = 134,erase poll = 917343
done
Erased 110 sectors
RT3052 # cp.b 0x80600000 0xbf120000 1a0000
Copy to Flash...
Copy 1703936 byte to Flash...
addr = 0xBF181882 ,cnt=1304446
addr = 0xBF1E3150 ,cnt=904880
addr = 0xBF244A00 ,cnt=505344
addr = 0xBF2A67E8 ,cnt=104472 done
RT3052 # reset



This is the output after rebooting the R36:


U-Boot 1.1.3 (May 14 2012 - 14:18:32)

Board: Ralink APSoC DRAM:  32 MB
relocate_code Pointer at: 81fb0000
flash_protect ON: from 0xBF000000 to 0xBF01D423
flash_protect ON: from 0xBF030000 to 0xBF030FFF
============================================
Ralink UBoot Version: 3.3
--------------------------------------------
ASIC 3052_MP2 (Port5<->None)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: NOR Flash
Date:May 14 2012  Time:14:18:32
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

##### The CPU freq = 320 MHZ ####

SDRAM bus set to 16 bit
SDRAM size =32 Mbytes

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.
   9: Load Boot Loader code then write to Flash via TFTP.
0

3: System Boot system code via Flash.
## Booting image at bf050000 ...
   Image Name:   MIPS OpenWrt Linux-3.3.8
   Created:      2012-10-01  19:54:42 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    838949 Bytes = 819.3 kB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32

Starting kernel ...

[    0.000000] Linux version 3.3.8 (user@netbox) (gcc version 4.6.3 20120201 (pr
erelease) (Linaro GCC 4.6-2012.02) ) #1 Mon Oct 1 15:54:38 AST 2012
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3350 id:1 rev:2 running at 320.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag
es: 8128
[    0.000000] Kernel command line:  console=ttyS1,115200n8 root=/dev/mtdblock4
board=W502U rootfstype=squashfs,jffs2 noinitrd rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 byt
es
[    0.000000] Writing ErrCtl register=0002aac9
[    0.000000] Readback ErrCtl register=0002aac9
[    0.000000] Memory: 29820k/32768k available (1920k kernel code, 2948k reserve
d, 327k data, 172k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, No
des=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 212.58 BogoMIPS (lpj=1062912)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.090000] Mount-cache hash table entries: 512
[    0.100000] NET: Registered protocol family 16
[    0.110000] MIPS: machine is ALFA Networks W502U
[    0.110000] gpiochip_add: registered GPIOs 0 to 23 on device: RT305X-GPIO0
[    0.120000] gpiochip_add: registered GPIOs 24 to 39 on device: RT305X-GPIO1
[    0.120000] gpiochip_add: registered GPIOs 40 to 51 on device: RT305X-GPIO2
[    0.150000] bio: create slab <bio-0> at 0
[    0.160000] Switching to clocksource MIPS
[    0.170000] NET: Registered protocol family 2
[    0.180000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.190000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.190000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.200000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.210000] TCP reno registered
[    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.220000] NET: Registered protocol family 1
[    0.270000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.280000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY
) (c) 2001-2006 Red Hat, Inc.
[    0.290000] msgmni has been set to 58
[    0.300000] io scheduler noop registered
[    0.300000] io scheduler deadline registered (default)
[    0.310000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.310000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.320000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.330000] physmap platform flash device: 00800000 at bf000000
[    0.340000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manuf
acturer ID 0x0000c2 Chip ID 0x0022cb
[    0.350000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.360000]   Amd/Fujitsu Extended Query version 1.1.
[    0.360000] number of CFI chips: 1
[    0.380000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 40, u
sing 40
[    0.390000] TCP cubic registered
[    0.390000] NET: Registered protocol family 17
[    0.400000] 8021q: 802.1Q VLAN Support v1.8
[    0.400000] VFS: Cannot open root device "mtdblock4" or unknown-block(0,0)
[    0.410000] Please append a correct "root=" boot option; here are the availab
le partitions:
[    0.420000] 1f00            8192 mtdblock0  (driver?)
[    0.430000] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
wn-block(0,0)


Am I missing something or doing something wrong? Can anyone help me on this?

if using the AA 12.09 beta then in uboot select 2 and then point it to the sysupgrade.bin file.

however... note that the ethernet ports do not work in this build.

--luis

lsoltero wrote:

if using the AA 12.09 beta then in uboot select 2 and then point it to the sysupgrade.bin file.

however... note that the ethernet ports do not work in this build.

--luis

I got my R36 flashing successfully, but ran into the no ethernet problem you mentioned.  Is there a known working build that I should try to run?

yes...


we got the ethernet ports for the R36 working with the latest version of OpenWRT AA using the fix proposed by @gunther
https://dev.openwrt.org/ticket/12125#comment:12

this makes me suspect that @thess (https://dev.openwrt.org/ticket/12125#comment:13)

is correct when he states that the problem is caused by

In addition, the new esw driver expects the bootloader to have setup the switch config default for the router. Unfortunately, most Uboot based RT305x routers have the switch configured in "dump" mode where all ports are enabled and vlans disabled. I suspect there needs to be additional board specific setup (in mach_xxxx.c files) done for the default switch configuration on each these devices.


--luis

Thanks Luis,

Pulled from trunk and built, but still none of the interfaces work.  I haven't delved into the code yet, but is the AA branch different than the bleeding edge?

All that aside, I'm eager to start fiddling the code and figure out what's going on.

i wonder why that didn't work for you... i am using r34332 which is pretty close to bleeding edge.

try reverting to 34332 and then apply @gunthers work around.

see if have any luck with that you.  You should... i did....

lsoltero wrote:

i wonder why that didn't work for you... i am using r34332 which is pretty close to bleeding edge.

try reverting to 34332 and then apply @gunthers work around.

see if have any luck with that you.  You should... i did....

Ok I am new at this but slowly learning. If you don't mind me asking, What are you using for the config target profile? I could not get it to show the W502U in menuconfig.

you use the RT305X profile and then select Default for the target. this will build all of the RT305X routers.  The make will fail however if your image is larger than 4Mb since the Default profile builds both 8M and 4M images.  If you image is to be larger than 4Mb then you will need to edit the make files to either remove the 4Mb routers or add a profile specifically for the w502u router.

take care.

--luis

Thank you, I got it working. Now I have a problem when connecting as a client via a usb wifi card, everything connects but when doing a speed test I get around 400kbs on a 25mbps line... and if I put a little load on the router eventually the usb wifi locks up, I think it has somthing to do with mem... here is the top command without the router being under load.



Mem: 21484K used, 8504K free, 0K shrd, 2176K buff, 6916K cached
CPU:   0% usr   1% sys   0% nic  97% idle   0% io   0% irq   0% sirq
Load average: 0.00 0.01 0.11 1/46 7868
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
6632     1 root     S     1396   5%   1% hostapd -P /var/run/wifi-phy0.pid -B
7868   375 root     R     1508   5%   1% top
    3     2 root     SW       0   0%   0% [ksoftirqd/0]
  511     1 root     S     1540   5%   0% /sbin/netifd
  497     1 root     S     1516   5%   0% /sbin/syslogd -C16
6808   511 root     S     1516   5%   0% udhcpc -p /var/run/udhcpc-wlan1.pid -
    1     0 root     S     1512   5%   0% init
  374     1 root     S     1512   5%   0% init
1136     1 root     S     1508   5%   0% /usr/sbin/ntpd -n -p 0.openwrt.pool.n
5204   511 root     S     1508   5%   0% udhcpc -p /var/run/udhcpc-eth0.2.pid
  618     1 root     S     1508   5%   0% /sbin/watchdog -t 5 /dev/watchdog
  375     1 root     S     1508   5%   0% /bin/ash --login
1081     1 root     S     1500   5%   0% /usr/sbin/telnetd -l /bin/login.sh
  499     1 root     S     1496   5%   0% /sbin/klogd
6768     1 root     S     1392   5%   0% wpa_supplicant -B -P /var/run/wifi-wl
1089     1 root     S     1156   4%   0% /usr/sbin/uhttpd -f -h /www -r OpenWr
1068   507 root     S     1156   4%   0% /usr/sbin/dropbear -F -P /var/run/dro
  507     1 root     S     1020   3%   0% /sbin/procd
6888     1 nobody   S      956   3%   0% /usr/sbin/dnsmasq -C /var/etc/dnsmasq
  515   507 root     S <    876   3%   0% ubusd


When the wifi locks here is a snip of output from the console,



[  243.700000] [<80059e84>] 0x80059e84
[  243.700000] [<8002a988>] 0x8002a988
[  243.700000] [<800033d0>] 0x800033d0
[  243.700000] [<8002a900>] 0x8002a900
[  243.700000] [<800033c0>] 0x800033c0
[  243.700000]
[  243.700000] Mem-Info:
[  243.700000] Normal per-cpu:
[  243.700000] CPU    0: hi:    0, btch:   1 usd:   0
[  243.700000] active_anon:525 inactive_anon:33 isolated_anon:0
[  243.700000]  active_file:962 inactive_file:952 isolated_file:0
[  243.700000]  unevictable:0 dirty:0 writeback:0 unstable:0
[  243.700000]  free:68 slab_reclaimable:304 slab_unreclaimable:3484
[  243.700000]  mapped:379 shmem:101 pagetables:81 bounce:0
[  243.700000] Normal free:272kB min:720kB low:900kB high:1080kB active_anon:2100kB inactive_anon:132kB active_file:3848kB inactive_file:3808kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:32512kB mlocked:0kB dirty:0kB writeback:0kB mapped:1516kB shmem:404kB slab_reclaimable:1216kB slab_unreclaimable:13936kB kernel_stack:392kB pagetables:324kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
[  243.700000] lowmem_reserve[]: 0 0
[  243.700000] Normal: 20*4kB 16*8kB 0*16kB 0*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 272kB
[  243.700000] 2015 total pagecache pages
[  243.700000] 0 pages in swap cache
[  243.700000] Swap cache stats: add 0, delete 0, find 0/0
[  243.700000] Free swap  = 0kB
[  243.700000] Total swap = 0kB
[  243.700000] 8192 pages RAM
[  243.700000] 711 pages reserved
[  243.700000] 2223 pages shared
[  243.700000] 6243 pages non-shared
[  248.930000] wlan3: authenticate with 00:11:22:33:44:55
[  249.100000] wlan3: send auth to 00:11:22:33:44:55 (try 1/3)
[  249.310000] wlan3: send auth to 00:11:22:33:44:55 (try 2/3)
[  249.520000] wlan3: send auth to 00:11:22:33:44:55 (try 3/3)
[  249.730000] wlan3: authentication with 00:11:22:33:44:55 timed out
[  243.700000] Normal free:272kB min:720kB low:900kB high:1080kB active_anon:2100kB inactive_anon:132kB active_file:3848kB inactive_file:3808kB unevictable:0kB isolated(a



Has anyone else run into this issue, If so any ideas how to fix?

(Last edited by beyondcr on 8 Jan 2013, 12:41)

in my experience the w502u only works well for slow USB 1.1 (full speed) devices.  Higher speed devices such as USB sound cards will cause USB exceptions and kernel panics.

I suggest you look at the hornet board from the same company. It uses an AR9331 chipset and as long as your devices are 2.0 it works very well with the USB. USB 1.1 devices work as well but you need to have a 2.0 Hub installed between the route and the device.

Alfa does sell a complete router based on the hornet board called the AP121U. 

--luis

sorry for isoltero please!!send me go to mail firmware openwrt with patch gounter ramips changest 33298 for port ethernet??? new A.A 12.09 final not work in this router RT3050F ethernet port clouse!!! thanks!!

use the router R36 together alpha AWUS036H (RTL8187L)