AR-300M broken? No nand flash

On my new AR-300M with updated uboot no NAND flash is shown. Could it be the devicde is broken?

U-Boot 1.1.4-g36de7573 (Mar 17 2017 - 14:08:04)

DRAM:  128 MB
Nor Flash:  16 MB, sector count = 256
*** Warning *** : PCIe WLAN Module not found !!!
Protect off 9F040000 ... 9F04FFFF
Un-Protecting sectors 4..4 in bank 1
Un-Protected 1 sectors
Erasing Flash...Erasing flash...
First 0x4 last 0x4 sector size 0x10000                                                                                                                                 4
Erased 1 sectors
Writing to Flash... write addr: 9f040000
done
Protecting sectors 4..4 in bank 1
Protected 1 sectors
Warning: Bootlimit (3) exceeded. Using altbootcmd.
Un-Protect Flash Bank # 1
Hit any key to stop autoboot:  0
ath>

Furthermore “run nlf” is missing, so I have no chance to flash NAND Firmware:


ath> printenv
bootargs=board=CUS531-NAND 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=if nand bad; then nboot 0x81000000 0 || run blf; else run blf; fi
bootdelay=1
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.1.1
serverip=192.168.1.2
loadaddr=0x80800000
dir=
altbootcmd=run blf
blf=bootm 0x9f050000 || run lf; boot
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-ubi.img && nand erase && nand write $fileaddr 0 $filesize
wlf=if nand bad; then nand erase && nand write $web_fileaddr 0 $web_filesize; else erase 0x9f050000 +e30000 && cp.b $web_fileaddr 0x9f050000 $web_filesize; fi; erase 0x9f040000 +0x10000
rlf=if ping 192.168.1.2; then tftp 0x80060000 ${dir}openwrt-gl-ar300m.bin && erase 0x9f050000 +$filesize && cp.b $fileaddr 0x9f050000 $filesize; else echo ping 192.168.1.2 failed; fi
lu=tftp 0x80060000 ${dir}uboot_for_gl-ar300m.bin && erase 0x9f000000 +50000 && cp.b $fileaddr 0x9f000000 $filesize; reset
lf=if ping 192.168.1.2; then tftp 0x80060000 ${dir}openwrt-gl-ar300m.bin && erase 0x9f050000 +$filesize && cp.b $fileaddr 0x9f050000 $filesize; if nand bad; then run dlf; fi; else echo ping 192.168.1.2 failed; fi
lc=if ping 192.168.1.2; then tftp 0x81000000 config.bin && cp.b 0x9fff0040 0x81000040 0xffc0 && cp.b 0x81000000 0x81001002 0x06 && erase 0x9fff0000 +0xffff && cp.b 0x81000000 0x9fff0000 0xffff; else setenv bootcount 1 && saveenv && bootm 0x9fe80000; fi
ethact=eth0
stdin=serial
stdout=serial
stderr=serial
bootcount=2

Environment size: 1856/65532 bytes

@alpha1974, is it an AR300M-Lite? The NAND is not installed in them.

No no, it´s for sure an AR300-M (not Lite-Version). It seems that U-Boot 1.1.4-g36de7573 doesn´t support my NAND flash.

@alpha1974 Did you update the uboot or did it come that way?

I read on here somewhere the old uboot can be downloaded…

The question is, do you need the NAND?

I have an AR300-M booting NOR with LEDE 170104, luci, uhttpd, lighttpd, loads of php7 modules, usb storage packages, minidlna, and various other packages and there is still 8MB of free space :slight_smile:

Same problem here. When it arrived, I sure had the 128 MB flash.

Tried several different U-Boot (February, March, May), but now it doesn’t even show the NAND at boot:

U-Boot 1.1.4-g36de7573 (Feb 27 2017 - 14:14:52)

 

DRAM: 128 MB

Nor Flash: 16 MB, sector count = 256

*** Warning *** : PCIe WLAN Module not found !!!

Protect off 9F040000 … 9F04FFFF

Un-Protecting sectors 4…4 in bank 1

Un-Protected 1 sectors

Erasing Flash…Erasing flash…

First 0x4 last 0x4 sector size 0x10000 4

