Building updated firmware for the Oolite v5.1 board

Hello everyone,
I have an Oolite v5.1 board (CPU: QCA9531) and I am trying to build the firmware from source starting from what I think is the manufacturer's original repository. As the target system I am choosing the "Oolitebox" option from the menuconfig and everything works fine, including the built firmware.

Problems start when I try to update the packages definitions, using "./scripts/feeds update -a" and "./scripts/feeds install -a" (I need to test some updated audio libs such as "libffmpeg", since some codecs are not working with the manufacturer's original sources): in fact, during the make process, I get errors regarding the "libiwinfo" beeing too old. I managed to fix some, but many others appeared.

Because of that, I thought to use the updated OpenWRT repository cloned from github, in order to have everything updated and see if the errors go away. The problem now is that my target board (Oolitebox) is no longer in the list of target devices. Searching for the manufacturer name in the Table of Hardware I found only those boards. Since the CPU is the same of mine, I was thinking to use the Oolite v5.2 version.

Do you think that if I install the v5.2 firmware to my v5.1 board I could brick the board?

Don't even touch vendor repository, it's old.

Probably not, assuming the mtd layout is the same (I'm pretty sure it is). Looking at pictures, v5.1 and v5.2 modules are different, at least in terms of shape, AC radio and available interfaces.

Do you have a working device with vendor firmware and with serial console access?

Yes, I have a working device with serial console access.

Post whole bootlog and we will see what's different there.

May I ask you how can I can get it? With the logread command? Sorry but this is my first time with OpenWRT.

@pepe2k maybe if you can port v5.2 to ath79 target then @johndoe can use that as a reference to add v5.1 to ath79, since ath79 is much easier to work with than ar71xx.

dmesg

or, if you have a serial UART cable, have the serial terminal on while it is booting.

Thank you very much for your help, here it is the bootlog printed on the UART.


U-Boot 1.1.4 (Oct 17 2017 - 03:28:17)

board953x - Honey Bee 1.0

DRAM:  128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 166k for U-Boot at: 87fd4000
Reserving 192k for malloc() at: 87fa4000
Reserving 44 Bytes for Board Info at: 87fa3fd4
Reserving 36 Bytes for Global Data at: 87fa3fb0
Reserving 128k for boot params() at: 87f83fb0
Stack Pointer at: 87f83f98
Now running in RAM - U-Boot at: 87fd4000
Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x19
flash size 32MB, sector count = 512
Flash: 32 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Scorpion ---->S27 PHY*
S27 reg init
: cfg1 0x800c0000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
Honey Bee ---->  MAC 1 S27 PHY *
S27 reg init
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
read len: 43, dst: 0x1ff0000, src: 0x87fb4538
read process ===> 100%
Setting 0x181162c0 to 0x7fffa100
Hit any key to stop autoboot:  0
Booting image at: 0x9F020000

   Image name:   OpenWrt r0-333a970
   Image type:   MIPS Linux Kernel Image (lzma compressed)
   Data size:    1458655 Bytes =  1.4 MB
   Load address: 0x80060000
   Entry point:  0x80060000

Uncompressing kernel image... OK!
## Bootargs: console=ttyS0,115200 root=31:01 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:128k(u-boot),32576k@0x20000(firmware),64k@0x1ff0000(art)
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in MB, 128
Starting kernel...

[    0.000000] Linux version 4.9.91 (ubuntu@ubuntu) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 unknown) ) #0 Thu May 9 07:27:08 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    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] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=OOLITEBOX board  console=ttyS0,115200 rootfstype=squashfs noinitrd
[    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: 124552K/131072K available (3302K kernel code, 173K rwdata, 868K rodata, 320K init, 278K bss, 6520K 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] Clocks: CPU:550.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6950037990 ns
[    0.000010] sched_clock: 32 bits at 275MHz, resolution 3ns, wraps every 7809031678ns
[    0.008272] Calibrating delay loop... 366.18 BogoMIPS (lpj=1830912)
[    0.071082] pid_max: default: 32768 minimum: 301
[    0.076089] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.083072] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.093850] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.104278] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.111464] NET: Registered protocol family 16
[    0.118103] MIPS: machine is OOLITEBOX board
[    0.181751] ar724x-pci ar724x-pci.0: PCIe link is down
[    0.187224] registering PCI controller with io_map_base unset
[    0.193525] ar71xx: invalid MDIO id 1
[    0.695666] usbcore: registered new interface driver usbfs
[    0.701639] usbcore: registered new interface driver hub
[    0.707347] usbcore: registered new device driver usb
[    0.713063] PCI host bridge to bus 0000:00
[    0.717395] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[    0.724683] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.730554] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.737722] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.746968] clocksource: Switched to clocksource MIPS
[    0.753670] NET: Registered protocol family 2
[    0.759283] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.766652] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.773444] TCP: Hash tables configured (established 1024 bind 1024)
[    0.780297] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.786475] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.793470] NET: Registered protocol family 1
[    0.804070] Crashlog allocated RAM at address 0x3f00000
[    0.810888] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.825810] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.832021] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.852597] io scheduler noop registered
[    0.856738] io scheduler deadline registered (default)
[    0.862676] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.869944] console [ttyS0] disabled
[    0.893891] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.903015] console [ttyS0] enabled
[    0.903015] console [ttyS0] enabled
[    0.910576] bootconsole [early0] disabled
[    0.910576] bootconsole [early0] disabled
[    0.923281] m25p80 spi0.0: found mx25l25635e, expected m25p80
[    0.930013] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
[    0.935964] 5 tp-link partitions found on MTD device spi0.0
[    0.941785] Creating 5 MTD partitions on "spi0.0":
[    0.946745] 0x000000000000-0x000000020000 : "u-boot"
[    0.953664] 0x000000020000-0x0000001843e0 : "kernel"
[    0.960893] 0x0000001843e0-0x000001ff0000 : "rootfs"
[    0.968038] mtd: device 2 (rootfs) set to be root filesystem
[    0.974523] 1 squashfs-split partitions found on MTD device rootfs
[    0.981007] 0x000001440000-0x000001ff0000 : "rootfs_data"
[    0.988331] 0x000001ff0000-0x000002000000 : "art"
[    0.995173] 0x000000020000-0x000001ff0000 : "firmware"
[    1.003705] libphy: Fixed MDIO Bus: probed
[    1.033582] libphy: ag71xx_mdio: probed
[    1.669948] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd042, driver=Generic PHY]
[    1.680293] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    2.309540] ag71xx-mdio.1: Found an AR934X built-in switch
[    2.363042] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.369425] PPP generic driver version 2.4.2
[    2.374076] PPP BSD Compression module registered
[    2.379250] usbcore: registered new interface driver usbserial
[    2.385349] usbcore: registered new interface driver usbserial_generic
[    2.392226] usbserial: USB Serial support registered for generic
[    2.398578] usbcore: registered new interface driver option
[    2.404409] usbserial: USB Serial support registered for GSM modem (1-port)
[    2.413981] NET: Registered protocol family 10
[    2.424620] NET: Registered protocol family 17
[    2.429522] 8021q: 802.1Q VLAN Support v1.8
[    2.444004] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.453934] Freeing unused kernel memory: 320K
[    2.458567] This architecture does not have kernel memory protection.
[    2.546977] random: fast init done
[    3.538737] init: Console is alive
[    3.542541] init: - watchdog -
[    6.479730] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.687927] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.706674] SCSI subsystem initialized
[    6.716725] ehci-platform: EHCI generic platform driver
[    6.722345] ehci-platform ehci-platform: EHCI Host Controller
[    6.728351] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.738691] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    6.766995] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.774487] hub 1-0:1.0: USB hub found
[    6.778918] hub 1-0:1.0: 1 port detected
[    6.786642] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.794849] ohci-platform: OHCI generic platform driver
[    6.803352] uhci_hcd: USB Universal Host Controller Interface driver
[    6.827240] usbcore: registered new interface driver usb-storage
[    6.834362] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.844224] init: - preinit -
[    7.507187] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    7.851520] hub 1-1:1.0: USB hub found
[    7.857898] hub 1-1:1.0: 3 ports detected
[    8.537072] usb 1-1.1: new high-speed USB device number 3 using ehci-platform
[    8.916319] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Press the [f] ke[    9.007815] usb 1-1.3: new full-speed USB device number 4 using ehci-platform
y and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   11.276821] mount_root: loading kmods from internal overlay
[   11.340913] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   11.350439] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   12.823539] jffs2: notice: (425) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   12.840313] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   12.856013] block: extroot: not configured
[   13.009061] jffs2: notice: (423) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   13.853100] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   13.867333] block: extroot: not configured
[   13.873085] mount_root: switching to jffs2 overlay
[   13.947881] urandom-seed: Seeding with /etc/urandom.seed
[   14.193070] procd: - early -
[   14.196170] procd: - watchdog -
[   14.834197] procd: - watchdog -
[   14.842307] procd: - ubus -
[   15.720660] procd: - init -
Please press Enter to activate this console.
[   16.257425] kmodloader: loading kernel modules from /etc/modules.d/*
[   16.294542] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   16.363082] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   16.390894] i2c /dev entries driver
[   16.403444] udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers
[   16.420562] udc-core: couldn't find an available UDC - added [g_serial] to list of pending drivers
[   16.462149] hidraw: raw HID events driver (C) Jiri Kosina
[   16.474941] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   16.483305] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   16.495125] ip_tables: (C) 2000-2006 Netfilter Core Team
[   16.518945] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   16.603287] NET: Registered protocol family 24
[   16.614612] usbcore: registered new interface driver ums-alauda
[   16.623674] usbcore: registered new interface driver ums-cypress
[   16.632902] usbcore: registered new interface driver ums-datafab
[   16.641859] usbcore: registered new interface driver ums-freecom
[   16.651004] usbcore: registered new interface driver ums-isd200
[   16.660229] usbcore: registered new interface driver ums-jumpshot
[   16.669305] usbcore: registered new interface driver ums-karma
[   16.678971] usbcore: registered new interface driver ums-sddr09
[   16.688145] usbcore: registered new interface driver ums-sddr55
[   16.697692] usbcore: registered new interface driver ums-usbat
[   16.721985] input: C-Media Electronics Inc USB Audio as /devices/platform/ehci-platform/usb1/1-1/1-1.1/1-1.1:1.3/0003:0D8C:0158.0001/input/input0
[   16.736191] hid-generic 0003:0D8C:0158.0001: input,hiddev0,hidraw0: USB HID v1.11 Device [C-Media Electronics Inc USB Audio] on usb-ehci-platform-1.1/input3
[   16.750939] usbcore: registered new interface driver usbhid
[   16.756695] usbhid: USB HID core driver
[   16.796606] xt_time: kernel timezone is -0000
[   18.770618] usbcore: registered new interface driver snd-usb-audio
[   18.892040] ieee80211 phy0: Atheros AR9531 Rev:2 mem=0xb8100000, irq=47
[   19.003093] kmodloader: done loading kernel modules from /etc/modules.d/*
[   32.618843] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   32.650096] br-lan: port 1(eth1.1) entered blocking state
[   32.655696] br-lan: port 1(eth1.1) entered disabled state
[   32.661848] device eth1.1 entered promiscuous mode
[   32.666802] device eth1 entered promiscuous mode
[   32.756165] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   32.825223] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   35.214133] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   38.198832] IPv6: ADDRCONF(NETDEV_UP): p2p-wlan0-0: link is not ready
[   38.265704] IPv6: ADDRCONF(NETDEV_CHANGE): p2p-wlan0-0: link becomes ready
[   38.310189] br-lan: port 2(p2p-wlan0-0) entered blocking state
[   38.316239] br-lan: port 2(p2p-wlan0-0) entered disabled state
[   38.322868] device p2p-wlan0-0 entered promiscuous mode
[   38.328432] br-lan: port 2(p2p-wlan0-0) entered blocking state
[   38.334479] br-lan: port 2(p2p-wlan0-0) entered forwarding state
[   38.340874] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   53.997965] random: crng init done

And here it is the bootlog from the dmesg command:

[    0.000000] Linux version 4.9.91 (ubuntu@ubuntu) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 unknown) ) #0 Thu May 9 07:27:08 2019
[    0.000000] MyLoader: sysp=6fe80d5b, boardp=6e1575d3, parts=adb17b94
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    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] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 8049d064, node_mem_map 81000020
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=OOLITEBOX board  console=ttyS0,115200 rootfstype=squashfs noinitrd
[    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: 124552K/131072K available (3302K kernel code, 173K rwdata, 868K rodata, 320K init, 278K bss, 6520K 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] Clocks: CPU:550.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6950037990 ns
[    0.000010] sched_clock: 32 bits at 275MHz, resolution 3ns, wraps every 7809031678ns
[    0.008272] Calibrating delay loop... 366.18 BogoMIPS (lpj=1830912)
[    0.071082] pid_max: default: 32768 minimum: 301
[    0.076089] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.083072] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.093850] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.104278] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.111464] NET: Registered protocol family 16
[    0.118103] MIPS: machine is OOLITEBOX board
[    0.181751] ar724x-pci ar724x-pci.0: PCIe link is down
[    0.187224] registering PCI controller with io_map_base unset
[    0.193525] ar71xx: invalid MDIO id 1
[    0.695666] usbcore: registered new interface driver usbfs
[    0.701639] usbcore: registered new interface driver hub
[    0.707347] usbcore: registered new device driver usb
[    0.713063] PCI host bridge to bus 0000:00
[    0.717395] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[    0.724683] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.730554] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.737722] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.746096] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.746968] clocksource: Switched to clocksource MIPS
[    0.753670] NET: Registered protocol family 2
[    0.759283] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.766652] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.773444] TCP: Hash tables configured (established 1024 bind 1024)
[    0.780297] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.786475] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.793470] NET: Registered protocol family 1
[    0.798145] PCI: CLS 0 bytes, default 32
[    0.804070] Crashlog allocated RAM at address 0x3f00000
[    0.810888] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.825810] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.832021] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.852597] io scheduler noop registered
[    0.856738] io scheduler deadline registered (default)
[    0.862676] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.869944] console [ttyS0] disabled
[    0.893891] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.903015] console [ttyS0] enabled
[    0.910576] bootconsole [early0] disabled
[    0.923281] m25p80 spi0.0: found mx25l25635e, expected m25p80
[    0.930013] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
[    0.935964] 5 tp-link partitions found on MTD device spi0.0
[    0.941785] Creating 5 MTD partitions on "spi0.0":
[    0.946745] 0x000000000000-0x000000020000 : "u-boot"
[    0.953664] 0x000000020000-0x0000001843e0 : "kernel"
[    0.960893] 0x0000001843e0-0x000001ff0000 : "rootfs"
[    0.968038] mtd: device 2 (rootfs) set to be root filesystem
[    0.974523] 1 squashfs-split partitions found on MTD device rootfs
[    0.981007] 0x000001440000-0x000001ff0000 : "rootfs_data"
[    0.988331] 0x000001ff0000-0x000002000000 : "art"
[    0.995173] 0x000000020000-0x000001ff0000 : "firmware"
[    1.003705] libphy: Fixed MDIO Bus: probed
[    1.033582] libphy: ag71xx_mdio: probed
[    1.669948] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd042, driver=Generic PHY]
[    1.680293] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    2.309540] ag71xx-mdio.1: Found an AR934X built-in switch
[    2.363042] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.369425] PPP generic driver version 2.4.2
[    2.374076] PPP BSD Compression module registered
[    2.379250] usbcore: registered new interface driver usbserial
[    2.385349] usbcore: registered new interface driver usbserial_generic
[    2.392226] usbserial: USB Serial support registered for generic
[    2.398578] usbcore: registered new interface driver option
[    2.404409] usbserial: USB Serial support registered for GSM modem (1-port)
[    2.413981] NET: Registered protocol family 10
[    2.424620] NET: Registered protocol family 17
[    2.429522] 8021q: 802.1Q VLAN Support v1.8
[    2.444004] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.453934] Freeing unused kernel memory: 320K
[    2.458567] This architecture does not have kernel memory protection.
[    2.546977] random: fast init done
[    3.538737] init: Console is alive
[    3.542541] init: - watchdog -
[    6.479730] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.687927] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.706674] SCSI subsystem initialized
[    6.716725] ehci-platform: EHCI generic platform driver
[    6.722345] ehci-platform ehci-platform: EHCI Host Controller
[    6.728351] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.738691] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    6.766995] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.774487] hub 1-0:1.0: USB hub found
[    6.778918] hub 1-0:1.0: 1 port detected
[    6.786642] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.794849] ohci-platform: OHCI generic platform driver
[    6.803352] uhci_hcd: USB Universal Host Controller Interface driver
[    6.827240] usbcore: registered new interface driver usb-storage
[    6.834362] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.844224] init: - preinit -
[    7.507187] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    7.851520] hub 1-1:1.0: USB hub found
[    7.857898] hub 1-1:1.0: 3 ports detected
[    8.537072] usb 1-1.1: new high-speed USB device number 3 using ehci-platform
[    8.916319] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    9.007815] usb 1-1.3: new full-speed USB device number 4 using ehci-platform
[   11.276821] mount_root: loading kmods from internal overlay
[   11.340913] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   11.350439] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   12.823539] jffs2: notice: (425) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   12.840313] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   12.856013] block: extroot: not configured
[   13.009061] jffs2: notice: (423) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   13.853100] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   13.867333] block: extroot: not configured
[   13.873085] mount_root: switching to jffs2 overlay
[   13.947881] urandom-seed: Seeding with /etc/urandom.seed
[   14.193070] procd: - early -
[   14.196170] procd: - watchdog -
[   14.834197] procd: - watchdog -
[   14.842307] procd: - ubus -
[   15.720660] procd: - init -
[   16.257425] kmodloader: loading kernel modules from /etc/modules.d/*
[   16.294542] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   16.363082] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   16.390894] i2c /dev entries driver
[   16.403444] udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers
[   16.420562] udc-core: couldn't find an available UDC - added [g_serial] to list of pending drivers
[   16.462149] hidraw: raw HID events driver (C) Jiri Kosina
[   16.474941] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   16.483305] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   16.495125] ip_tables: (C) 2000-2006 Netfilter Core Team
[   16.518945] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   16.603287] NET: Registered protocol family 24
[   16.614612] usbcore: registered new interface driver ums-alauda
[   16.623674] usbcore: registered new interface driver ums-cypress
[   16.632902] usbcore: registered new interface driver ums-datafab
[   16.641859] usbcore: registered new interface driver ums-freecom
[   16.651004] usbcore: registered new interface driver ums-isd200
[   16.660229] usbcore: registered new interface driver ums-jumpshot
[   16.669305] usbcore: registered new interface driver ums-karma
[   16.678971] usbcore: registered new interface driver ums-sddr09
[   16.688145] usbcore: registered new interface driver ums-sddr55
[   16.697692] usbcore: registered new interface driver ums-usbat
[   16.721985] input: C-Media Electronics Inc USB Audio as /devices/platform/ehci-platform/usb1/1-1/1-1.1/1-1.1:1.3/0003:0D8C:0158.0001/input/input0
[   16.736191] hid-generic 0003:0D8C:0158.0001: input,hiddev0,hidraw0: USB HID v1.11 Device [C-Media Electronics Inc USB Audio] on usb-ehci-platform-1.1/input3
[   16.750939] usbcore: registered new interface driver usbhid
[   16.756695] usbhid: USB HID core driver
[   16.796606] xt_time: kernel timezone is -0000
[   18.770618] usbcore: registered new interface driver snd-usb-audio
[   18.874453] ath: EEPROM regdomain: 0x0
[   18.874465] ath: EEPROM indicates default country code should be used
[   18.874469] ath: doing EEPROM country->regdmn map search
[   18.874489] ath: country maps to regdmn code: 0x3a
[   18.874496] ath: Country alpha2 being used: US
[   18.874500] ath: Regpair used: 0x3a
[   18.886390] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   18.892040] ieee80211 phy0: Atheros AR9531 Rev:2 mem=0xb8100000, irq=47
[   19.003093] kmodloader: done loading kernel modules from /etc/modules.d/*
[   32.618843] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   32.650096] br-lan: port 1(eth1.1) entered blocking state
[   32.655696] br-lan: port 1(eth1.1) entered disabled state
[   32.661848] device eth1.1 entered promiscuous mode
[   32.666802] device eth1 entered promiscuous mode
[   32.756165] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   32.825223] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   35.214133] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   38.198832] IPv6: ADDRCONF(NETDEV_UP): p2p-wlan0-0: link is not ready
[   38.265704] IPv6: ADDRCONF(NETDEV_CHANGE): p2p-wlan0-0: link becomes ready
[   38.310189] br-lan: port 2(p2p-wlan0-0) entered blocking state
[   38.316239] br-lan: port 2(p2p-wlan0-0) entered disabled state
[   38.322868] device p2p-wlan0-0 entered promiscuous mode
[   38.328432] br-lan: port 2(p2p-wlan0-0) entered blocking state
[   38.334479] br-lan: port 2(p2p-wlan0-0) entered forwarding state
[   38.340874] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   53.997965] random: crng init done

It's on my migration list.

@johndoe

This looks bad to me:
[ 0.923281] m25p80 spi0.0: found mx25l25635e, expected m25p80

Based on my practical experience, especially with this manufacturer, I'm pretty sure they did it wrong (32 MB SPI NOR flash support). Do you have access to GPIO mapping or can you get SPI NOR related part of PCB schematic?

Unfortunately, here is the only information I have (bottom page, "Pin Description").

Do you think that could be a problem in the porting process of the v5.2 firmware? Should I risk to install the v5.2 on my board?

I don't know if it could be useful, but inside my repository I found this C file. It seems that it was specifically created for my board and there are some references to the GPIOs.

/*
* Atheros OOLITEBOX reference board support
*
* Copyright (c) 2013 The Linux Foundation. All rights reserved.
* Copyright (c) 2012 Gabor Juhos <juhosg@openwrt.org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/

#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/ar8216_platform.h>

#include <asm/mach-ath79/ar71xx_regs.h>

#include "common.h"
#include "dev-eth.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-m25p80.h"
#include "dev-spi.h"
#include "dev-usb.h"
#include "dev-wmac.h"
#include "machtypes.h"
#include "pci.h"
#include "eeprom.h"
#define OOLITEBOX_GPIO_BTN_RST                   17
#define OOLITEBOX_KEYS_POLL_INTERVAL             20 /* msecs */
#define OOLITEBOX_MAC0_OFFSET                    0
#define OOLITEBOX_MAC1_OFFSET                    6
#define OOLITEBOX_WMAC_CALDATA_OFFSET            0x1000
#define OOLITEBOX_KEYS_DEBOUNCE_INTERVAL         (3 * OOLITEBOX_KEYS_POLL_INTERVAL)
#define OOLITEBOX_GPIO_LED_WLAN					 12
#define OOLITEBOX_GPIO_LED_WAN					 4
#define OOLITEBOX_GPIO_LED_SYSTEM                13
#define OOLITEBOX_GPIO_LED_LAN1					 16
#define OOLITEBOX_GPIO_LED_LAN2					 15
#define OOLITEBOX_GPIO_LED_LAN3					 14
#define OOLITEBOX_GPIO_LED_LAN4					 11
#define OOLITEBOX_GPIO_LED_3G  					 0
#define OOLITEBOX_GPIO_PCIE1_CTR				 1
#define OOLITEBOX_GPIO_PCIE2_CTR 				 2
static const char *oolitebox_part_probes[] = {
    "tp-link",
    NULL,
};

