タグ: WN-AC733GR3

WN-AC733GR3

WN-AC1167GRの作業にあたり、factoryファームの生成コードをある程度汎用化したく、おおよそヘッダが似通っているこの機種を確保。基板は9割方ELECOM WRC-733GHBKと同一だった。
弄るにあたってメモ。

Switch

zone WAN LAN
port
(WN-AC733GR3)
インターネット LAN4 LAN3 LAN2 LAN1
port
(RTL8367RB)
port0 port1 port2 port3 port4

MAC

Config (u-boot-env), eeprom内に有。

  • LAN: 34:76:C5:xx:xx:66 (Config, ethaddr (text))
  • WAN: 34:76:C5:xx:xx:65 (Config, wanaddr (text))
  • 2G: 34:76:C5:xx:xx:66 (Factory, 0x4 (hex))
  • 5G: 34:76:C5:xx:xx:67 (iNIC_rf, 0x4 (hex))

U-Boot

  • help
    MT7620 # help
    ?       - alias for 'help'
    bootm   - boot application image from memory
    elx_check      - check ELX image
    go      - start application at address 'addr'
    help    - print online help
    md      - memory display
    mdio   - Ralink PHY register R/W command !!
    mm      - memory modify (auto-incrementing)
    mw      - memory write (fill)
    nm      - memory modify (constant address)
    printenv- print environment variables
    reset   - Perform RESET of the CPU
    rf      - read/write rf register
    saveenv - save environment variables to persistent storage
    setenv  - set environment variables
    tftpboot- boot image via network using TFTP protocol
    version - print monitor version
    

  • version
    MT7620 # version
    
    U-Boot 1.1.3 (Jan 28 2013 - 19:01:11)
    

  • printenv
    MT7620 # printenv
    bootcmd=tftp
    baudrate=57600
    ethaddr="34:76:C5:**:**:66"
    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)
    language_code=jp
    hw_id=01040006
    domain=1
    pincode=01977608
    wlanaddr=00:aa:bb:cc:dd:10
    kver=2.00   
    sn=12345678901234567890123456789012
    usboot=0
    op_mode=1
    bver=4.0.1.5
    dom2=1
    wanaddr=34:76:C5:**:**:65
    bootdelay=2
    filesize=320000
    fileaddr=80A00000
    ipaddr=192.168.99.9
    serverip=192.168.99.8
    autostart=no
    bootfile=uImage_WN-AC733GR
    stdin=serial
    stdout=serial
    stderr=serial
    
    Environment size: 1040/4092 bytes
    

Kernel