Erased 1 sectors

Writing to Flash… write addr: 9f040000

done

Protecting sectors 4…4 in bank 1

Protected 1 sectors

Un-Protect Flash Bank # 1

Hit any key to stop autoboot: 0

ath>

Normally there would be the NAND showing up.

ath> nand erase

 

no devices available

NAND erase shows “no devices available”. So I can’t flash the NAND, not with U-Boot and not with TFTP / UART.

What parameters / env are missing?!

Is your antennas black? On latest AR-300M nand module is optional!

https://store.gl-inet.com/collections/travel-routers/products/gl-ar300m-mini-smart-router

As I said i definitely have the 128 MB NAND flash. It showed up before I updated the UBoot.

Slightly off-topic but why did you start fiddling with you Uboot in the first place?

In order to make the switch work for choosing the boot device (NAND/NOR).

Hi

The attachment is the AR300M uboot.It contains the nand drivers,you can have a tyr

 

Thanks, I flashed it, but still no NAND there. btw i got two white antennas.

U-Boot 1.1.4-g36de7573 (May 16 2017 - 14:46:13)

DRAM:  128 MB
Nor Flash:  16 MB, sector count = 256
*** Warning *** : PCIe WLAN Module not found !!!
Protect off 9F040000 ... 9F04FFFF
Un-Protecting sectors 4..4 in bank 1
Un-Protected 1 sectors
Erasing Flash...Erasing flash...
First 0x4 last 0x4 sector size 0x10000                                         4
Erased 1 sectors
Writing to Flash... write addr: 9f040000
done
Protecting sectors 4..4 in bank 1
Protected 1 sectors
Un-Protect Flash Bank # 1
wdt reg 0 0
wdt reg 1 0
Hit any key to stop autoboot:  0
ath>

A google search of the error message has pointed me to this post. Any help would be appreciated.

U-Boot 1.1.4-g9abb38de (Aug 25 2016 - 08:51:31)

DRAM:  128 MB
Nor Flash:  16 MB, sector count = 256
*** Warning *** : PCIe WLAN Module not found !!!
NAND Flash:  128 MB, page size = 0x800 block size = 0x20000 oob size = 0x80
Protect off 9F040000 ... 9F04FFFF
Un-Protecting sectors 4..4 in bank 1
Un-Protected 1 sectors
Erasing Flash...Erasing flash...
First 0x4 last 0x4 sector size 0x10000                                         4
Erased 1 sectors
Writing to Flash... write addr: 9f040000
done
Protecting sectors 4..4 in bank 1
Protected 1 sectors
Warning: Bootlimit (3) exceeded. Using altbootcmd.
Hit any key to stop autoboot:  0
Device calibrated. Booting ...
## Booting image at 9f050000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.241
   Created:      2021-07-29  19:50:28 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1867915 Bytes =  1.8 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0x9f050040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 134217728

Starting kernel ...

