glinet ar300m16 info

glinet ar300m16 info

 

 

1)identify what CPU is in the system?    
Qualcomm QCA9531-BL3A, @650MHz SoC

2)How much RAM does it have?
Memory: DDR2 128MB
Winbond W971GG6NB-25 DDR2 1Gbit

3)How much storage is available?
Storage: NOR Flash 16MB
Winbond w25q128 128Mbit
m25p80 spi0.0: w25q128 (16384 Kbytes)

 

Connecting to 192.168.11.1:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

WARNING! The remote SSH server rejected X11 forwarding request.


BusyBox v1.36.0 (2023-03-08 16:14:09 UTC) built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|
 \        \   DE /
  \    LE  \    /  -------------------------------------------
   \  DE    \  /    OpenWrt SNAPSHOT, r5714-0264267c2
    \________\/    -------------------------------------------

root@glinet:~# 
root@glinet:~# cat /etc/os-release 
NAME="OpenWrt"
VERSION="SNAPSHOT"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt SNAPSHOT"
VERSION_ID="snapshot"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r5714-0264267c2"
OPENWRT_BOARD="ath79/generic"
OPENWRT_ARCH="mips_24kc"
OPENWRT_TAINTS="no-all busybox"
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt SNAPSHOT r5714-0264267c2"
root@glinet:~# 
root@glinet:~# cat /proc/cpuinfo 
system type		: Qualcomm Atheros QCA9533 ver 2 rev 0
machine			: GL.iNet GL-AR300M16
processor		: 0
cpu model		: MIPS 24Kc V7.4
BogoMIPS		: 432.53
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 16
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16
Options implemented	: tlb 4kex 4k_cache prefetch mcheck ejtag llsc dc_aliases perf_cntr_intr_bit perf
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VCED exceptions		: not available
VCEI exceptions		: not available

root@glinet:~# 
root@glinet:~# opkg info kernel
Package: kernel
Version: 5.10.165-1-abf2e0d798db6cc11a74a8215e715cb8
Depends: libc
Status: install user installed
Architecture: mips_24kc
Installed-Time: 1678328004

root@glinet:~# 
root@glinet:~# uname -a
Linux glinet 5.10.165 #0 Thu Mar 9 02:13:24 2023 mips GNU/Linux
root@glinet:~# 
root@glinet:~# cat /proc/meminfo | grep -E "MemTotal|MemFree|MemAvailable"
MemTotal:         122176 kB
MemFree:           59820 kB
MemAvailable:      49292 kB
root@glinet:~# 
root@glinet:~# free -h
              total        used        free      shared  buff/cache   available
Mem:         122176       33304       59860         912       29012       49368
Swap:             0           0           0
root@glinet:~# 
root@glinet:~# dmesg | grep spi
[    0.388433] spi-nor spi0.0: w25q128 (16384 Kbytes)
[    0.393459] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.400096] Creating 4 MTD partitions on "spi0.0":
root@glinet:~# 
root@glinet:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00fa0000 00010000 "firmware"
mtd3: 00230000 00010000 "kernel"
mtd4: 00d70000 00010000 "rootfs"
mtd5: 00360000 00010000 "rootfs_data"
mtd6: 00010000 00010000 "art"
root@glinet:~# 
root@glinet:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                11.0M     11.0M         0 100% /rom
tmpfs                    59.7M    912.0K     58.8M   1% /tmp
/dev/mtdblock5            3.4M    684.0K      2.7M  20% /overlay
overlayfs:/overlay        3.4M    684.0K      2.7M  20% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@glinet:~# 
root@glinet:~# 

 

root@glinet:~# 
root@glinet:~# fw_printenv 
lf=if ping $serverip; then tftp 0x80060000 $firmware_name && erase $firmware_addr +$filesize && cp.b $fileaddr $firmware_addr $filesize; if nand bad; then run dlf; fi; else echo ping $serverip failed; fi
rlf=if ping $serverip; then tftp $loadaddr $firmware_name && erase $firmware_addr +$filesize && cp.b $fileaddr $firmware_addr $filesize && echo OK!; else echo ERROR! Server not reachable!; fi
dlf=if ping 192.168.1.2; then echo ok; elif ping 192.168.1.2; then echo ok; elif ping 192.168.1.2; then echo ok; elif echo ping 192.168.1.2; then echo ok; elif echo ping 192.168.1.2; then echo ok; else echo ping finally failed; fi; tftp 0x81000000 openwrt-gl-ar300m.img && nand erase && nand write $fileaddr 0 $filesize
firmware_addr=0x9f050000
firmware_name=openwrt-gl-ar300m.bin
lu=if ping $serverip; then tftp $loadaddr $uboot_name && erase $uboot_addr +$uboot_size && cp.b $fileaddr $uboot_addr $filesize && echo OK!; else echo ERROR! Server not reachable!; fi
lc=tftp 0x80100000 config.bin && cp.b 0x9fff0000 0x81000000 0xffff && cp.b 0x80100000 0x81000000 0x40 && cp.b 0x80100000 0x81001002 0x06 && erase 0x9fff0000 +0xffff && cp.b 0x81000000 0x9fff0000 0xffff
uboot_addr=0x9f000000
uboot_size=0x00050000
uboot_name=uboot-gl-ar300m.bin
bootlimit=3
bootargs=board=ar300m console=ttyS0,115200  ubi.mtd=5,2048 root=/dev/mtdblock8 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),128k(reserved),64k(art);spi0.1:2m(kernel),20m(rootfs),106m(data),22m@0x0(firmware) rootfstype=squashfs,jffs2 noinitrd
bootcmd=nboot 0x81000000 0 0
bootdelay=2
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.1.1
serverip=192.168.1.2
loadaddr=0x80800000
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
bootcount=8
root@glinet:~#

 

 

https://docs.gl-inet.com/en/2/hardware/ar300m/

This is only valid in the new uboot (from Mar 2017).

First ssh to the router and set uboot env boot_dev

$ fw_printenv
$ fw_setenv boot_dev on
$ reboot

Then when the router boot, the router will choose which firmware to boot using the hardware switch. 1. Left side (near the reset button) --> Nand flash 2. Right side --> Nor flash

To disable using the switch to choose firmware function, clear boot_dev variable.

$ fw_printenv
$ fw_setenv boot_dev
$ reboot

uboot tftp load firmware command

setenv serverip 192.168.1.3 && setenv ipaddr 192.168.1.2 && setenv bootfile openwrt-gl-ar300m.bin && tftp && erase 0x9f050000 +$filesize && cp.b 0x81000000 0x9f050000 $filesize && reset; 

 

 

 

=========== End

 

posted @ 2023-03-09 15:45  lsgxeva  阅读(131)  评论(0编辑  收藏  举报