パスワードが掛けられている。

  • uname -a
    # uname -a
    Linux WN-AC733GR 3.2.9 #3 Mon Dec 2 17:57:37 CST 2013 mips GNU/Linux
    

  • cat /proc/version
    # cat /proc/version
    Linux version 3.2.9 (root@***-pc) (gcc version 4.6.3 (Buildroot 2012.11.1) ) #3 Mon Dec 2 17:57:37 CST 2013
    

  • cat /proc/cpuinfo
    # cat /proc/cpuinfo
    system type             : Ralink MT7620   ver:2 eco:3
    machine                 : Ralink MT7620
    processor               : 0
    cpu model               : MIPS 24Kc V5.0
    BogoMIPS                : 385.02
    wait instruction        : yes
    microsecond timers      : yes
    tlb_entries             : 32
    extra interrupt vector  : yes
    hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ff8]
    ASEs implemented        : mips16
    shadow register sets    : 1
    kscratch registers      : 0
    core                    : 0
    VCED exceptions         : not available
    VCEI exceptions         : not available
    

  • cat /proc/meminfo
    # cat /proc/meminfo
    MemTotal:          61928 kB
    MemFree:           36104 kB
    Buffers:            2112 kB
    Cached:             8716 kB
    SwapCached:            0 kB
    Active:             5028 kB
    Inactive:           8248 kB
    Active(anon):       2640 kB
    Inactive(anon):      732 kB
    Active(file):       2388 kB
    Inactive(file):     7516 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                 0 kB
    Writeback:             0 kB
    AnonPages:          2464 kB
    Mapped:             1952 kB
    Shmem:               924 kB
    Slab:               6316 kB
    SReclaimable:        604 kB
    SUnreclaim:         5712 kB
    KernelStack:         672 kB
    PageTables:          452 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:       30964 kB
    Committed_AS:     349664 kB
    VmallocTotal:    1048372 kB
    VmallocUsed:        3448 kB
    VmallocChunk:    1034964 kB
    

  • cat /proc/mtd
    # cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00800000 00001000 "ALL"
    mtd1: 00030000 00001000 "Bootloader"
    mtd2: 00010000 00001000 "Config"
    mtd3: 00008000 00001000 "Factory"
    mtd4: 00008000 00001000 "iNIC_rf"
    mtd5: 006d4000 00001000 "Kernel"
    mtd6: 00584000 00001000 "user"
    mtd7: 0008c000 00001000 "manufacture"
    mtd8: 00010000 00001000 "backup"
    mtd9: 00040000 00001000 "storage"
    

  • ls -al /sys/class/leds/
    # ls -al /sys/class/leds/
    lrwxrwxrwx    1         0 Jan  1  2012 2g_led -> ../../devices/platform/leds-gpio/leds/2g_led
    lrwxrwxrwx    1         0 Jan  1  2012 5g_led -> ../../devices/platform/leds-gpio/leds/5g_led
    lrwxrwxrwx    1         0 Jan  1  2012 status -> ../../devices/platform/leds-gpio/leds/status
    lrwxrwxrwx    1         0 Jan  1  2012 power_led -> ../../devices/platform/leds-gpio/leds/power_led
    drwxr-xr-x   18         0 Jan  1  2012 ..
    drwxr-xr-x    2         0 Jan  1  2012 .
    

  • bootlog (op_mode=1)
    U-Boot 1.1.3 (Jan 28 2013 - 19:01:11)
    
    Board: Ralink APSoC DRAM:  64 MB
    
     Realtek giga Mac init!
    Disable port 0
    Ralink UBoot ver: 4.0.1.0
    ELX UBoot ver: 4.0.1.5 (Jan 28 2013 19:01:11)
    Date:Jan 28 2013  Time:19:01:11
    CPU: 580 MHz, MEM: 64 MB
    
    Please choose the operation: 1, 2, 3, 4, 9
                                                                                                                              0  
       
    3: System Boot system code via Flash.
    ## Booting image at bc050000 ...
       Image Name:   Linux Kernel Image
       Image Type:   MIPS Linux Kernel Image (lzma compressed)
       Data Size:    1374857 Bytes =  1.3 MB
       Load Address: 80000000
       Entry Point:  80246300
       Verifying Checksum ... OK
       Uncompressing Kernel Image ... OK
    No initrd
    ## Transferring control to Linux (at address 80246300) ...
    ## Giving linux memsize in MB, 64
    
    Starting kernel ...
    
    Ralink MT7620   ver:2 eco:3 running at 580.00 MHz
    console [ttyS1] enabled
    System Init version: 1.1 date: 1
    Setting up file systems ...
    Setting up /mnt/tmpfs directory with tmpfs/16384KB
    Setting up FLASH storage partition ...
    Setting up /apps directory ...apps is in FLASH ...
    Setting up loopback device ...
    FINISHED
    Start Normal Operation with Debug Messages ...
    cmd [start_all&]
    cmd [echo 0 > /sys/devices/platform/gpio-keys-polled/disable_intp]
    Application version:2.0.0.1              Date:2013/12/02
    
    ************************************************************************
    *                                ---ELX---                             *
    ************************************************************************
    
    KernelApp version: 2.0.0 build date: 2013/12/02 build time: 17:52:39
    cmd> cmd [sh /tmp/link_apps_to_root_dir.sh $1 $2 > /dev/null]
    ln: /sbin/./start_all: File exists
    cmd [rm -rf /tmp/link_apps_to_root_dir.sh]
    cmd [/sbin/dbox_init]
    ===  DBox Init start ==
    Dbox: used token len/max token len: 23/24, longest one is [wl1qos_priority_control]
    Dbox: used item len/max item len: 187/200
    Share memory created:  keyid 6888 shm_id 0 size 219(KB)
    Warning: dbox_destroy_share_memory p_dbox_cfg is NULL!
    cmd [/sbin/sd  &]
    CMD[mkdir -p /var/sd]
    __create_share_mem keyid 6888 shm_id 0
    CTRL_INTERFACE:[/var/sd_if]  CTRL_INTERFACE_IF:[if0]
    
    System Monitoring
    cmd [/sbin/sd_ctrl start_all]
    name [all]
    name [default]
    name [lo]
    name [imq0]
    name [imq1]
    name [eth2]
    name [eth2.1]
    name [eth2.2]
    name [br0]
    
    
    ********************
    Initialize Radio_(24G) setting ... rd[0]==1
    OK
    
    
    Configuring Ralink WiFi device ...Wlan is in AP Mode
    CMD[insmod /lib/rt2860v2_ap.ko]
    CMD[ifconfig ra0 0.0.0.0 up]
    CMD[iwpriv ra0 set RadioOn=0]
    CMD[ifconfig ra1 0.0.0.0 up]
    CMD[brctl addif br0 ra0]
    CMD[brctl addif br0 ra1]
    CMD[mkdir -p /etc/wsc_xml]
    CMD[ln -s /apps/etc/xml/* /etc/wsc_xml]
    CMD[route add -net 239.0.0.0 netmask 255.0.0.0 br0]
    CMD[wscd -i ra0 -m 1 -w /etc/wsc_xml -a 192.168.0.1&]
    CMD[iwpriv ra0 set IgmpSnEnable=0]
    CMD[iwpriv ra1 set IgmpSnEnable=0]
    CMD[iwpriv ra0 set RadioOn=1]
    CMD[iwpriv ra0 set WscConfMode=7]
    CMD[echo netdev > /sys/class/leds/2g_led/trigger]
    CMD[echo "ra0" > /sys/class/leds/2g_led/device_name]
    CMD[echo "link tx rx"> /sys/class/leds/2g_led/mode]
    CMD[iwpriv ra0 set WscMaxPinAttack=5]
    CMD[iwpriv ra0 set HtMIMOPS=3]
    
    
    ********************
    Initialize Radio_(5G) setting ... rd[1]==1
    OK
    Configuring 5G radio setting ... 
    
    Configuring Ralink WiFi device ...Wlan is in AP Mode
    CMD[insmod /lib/mt7610_ap.ko]
    wscd: SSDP UDP PORT = 1900
    CMD[ifconfig rai0 0.0.0.0 up]
    CMD[iwpriv rai0 set RadioOn=0]
    CMD[brctl addif br0 rai0]
    CMD[mkdir -p /etc/wsc_xml]
    CMD[ln -s /apps/etc/xml/* /etc/wsc_xml]
    ln: /etc/wsc_xml/WFAWLANConfigSCPD.xml: File exists
    CMD[route add -net 239.0.0.0 netmask 255.0.0.0 br0]
    route: SIOCADDRT: File exists
    CMD[wscd -i rai0 -m 1 -w /etc/wsc_xml -a 192.168.0.1&]
    CMD[iwpriv rai0 set IgmpSnEnable=0]
    wscd: SSDP UDP PORT = 1900
    CMD[iwpriv rai0 set RadioOn=1]
    CMD[iwpriv rai0 set WscConfMode=7]
    CMD[echo netdev > /sys/class/leds/5g_led/trigger]
    CMD[echo "rai0" > /sys/class/leds/5g_led/device_name]
    CMD[echo "link tx rx"> /sys/class/leds/5g_led/mode]
    CMD[iwpriv rai0 set WscMaxPinAttack=5]
    CMD[iwpriv rai0 set HtMIMOPS=3]
    --> default
    --> pppoeUnnumberMode 0
    --> DHCP_AR_MODE lan_dhcpd_enable
    WAN Speed = 1000 Mbps
    CMD[route add -net 239.0.0.0 netmask 255.0.0.0 br0]
    route: SIOCADDRT: File exists
    CMD[mkdir -p /etc/linuxigd]
    CMD[ln -sf /apps/etc/linuxigd/* /etc/linuxigd/.]
    CMD[upnpd -f  eth2.2 br0&]
    FAILED
    cmd [/sbin/taskmanager &]
    cmd [/sbin/xcontrol 2>/dev/null &]
    SEM_GETID got id -1
    Err: read_to_buf failed to open file /proc/454/status!
    Err: read_to_buf failed to open file /proc/455/status!
    XControl version: 1.0.0
    [XCONTROL DBG] if_dev_name:[eth2]
    We are using default MAC [00:AA:BB:CC:DD:10]
    server_socket 3
    socket timeout is 300
    WAN Speed = 1000 Mbps
    CMD[route add -net 239.0.0.0 netmask 255.0.0.0 br0]
    route: SIOCADDRT: File exists
    CMD[mkdir -p /etc/linuxigd]
    CMD[ln -sf /apps/etc/linuxigd/* /etc/linuxigd/.]
    send 15 to pid:1076
    CMD[upnpd -f  eth2.2 br0&]
    OK
    *** Task manager starts ***
    taskmanager update modules
    Err: read_to_buf failed to open file /proc/1153/status!
    taskmanager update modules
    failed to read /tmp/task_mgr.conf, use backup file!
    

広告