[    0.000000] Linux version 4.14.241 (glinet@glinet) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11257-5090152ae3)) #0 Thu Jul 29 19:50:28 2021
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is GL.iNet GL-AR300M (NAND)
[    0.000000] SoC: Qualcomm Atheros QCA9533 ver 2 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x98/0x494 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 122404K/131072K available (4427K kernel code, 156K rwdata, 1008K rodata, 1244K init, 218K bss, 8668K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 650.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5880801374 ns
[    0.000009] sched_clock: 32 bits at 325MHz, resolution 3ns, wraps every 6607641598ns
[    0.008249] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)
[    0.074862] pid_max: default: 32768 minimum: 301
[    0.079929] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.086901] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.098488] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.108899] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.115424] pinctrl core: initialized pinctrl subsystem
[    0.122070] NET: Registered protocol family 16
[    0.133460] PCI host bridge /ahb/pcie-controller@180c0000 ranges:
[    0.139895]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.145444]   IO 0x0000000000000000..0x0000000000000000
[    0.150946] ar724x-pci 180c0000.pcie-controller: PCIe link is down
[    0.173175] PCI host bridge to bus 0000:00
[    0.177555] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.184798] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.190675] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.197828] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.208591] clocksource: Switched to clocksource MIPS
[    0.214892] NET: Registered protocol family 2
[    0.219741] IP idents hash table entries: 2048 (order: 2, 16384 bytes)
[    0.227259] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.234665] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.241383] TCP: Hash tables configured (established 1024 bind 1024)
[    0.248220] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.254424] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.261306] NET: Registered protocol family 1
[    0.268754] Crashlog allocated RAM at address 0x3f00000
[    0.275496] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.287233] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.293426] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.313741] io scheduler noop registered
[    0.317874] io scheduler deadline registered (default)
[    0.325442] pinctrl-single 1804002c.pinmux: 576 pins at pa b804002c size 72
[    0.333313] gpio-export gpio-export: 1 gpio(s) exported
[    0.339544] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.348474] console [ttyS0] disabled
[    0.352336] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 1562500) is a 16550A
[    0.361445] console [ttyS0] enabled
[    0.361445] console [ttyS0] enabled
[    0.369003] bootconsole [early0] disabled
[    0.369003] bootconsole [early0] disabled
[    0.396576] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.401528] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.408082] Creating 4 MTD partitions on "spi0.0":
[    0.413058] 0x000000000000-0x000000040000 : "u-boot"
[    0.419036] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.425253] 0x000000050000-0x000000ff0000 : "reserved"
[    0.431330] 0x000000ff0000-0x000001000000 : "art"
[    0.439742] spi-nand: Giga SPI NAND was found.
[    0.444349] spi-nand: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
[    0.452312] 2 fixed-partitions partitions found on MTD device spi0.1
[    0.458904] Creating 2 MTD partitions on "spi0.1":
[    0.463861] 0x000000000000-0x000000400000 : "kernel"
[    0.476823] 0x000000400000-0x000008000000 : "ubi"
[    0.870587] found bad block 6000000
[    0.930109] found bad block 7fe0000
[    0.934401] libphy: Fixed MDIO Bus: probed
[    1.279690] ag71xx 19000000.eth: Could not connect to PHY device. Deferring probe.
[    1.958980] libphy: ag71xx_mdio: probed
[    2.249056] mdio-bus.0:1f: Found an AR934X built-in switch
[    2.254889] libphy: ar7240sw_mdio: probed
[    2.316178] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    2.326061] eth1: Atheros AG71xx at 0xba000000, irq 5, mode: gmii
[    2.334306] NET: Registered protocol family 10
[    2.343281] Segment Routing with IPv6
[    2.347161] NET: Registered protocol family 17
[    2.351864] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.365259] 8021q: 802.1Q VLAN Support v1.8
[    2.568587] random: fast init done
[    2.710778] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:1f:04 [uid=004dd042, driver=Generic PHY]
[    2.721436] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
[    2.731040] UBI: auto-attach mtd5
[    2.734497] ubi0: attaching mtd5
[    6.913208] ubi0: scanning is finished
[    6.964968] ubi0: attached mtd5 (name "ubi", size 124 MiB)
[    6.970694] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    6.977790] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    6.984807] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    6.992002] ubi0: good PEBs: 990, bad PEBs: 2, corrupted PEBs: 0
[    6.998200] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
[    7.005668] ubi0: max/mean erase counter: 3/1, WL threshold: 4096, image sequence number: 221960438
[    7.015020] ubi0: available PEBs: 968, total reserved PEBs: 22, PEBs reserved for bad PEB handling: 18
[    7.024999] ubi0: background thread "ubi_bgt0d" started, PID 325
[    7.031607] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    7.039384] Please append a correct "root=" boot option; here are the available partitions:
[    7.048017] 1f00             256 mtdblock0
[    7.048021]  (driver?)
[    7.054776] 1f01              64 mtdblock1
[    7.054780]  (driver?)
[    7.061550] 1f02           16000 mtdblock2
[    7.061554]  (driver?)
[    7.068305] 1f03              64 mtdblock3
[    7.068307]  (driver?)
[    7.075071] 1f04            4096 mtdblock4
[    7.075075]  (driver?)
[    7.081835] 1f05          126976 mtdblock5
[    7.081840]  (driver?)
[    7.088603] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    7.098128] Rebooting in 1 seconds..
▒