root@GL-AP1300:~# dmesg | grep -i nand
[ 0.279104] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 1.183316] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0x51
[ 1.183348] nand: GigaDevice GD5F1GQ5UE 128MiB 1.8V
[ 1.188858] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
root@GL-AP1300:~#
root@GL-AP1300:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 “0:SBL1”
mtd1: 00020000 00010000 “0:MIBIB”
mtd2: 00060000 00010000 “0:QSEE”
mtd3: 00010000 00010000 “0:CDT”
mtd4: 00010000 00010000 “0:DDRPARAMS”
mtd5: 00010000 00010000 “0:APPSBLENV”
mtd6: 00080000 00010000 “0:APPSBL”
mtd7: 00010000 00010000 “0:ART”
mtd8: 08000000 00020000 “rootfs”
mtd9: 003c1000 0001f000 “kernel”
mtd10: 019cb000 0001f000 “ubi_rootfs”
mtd11: 05cc2000 0001f000 “rootfs_data”
root@GL-AP1300:~#
Also, where can I get the old u-boot? I upgraded to uboot-gl-ap1300-b1300-s1300-b2200-20211021-md5-fd35bce37c3fb5086a2ce9049c2f7b6e.bin. I like the version the unit shipped with. I think it was a march version.
With the openwrt 21.02.1 image I get this:
[ 1.328804] Registering SWP/SWPB emulation handler
[ 1.342264] UBI error: cannot open mtd rootfs, error -2
[ 1.342317] UBI error: cannot open mtd ubi, error -2
[ 1.346318] hctosys: unable to open rtc device ˛[ 1.356979] Waiting for root device /dev/ubiblock0_1…
I think this is because it doesn’t detect NAND.
Full serial boot output:
U-Boot 2012.07 [local,local] (Oct 21 2021 - 18:08:35)
smem ram ptable found: ver: 1 len: 3
DRAM: 256 MiB
machid : 0x8010100
NAND: spi_nand: spi_nand_flash_probe SF NAND ID 0:c8:51:c8
SF: Detected GD5F1GQ5UE with page size 2 KiB, total 128 MiB
SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
ipq_spi: page_size: 0x100, sector_size: 0x1000, size: 0x400000
132 MiB
MMC:
In: serial
Out: serial
Err: serial
machid: 8010100
flash_type: 0
Net: MAC0 addr:94:83:c4:12:47:7e
PHY ID1: 0x4d
PHY ID2: 0xd0b1
ipq40xx_ess_sw_init done
eth0
Hit “gl” key to stop booting: 0
SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
Checking calibration status…
Device have calibrated,checking test status…
Device haven tested, checking MAC info…
Device have MAC info, starting firmware…
Creating 1 MTD partitions on “nand1”:
0x000000000000-0x000008000000 : “mtd=0”
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: volume 2 (“rootfs_data”) re-sized from 9 to 952 LEBs
UBI: attached mtd2 to ubi0
UBI: MTD device name: “mtd=0”
UBI: MTD device size: 128 MiB
UBI: number of good PEBs: 1024
UBI: number of bad PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 3
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 1024
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 1/0
Read 0 bytes from volume kernel to 84000000
No size specified → Using max size (3809280)
Booting kernel from FIT Image at 84000000 …
Using ‘config@ap.dk01.1-c2’ configuration
Trying ‘kernel@1’ kernel subimage
Description: ARM OpenWrt Linux-5.4.154
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x840000e4
Data Size: 3685817 Bytes = 3.5 MiB
Architecture: ARM
OS: Linux
Load Address: 0x80208000
Entry Point: 0x80208000
Hash algo: crc32
Hash value: 6a6c5c57
Hash algo: sha1
Hash value: 1dcda29481fc13b5f98976c5785b6bdfd1c0e656
Verifying Hash Integrity … crc32+ sha1+ OK
Flattened Device Tree from FIT Image at 84000000
Using ‘config@ap.dk01.1-c2’ configuration
Trying ‘fdt@1’ FDT blob subimage
Description: ARM OpenWrt glinet_gl-ap1300 device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x84383fdc
Data Size: 16382 Bytes = 16 KiB
Architecture: ARM
Hash algo: crc32
Hash value: 6f86adf2
Hash algo: sha1
Hash value: 522c5c9b2c833908d7f08da6b44d5a2fe18dcd47
Verifying Hash Integrity … crc32+ sha1+ OK
Booting using the fdt blob at 0x84383fdc
Uncompressing Kernel Image … OK
Loading Device Tree to 86ff9000, end 86fffffd … OK
ipq: fdt fixup unable to find compatible node
Using machid 0x8010100 from environment
Starting kernel …
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 SMP Sun Oct 24 09:01:35 2021
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: GL.iNet GL-AP1300
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 15 pages/cpu s30156 r8192 d23092 u61440
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64448
[ 0.000000] Kernel command line: ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait ubi.mtd=ubi root=/dev/ubiblock0_1 clk_ignore_unused
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 248624K/260096K available (5786K kernel code, 189K rwdata, 872K rodata, 1024K init, 241K bss, 11472K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from 0xc0a00bbc with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 48.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb11fd3bfb, max_idle_ns: 440795203732 ns
[ 0.000007] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns
[ 0.000021] Switching to timer-based delay loop, resolution 20ns
[ 0.000231] Calibrating delay loop (skipped), value calculated using timer frequency… 96.00 BogoMIPS (lpj=480000)
[ 0.000249] pid_max: default: 32768 minimum: 301
[ 0.000455] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.000472] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001486] CPU: Testing write buffer coherency: ok
[ 0.002535] Setting up static identity map for 0x80300000 - 0x80300060
[ 0.002675] rcu: Hierarchical SRCU implementation.
[ 0.003118] smp: Bringing up secondary CPUs …
[ 0.006219] smp: Brought up 1 node, 4 CPUs
[ 0.006240] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[ 0.006248] CPU: All CPU(s) started in SVC mode.
[ 0.010815] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.010979] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.011005] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.011228] pinctrl core: initialized pinctrl subsystem
[ 0.012272] NET: Registered protocol family 16
[ 0.012641] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.013899] cpuidle: using governor ladder
[ 0.013949] cpuidle: using governor menu
[ 0.034076] cryptd: max_cpu_qlen set to 1000
[ 0.037474] usbcore: registered new interface driver usbfs
[ 0.037546] usbcore: registered new interface driver hub
[ 0.037605] usbcore: registered new device driver usb
[ 0.037653] pps_core: LinuxPPS API ver. 1 registered
[ 0.037663] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
[ 0.037698] PTP clock support registered
[ 0.038375] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[ 0.039542] clocksource: Switched to clocksource arch_sys_counter
[ 0.040480] thermal_sys: Registered thermal governor ‘step_wise’
[ 0.040774] NET: Registered protocol family 2
[ 0.040946] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.041706] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.041750] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.041789] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.041837] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.041958] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.041999] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.042243] NET: Registered protocol family 1
[ 0.042286] PCI: CLS 0 bytes, default 64
[ 0.044212] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[ 0.050022] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.050038] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.101849] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[ 0.105201] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[ 0.105220] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[ 0.105909] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[ 0.106016] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[ 0.106112] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[ 0.106195] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[ 0.106505] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.108412] msm_serial 78af000.serial: msm_serial: detected port #0
[ 0.108459] msm_serial 78af000.serial: uartclk = 1843200
[ 0.108515] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 25, base_baud = 115200) is a MSM
[ 0.108543] msm_serial: console setup on port #0
[ 0.609614] printk: console [ttyMSM0] enabled
[ 0.614530] msm_serial: driver initialized
[ 0.623640] loop: module loaded
[ 0.624681] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[ 0.632321] random: fast init done
[ 0.635445] spi-nor spi0.0: w25q32 (4096 Kbytes)
[ 0.636144] 8 fixed-partitions partitions found on MTD device spi0.0
[ 0.640899] Creating 8 MTD partitions on “spi0.0”:
[ 0.647212] 0x000000000000-0x000000040000 : “SBL1”
[ 0.652760] 0x000000040000-0x000000060000 : “MIBIB”
[ 0.657400] 0x000000060000-0x0000000c0000 : “QSEE”
[ 0.662319] 0x0000000c0000-0x0000000d0000 : “CDT”
[ 0.667048] 0x0000000d0000-0x0000000e0000 : “DDRPARAMS”
[ 0.671896] 0x0000000e0000-0x0000000f0000 : “APPSBLENV”
[ 0.676824] 0x0000000f0000-0x000000170000 : “APPSBL”
[ 0.682129] 0x000000170000-0x000000180000 : “ART”
[ 0.687983] spi-nand spi0.1: unknown raw ID 00c851c8
[ 0.691124] spi-nand: probe of spi0.1 failed with error -524
[ 0.696875] libphy: ipq4019_mdio: probed
[ 0.726792] ESS reset ok!
[ 0.751047] ESS reset ok!
[ 1.172713] libphy: Fixed MDIO Bus: probed
[ 1.284520] i2c /dev entries driver
[ 1.286531] sdhci: Secure Digital Host Controller Interface driver
[ 1.286818] sdhci: Copyright(c) Pierre Ossman
[ 1.293145] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.300974] NET: Registered protocol family 10
[ 1.304590] Segment Routing with IPv6
[ 1.307559] NET: Registered protocol family 17
[ 1.311312] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 1.315564] 8021q: 802.1Q VLAN Support v1.8
[ 1.328804] Registering SWP/SWPB emulation handler
[ 1.342264] UBI error: cannot open mtd rootfs, error -2
[ 1.342317] UBI error: cannot open mtd ubi, error -2
[ 1.346318] hctosys: unable to open rtc device ˛[ 1.356979] Waiting for root device /dev/ubiblock0_1…
[ 899.665995] random: crng init done
This line: [ 0.687983] spi-nand spi0.1: unknown raw ID 00c851c8
[ 0.691124] spi-nand: probe of spi0.1 failed with error -524
I belive this is why mtd fails too.
Thanks.