static struct flash_platform_data oolitebox_flash_data = {
    .part_probes    = oolitebox_part_probes,
};


static struct gpio_keys_button oolitebox_gpio_keys[] __initdata = {
{
    .desc   = "reset button",
    .type   = EV_KEY,
    .code   = KEY_RESTART,
    .debounce_interval = OOLITEBOX_KEYS_DEBOUNCE_INTERVAL,
    .gpio   = OOLITEBOX_GPIO_BTN_RST,
    .active_low = 1,
},
    };

static struct gpio_led oolitebox_leds_gpio[] __initdata = {
        {
                .name           = "oolitebox:wifi0",
                .gpio           = OOLITEBOX_GPIO_LED_WLAN,
                .active_low     = 1,
        }, {
                .name           = "oolitebox:wan",
                .gpio           = OOLITEBOX_GPIO_LED_WAN,
                .active_low     = 1,
        }, {
                .name           = "oolitebox:system",
                .gpio           = OOLITEBOX_GPIO_LED_SYSTEM,
                .active_low     = 1,
        }, {
                .name           = "oolitebox:lan1",
                .gpio           = OOLITEBOX_GPIO_LED_LAN1,
                .active_low     = 1,
        }, {
				.name		    = "oolitebox:lan2",
				.gpio	   		= OOLITEBOX_GPIO_LED_LAN2,
				.active_low		= 1,
		}, {
				.name			= "oolitebox:lan3",
				.gpio 			= OOLITEBOX_GPIO_LED_LAN3,
				.active_low		= 1,
		}, {
				.name 			= "oolitebox:lan4",
				.gpio 			= OOLITEBOX_GPIO_LED_LAN4,
				.active_low		= 1,
		}, {
				.name 			= "oolitebox:3g",
				.gpio 			= OOLITEBOX_GPIO_LED_3G,
				.active_low	 	= 1,
		}
};

