Hi,
I would like to add support for mt7620n based Asus RT-N14U router. Device is curently running latest asus firmware which
is based on some older openwrt. I have telnet access to the shell and I was even able to build original firmware from source code.
For more information about hardware please see http://wikidevi.com/wiki/ASUS_RT-N14U.
There already seems to be support for ramips/mt7620n platform in trunk. So should I just add support for the board by providing
/target/linux/ramips/dts/RT-N14U.dts file? And if it so is there some more information about how to write those files?
Any help is welcome
full boot log(dmesg):
Linux version 2.6.36 (root@asus) (gcc version 4.2.4) #1 Wed Jul 17 08:14:35 CST 2013
The CPU feqenuce set to 580 MHz
ramsize = 64 MBytes
rambase not set, set to default (0x00000000)
PCIE: bypass PCIe DLL.
PCIE: Elastic buffer control: Addr:0x68 -> 0xB4
disable all power about PCIe
PCIE: PLL power down for MT7620N
CPU revision is: 00019650 (MIPS 24Kc)
Determined physical RAM map:
memory: 04000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00004000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00004000
On node 0 totalpages: 16384
free_area_init_node: node 0, pgdat 8031c710, node_mem_map 81000000
Normal zone: 128 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 16256 pages, LIFO batch:3
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 16256
Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock4 rootfstype=squashfs noinitrd
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
Writing ErrCtl register=0007f410
Readback ErrCtl register=0007f410
Memory: 61508k/65536k available (2643k kernel code, 4028k reserved, 544k data, 172k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:128
console [ttyS1] enabled
Calibrating delay loop... 386.04 BogoMIPS (lpj=772096)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
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: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
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
Load Ralink Timer0 Module
Load Ralink Timer1 Module
RT3xxx EHCI/OHCI init.
squashfs: version 4.0 (2009/01/31) Phillip Lougher
JFFS2 version 2.2 (NAND) (ZLIB) (RTIME) (c) 2001-2006 Red Hat, Inc.
msgmni has been set to 120
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered (default)
HDLC line discipline maxframe=4096
N_HDLC line discipline registered.
Ralink gpio driver initialized
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x10000500 (irq = 37) is a 16550A
serial8250: ttyS1 at MMIO 0x10000c00 (irq = 12) is a 16550A
brd: module loaded
deice id : ef 40 18 0 0 (40180000)
W25Q128BV(ef 40180000) (16384 Kbytes)
mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
partion 3: ffffffff f30000
partion 4: 16a340 e15cc0
#add mtd partition#
Creating 7 MTD partitions on "raspi":
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "nvram"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000f80000 : "linux"
0x00000016a340-0x000000f80000 : "rootfs"
0x000000f80000-0x000001000000 : "jffs2"
0x000000000000-0x000001000000 : "ALL"
rdm_major = 253
Allocate 4096 entries coherent memory for hw_nat. (327680 bytes)
SMACCR1 -- : 0x0000000c
SMACCR0 -- : 0x43762077
Ralink APSoC Ethernet Driver Initilization. v3.0 256 rx/tx descriptors allocated, mtu = 1500!
SMACCR1 -- : 0x0000000c
SMACCR0 -- : 0x43762077
PROC INIT OK!
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
PPTP driver version 0.8.5
IMQ driver loaded successfully. (numdevs = 2, numqueues = 1)
Hooking IMQ after NAT on PREROUTING.
Hooking IMQ before NAT on POSTROUTING.
u32 classifier
nf_conntrack version 0.5.0 (961 buckets, 3844 max)
matchsize=264
xt_time: kernel timezone is -0000
GRE over IPv4 demultiplexor driver
gre: can't add protocol
ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Linux
arp_tables: (C) 2002 David S. Miller
TCP cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 17
L2TP core driver, V2.0
PPPoL2TP kernel driver, V2.0
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: 172k freed
offset 0xb000 elapse 0ms
found private data block and skip it
Algorithmics/MIPS FPU Emulator v1.5
rt2860v2_ap: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
=== pAd = c051c000, size = 728632 ===
<-- RTMPAllocTxRxRingMemory, Status=0
<-- RTMPAllocAdapterBlock, Status=0
AP Driver version-2.7.1.6
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
SCSI subsystem initialized
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
rt3xxx-ehci rt3xxx-ehci: Ralink EHCI Host Controller
rt3xxx-ehci rt3xxx-ehci: new USB bus registered, assigned bus number 1
rt3xxx-ehci rt3xxx-ehci: irq 18, io mem 0x101c0000
rt3xxx-ehci rt3xxx-ehci: USB 0.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
rt3xxx-ohci rt3xxx-ohci: RT3xxx OHCI Controller
rt3xxx-ohci rt3xxx-ohci: new USB bus registered, assigned bus number 2
rt3xxx-ohci rt3xxx-ohci: irq 18, io mem 0x101c1000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usblp
usbcore: registered new interface driver asix
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver net1080
usbcore: registered new interface driver zaurus
Raeth v3.0 (Tasklet,SkbRecycle)
phy_tx_ring = 0x02719000, tx_ring = 0xa2719000
phy_rx_ring0 = 0x02714000, rx_ring0 = 0xa2714000
SMACCR1 -- : 0x000074d0
SMACCR0 -- : 0x2b3e7520
ESW: Link Status Changed - Port1 Link Down
CDMA_CSG_CFG = 81000000
GDMA1_FWD_CFG = 20710000
device vlan1 entered promiscuous mode
device eth2 entered promiscuous mode
RX DESC a2e93000 size = 2048
APSDCapable[0]=1
APSDCapable[1]=1
APSDCapable[2]=1
APSDCapable[3]=1
APSDCapable[4]=1
APSDCapable[5]=1
APSDCapable[6]=1
APSDCapable[7]=1
APSDCapable[8]=1
APSDCapable[9]=1
APSDCapable[10]=1
APSDCapable[11]=1
APSDCapable[12]=1
APSDCapable[13]=1
APSDCapable[14]=1
APSDCapable[15]=1
Key1Str is Invalid key length(0) or Type(0)
Key2Str is Invalid key length(0) or Type(0)
Key3Str is Invalid key length(0) or Type(0)
Key4Str is Invalid key length(0) or Type(0)
1. Phy Mode = 9
2. Phy Mode = 9
=>offset:[37] from [20] to [20]
=>offset:[50] from [82] to [82]
=>offset:[d0] from [22] to [22]
=>offset:[de] from [0c] to [01]
=>offset:[df] from [0c] to [01]
=>offset:[e0] from [08] to [00]
=>offset:[e1] from [04] to [00]
=>offset:[e2] from [02] to [00]
=>offset:[e3] from [00] to [00]
=>offset:[e4] from [08] to [00]
=>offset:[e5] from [04] to [00]
=>offset:[e6] from [02] to [00]
=>offset:[e7] from [00] to [00]
=>offset:[e8] from [08] to [fa]
=>offset:[e9] from [04] to [fa]
=>offset:[ea] from [02] to [fa]
=>offset:[eb] from [00] to [fa]
E2PROM: D0 target power=0xff22
E2PROM: 40 MW Power Delta= -2
3. Phy Mode = 9
AntCfgInit: primary/secondary ant 0/1
Initialize RF Central Registers for E2 !!!
Initialize RF Central Registers for E3 !!!
Initialize RF Channel Registers for E2 !!!
Initialize RF Channel Registers for E3 !!!
Initialize RF DCCal Registers for E2 !!!
Initialize RF DCCal Registers for E3 !!!
D1 = 0, D2 = 3, CalCode = 7 !!!
RT6352_Temperature_Init : BBPR49 = 0x0
RT6352_Temperature_Init : TemperatureRef25C = 0xfffffff6
Current Temperature from BBP_R49=0xffffffef
RT6352_TssiTableAdjust: upper_bound = 0x7F decimal: 127
RT6352_TssiTableAdjust: lower_bound = 0xFFFFFF80 decimal: -128
*** RT6352_TssiTableAdjust: G Tssi[-7 .. +7] = 125 11 8 8 126 10 14
- 11 - -1 -1 -1 -1 -1 -1 -1, offset=-10, tuning=0
RT6352_TssiTableAdjust: G Tssi[-7 .. +7] = 115 1 -2 -2 116 0 4 - 1 - -11 -11 -11 -11 -11 -11 -11, offset=-10, tuning=0
mp_temperature=0x00, step = -1
E2PROM: G Tssi[-7 .. +7] = 115 1 -2 -2 116 0 4 - 1 - -11 -11 -11 -11 -11 -11 -11, offset=-10, tuning=0
TX BW Filter Calibration !!!
RX BW Filter Calibration !!!
LOFT Calibration Done!
IQCalibration Start!
IQCalibration Done! CH = 0, (gain= 0, phase=3d)
IQCalibration Start!
IQCalibration Done! CH = 1, (gain= f, phase= 2)
TX IQ Calibration Done!
bAutoTxAgcG = 0
MCS Set = ff ff 00 00 01
rt635x_tssi0_dc is 0xffffffff
rt635x_tssi1_dc is 0xfffffff6
rt635x_tssi0_dc is 0xffffffff
rt635x_tssi1_dc is 0xfffffff6
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
SYNC - BBP R4 to 20MHz.l
rt635x_tssi0_dc is 0xffffffff
rt635x_tssi1_dc is 0xfffffff6
Main bssid = 74:d0:2b:3e:75:20
<==== rt28xx_init, Status=0
0x1300 = 00064380
device ra0 entered promiscuous mode
br0: topology change detected, propagating
br0: port 2(ra0) entering forwarding state
br0: port 2(ra0) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan1) entering forwarding state
br0: port 1(vlan1) entering forwarding state
set watchdog pid as: 233
Ralink HW NAT Module Enabled
ESW: Link Status Changed - Port1 Link UP
nf_conntrack_rtsp v0.6.21 loading
nf_nat_rtsp v0.6.21 loading
flash layout:
mtd0: 00030000 00010000 "Bootloader"
mtd1: 00010000 00010000 "nvram"
mtd2: 00010000 00010000 "Factory"
mtd3: 00f30000 00010000 "linux"
mtd4: 00e15cc0 00010000 "rootfs"
mtd5: 00080000 00010000 "jffs2"
mtd6: 01000000 00010000 "ALL"
lsmod:
nf_nat_sip 6292 0
nf_conntrack_sip 18340 1 nf_nat_sip
nf_nat_h323 5935 0
nf_conntrack_h323 37088 1 nf_nat_h323
nf_nat_rtsp 3822 0
nf_conntrack_rtsp 4622 1 nf_nat_rtsp
nf_nat_ftp 1348 0
nf_conntrack_ftp 5365 1 nf_nat_ftp
ip6table_filter 851 0
ip6table_mangle 1155 0
hw_nat 27828 0
zaurus 2264 0
net1080 3216 0
cdc_ether 3378 1 zaurus
asix 14847 0
usbnet 16682 4 zaurus,net1080,cdc_ether,asix
mii 3842 2 asix,usbnet
usblp 10698 0
ohci_hcd 15885 0
ehci_hcd 36936 0
vfat 9966 0
fat 53780 1 vfat
ext2 63977 0
ext3 128533 0
jbd 47882 1 ext3
mbcache 4890 2 ext2,ext3
usb_storage 38061 0
sg 23463 0
sd_mod 31124 0
crc_t10dif 1025 1 sd_mod
scsi_wait_scan 479 0
scsi_mod 90406 3 usb_storage,sg,sd_mod
usbcore 124742 10 zaurus,net1080,cdc_ether,asix,usbnet,usblp,ohci_hcd,ehci_hcd,usb_storage
nf_nat_pptp 1706 0
nf_conntrack_pptp 4073 1 nf_nat_pptp
nf_nat_proto_gre 1173 1 nf_nat_pptp
nf_conntrack_proto_gre 3333 1 nf_conntrack_pptp
rt2860v2_ap 1712432 1
nvram_linux 20380 27 rt2860v2_ap
/proc/cpuinfo:
system type : Ralink SoC
processor : 0
cpu model : MIPS 24Kc V5.0
BogoMIPS : 386.04
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
ASEs implemented : mips16 dsp
shadow register sets : 1
core : 0
VCED exceptions : not available
VCEI exceptions : not available
/proc/nvram
nvram driver : v0.05
nvram space : 0xf000
major number : 228
MTD
name : nvram
index : 1
type : NORFLASH
flags : 0xc00
size : 0x10000
erasesize : 0x10000
writesize : 0x1
private : 0xf, 0xb000 -> 0x10000 +0x800, 0x4cfb 1
rsv_blk_size : 0x1000
EDIT: I guess I found it (but still some response would be great).
http://www.devicetree.org/Device_Tree_Usage
flash layout:
0x0 0x30000 0x40000 0x50000 0xf800000 0x1000000
+--------------------------------------------------------------+
| boot | nvram | factory | linux | |
+--------------------------------------------------------------+
| | | | | rootfs | jfffs2 |
+--------------------------------------------------------------+
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "nvram"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000f80000 : "linux"
0x00000016a340-0x000000f80000 : "rootfs"
0x000000f80000-0x000001000000 : "jffs2"
0x000000000000-0x000001000000 : "ALL"
(Last edited by loblik on 3 Dec 2013, 19:37)