supported since r30809
https://dev.openwrt.org/changeset/30809/
Update:
I fixed the MAC issue, now it is properly fetched from flash.
initramfs and squashfs binaries are available here:
http://www.mediafire.com/?jdeuntsihok0bbj
http://www.mediafire.com/?x671x68to7s792s
diff file here: http://www.mediafire.com/?gk86srx8x1dfo8u
patch submitted: http://patchwork.openwrt.org/patch/1917/
===========================
Hi,
I have a generic wifi b/g/n router, the Board is marked XDX-RN502J. Very nice board with 32MB RAM, 4MB Flash, unpopulated USB port, small size. I have not tested the USB port yet, it seems to just miss the actual connector, nothing else. This looks very much like this router
http://www.aliexpress.com/product-gs/46 … alers.html
Placement of connectors, size and case are identical. USB port would match as well.
It apparently is the same board used in the Aceex NR22Y, which DD-WRT apparently supports. It is a ralink 3052 chip. As far as I know, this target now fully works, at the exception that the MAC addresses for the eth interfaces is not fetched correctly from the flash. Please help, I do not know how to fetch those values and get linux to use them. More information about this below. The MAC for wifi is fetched correctly thanks to the 10-rt2x00-eeprom but I do not know how to do the same with the eth MACs.
Here are the diffs that introduce a new xdxrn502j target : http://www.mediafire.com/?gk86srx8x1dfo8u
here is a build made with those diffs: http://www.mediafire.com/file/n4n73k25b … pgrade.bin
I hope they can be merged in OpenWRT and become part of the OpenWRT source tree.
I was able to flash the sysupgrade rootfs image to my board with the tftp and serial console method. Setup a tftp server with the bin file above.
You will need a USB serial adapter or a PC with an rs232 port (and a level shifter since these are 3.3 V signals). The PCB has a clearly marked console header, unpopulated. Starting with the pin closest to the J2/console label, we have: GND, Rx, Tx, Vcc pins. See below pictures of PCB.
Set your terminal to 57600 bauds, 8,N, 1.
You will see the following menu:
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.
choose 4. set e few environment variables so they conform to the following (depending on your tftp server IP, etc.). Important are: serverip, ipaddr, bootargs, bootfile, fileaddr
Then saveenv, then reboot and choose 2 this time.
You could also rebuild the image and choose the ramfs target, then use choice 1 to test without flashing. I actually used this mode for the longest time, until ready to take the jump and flash (today!)
U-Boot 1.1.3 (Apr 23 2009 - 12:08:28)
RT3052 # printenv
bootcmd=tftp
bootdelay=5
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)
autostart=no
bootfile=openwrt-ramips-rt305x-xdxrn502j-squashfs-sysupgrade.bin
loadt=tftp 0x80800000
filesize=22edaf
fileaddr=80800000
ipaddr=192.168.137.170
bootargs=board=XDXRN502J
serverip=192.168.137.108
stdin=serial
stdout=serial
stderr=serial
If someone knows how to get the HW MAC addresses setup, please tell me... The information is held in mtdblock2. See this dump:
root@OpenWrt:/# hexdump -C /dev/mtdblock2
00000000 52 30 01 01 00 0a 07 52 21 b4 ff ff ff ff ff ff |R0.....R!.......|
00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
00000020 ff ff ff ff ff ff ff ff 00 0a 07 52 21 b5 00 0a |...........R!...|
00000030 07 52 21 b6 22 08 24 00 ff ff 2a 01 55 77 a8 aa |.R!.".$...*.Uw..|
00000040 8c 88 ff ff 0c 00 00 00 00 00 00 00 00 00 ff ff |................|
00000050 ff ff 09 09 0a 0a 0a 0b 0b 0b 0c 0c 0c 0d 0d 0d |................|
00000060 14 14 14 15 15 15 15 15 15 16 16 16 16 16 ff ff |................|
00000070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000000d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff 66 66 |..............ff|
000000e0 cc aa 88 66 cc aa 88 66 cc aa 88 66 cc aa 88 66 |...f...f...f...f|
000000f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00010000
root@OpenWrt:/#
the wifi (and lan) interface has MAC 00:0A:07:52:21:B4. Others are same with B5 and B6 at the end. We can see at some offsets the macs for the lan/wan interfaces.
Original firmware (Ralink) boot log here: http://www.mediafire.com/?nbtn6p1vxjvnz23
Here are some annotated pictures of the pCB, with free GPIOs I identified :
http://www.mediafire.com/?kr7d4eq51247m78
http://www.mediafire.com/?ihwxabdlvw5a5mw
http://www.mediafire.com/?hb9148t042wx37w
http://www.mediafire.com/?prkqsh7lgfbs0u3
Here is the OpenWRT boot log:
##### The CPU freq = 384 MHZ ####
SDRAM bus set to 32 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-2.6.39.2
Created: 2012-02-20 15:37:49 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 813895 Bytes = 794.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 ...
Linux version 2.6.39.2 (bruno@bruno-laptop-u) (gcc version 4.5.4 20110526 (prerelease) (Linaro GCC 4.5-2011.06-0) ) #8 Mon Feb 20 16:36:52 CET 2012
bootconsole [early0] enabled
CPU revision is: 0001964c (MIPS 24Kc)
Ralink RT3052 id:1 rev:3 running at 384.00 MHz
Determined 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=XDXRN502J mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,1024k(kernel),2752k(rootfs),3776k@0x50000(firmware) 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=0000600b
Readback ErrCtl register=0000600b
Memory: 30000k/32768k available (1870k kernel code, 2768k reserved, 318k data, 152k init, 0k highmem)
SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:48
console [ttyS1] enabled, bootconsole disabled
console [ttyS1] enabled, bootconsole disabled
Calibrating delay loop... 255.59 BogoMIPS (lpj=1277952)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
MIPS: machine is XDX RN502J
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
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
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
msgmni has been set to 58
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
physmap platform flash device: 00800000 at bf000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
Amd/Fujitsu Extended Query Table at 0x0040
Amd/Fujitsu Extended Query version 1.1.
number of CFI chips: 1
6 cmdlinepart partitions found on MTD device physmap-flash.0
Creating 6 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000030000 : "u-boot"
0x000000030000-0x000000040000 : "u-boot-env"
0x000000040000-0x000000050000 : "factory"
0x000000050000-0x000000150000 : "kernel"
0x000000150000-0x000000400000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=2E0000, len=120000
0x0000002e0000-0x000000400000 : "rootfs_data"
0x000000050000-0x000000400000 : "firmware"
i2c /dev entries driver
TCP westwood registered
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>
VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
Freeing unused kernel memory: 152k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
JFFS2 notice: (297) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 5 of xref (0 dead, 2 orphan) found.
switching to jffs2
- init -
Please press Enter to activate this console. Compat-wireless backport release: compat-wireless-2011-06-23
Backport based on wireless-testing.git master-2011-06-22
cfg80211: Calling CRDA to update world regulatory domain
device eth0.1 entered promiscuous mode
device eth0 entered promiscuous mode
br-lan: port 1(eth0.1) entering forwarding state
br-lan: port 1(eth0.1) entering forwarding state
phy0 -> rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'RT305X.eeprom'.
phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 2872, rf: 0008, rev: 0200.
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (471 buckets, 1884 max)
cfg80211: World regulatory domain updated:
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
ramips-wdt: timeout value 60 must be 0 < timeout < 33
BusyBox v1.18.5 (2011-08-18 10:41:03 CEST) 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, r27943) ----------
* 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:/# ifconfig
br-lan Link encap:Ethernet HWaddr 00:11:22:33:44:55
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:794 (794.0 B) TX bytes:816 (816.0 B)
eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:814 (814.0 B) TX bytes:3330 (3.2 KiB)
Interrupt:5
eth0.1 Link encap:Ethernet HWaddr 00:11:22:33:44:55
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:814 (814.0 B) TX bytes:862 (862.0 B)
eth0.2 Link encap:Ethernet HWaddr 00:11:22:33:44:55
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:2418 (2.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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)
(Last edited by brainscrew on 26 Feb 2015, 22:13)