static void __init oolitebox_gpio_led_setup(void)
{
	unsigned int old_func,new_func;
	void __iomem *QCA9531_GPIO_FUNC = ioremap_nocache(AR71XX_GPIO_BASE +0x6c, 0x04);
	old_func = __raw_readl(QCA9531_GPIO_FUNC);
	new_func = old_func & (1 << 1);
	__raw_writel(new_func, QCA9531_GPIO_FUNC);
	iounmap(QCA9531_GPIO_FUNC);

    ath79_gpio_direction_select(OOLITEBOX_GPIO_LED_WAN, true);
    ath79_gpio_direction_select(OOLITEBOX_GPIO_LED_LAN1, true);
    ath79_gpio_direction_select(OOLITEBOX_GPIO_LED_LAN2, true);
    ath79_gpio_direction_select(OOLITEBOX_GPIO_LED_LAN3, true);
    ath79_gpio_direction_select(OOLITEBOX_GPIO_LED_LAN4, true);

    ath79_gpio_output_select(OOLITEBOX_GPIO_LED_WAN,QCA953X_GPIO_OUT_MUX_LED_LINK5);
    ath79_gpio_output_select(OOLITEBOX_GPIO_LED_LAN1,QCA953X_GPIO_OUT_MUX_LED_LINK1);
    ath79_gpio_output_select(OOLITEBOX_GPIO_LED_LAN2,QCA953X_GPIO_OUT_MUX_LED_LINK2);
    ath79_gpio_output_select(OOLITEBOX_GPIO_LED_LAN3,QCA953X_GPIO_OUT_MUX_LED_LINK3);
    ath79_gpio_output_select(OOLITEBOX_GPIO_LED_LAN4,QCA953X_GPIO_OUT_MUX_LED_LINK4);



	ath79_register_leds_gpio(-1,ARRAY_SIZE(oolitebox_leds_gpio),oolitebox_leds_gpio);
	ath79_register_gpio_keys_polled(-1,OOLITEBOX_KEYS_POLL_INTERVAL,
			ARRAY_SIZE(oolitebox_gpio_keys),oolitebox_gpio_keys);
}

static void __init oolitebox_setup(void)
{
   // u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
    u8 *art = ath79_get_eeprom();
    ath79_register_m25p80(&oolitebox_flash_data);

 	oolitebox_gpio_led_setup();
    ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE);
    ath79_register_usb();

    ath79_register_pci();


    ath79_wmac_set_led_pin(OOLITEBOX_GPIO_LED_WLAN);
    ath79_register_wmac(art + OOLITEBOX_WMAC_CALDATA_OFFSET, NULL);

    ath79_register_mdio(0, 0x0);
    ath79_register_mdio(1, 0x0);

    ath79_init_mac(ath79_eth1_data.mac_addr, art + OOLITEBOX_MAC1_OFFSET, 0);

    ath79_init_mac(ath79_eth0_data.mac_addr, art + OOLITEBOX_MAC0_OFFSET, 0);
    

    /* WAN port */
        ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
        ath79_eth0_data.speed = SPEED_100;
        ath79_eth0_data.duplex = DUPLEX_FULL;
        ath79_eth0_data.phy_mask = BIT(4);
        ath79_register_eth(0);

        /* LAN ports */
        ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
        ath79_eth1_data.speed = SPEED_1000;
        ath79_eth1_data.duplex = DUPLEX_FULL;
        ath79_switch_data.phy_poll_mask |= BIT(4);
        ath79_switch_data.phy4_mii_en = 1;
        ath79_register_eth(1);
}
    MIPS_MACHINE(ATH79_MACH_OOLITEBOX, "OOLITEBOX", "OOLITEBOX board",
    oolitebox_setup);



You can try but the firmware image header might be different.

Can you do a simple test, just issue below command and tell me whether the board reboots some time afterwards or just hangs?

ubus call system watchdog '{"stop": true}'

I tried three times and the board hanged all the times, no restarts.

OK. This means (with 99% certainty) the design of this board/module, at least in terms of support for 32+ MB SPI NOR support, is just broken. They should have used SOC reset signal to reset also the SPI NOR flash chip because this platform can boot only from SPI NOR in 3-byte addressing mode (32+ MB types use 4-byte addressing).

You should look for a different platform if you don't want to get into troubles (check for example Lima: https://www.8devices.com/products/lima).

2 Likes

Correct me if wrong but...4-byte addressing uses different SPI commands than the standard 3-byte addressing, so not having flash chip reset wouldn't effect the boot right? The problem is only the SOC never getting reset?

It depends, some flash chips have dedicated all needed commands for 4-byte addressing access (like the GD25Q256), some only part of them and other need explicitly switching between 3- and 4-byte addressing (like the one on this v5.1 module).

See also: Commit 22d982 ramips: add support for switching between 3-byte and 4-byte addressing on w25q256 flash

1 Like

We have update the code for Oolite 5 series