OpenWrt support on rt2600ac (synology) 2021

Kernel command line: rootfstype=squashfs,ext4 root=/dev/sda2 rootwait noinitrd

seems halted again

PM'd the full output message

1 Like

dude... fantastic... can see you now have the root= cmdline passed...

the hanging is related to 'usb' and the 5.4 dts~porting...

we are close... very close...

[    2.730338] dwc3 11000000.dwc3: Failed to get clk 'ref': -2
[    2.730637] dwc3 10000000.dwc3: Failed to get clk 'ref': -2
[    2.735157] dwc3 11000000.dwc3: Failed to get clk 'ref': -2

i'l l iron it out if possible...

by any chance did you check to see if the initramfs brings up your wireless?

yes I did, but no wireless even with the initramfs:

root@OpenWrt:/# iwinfo
root@OpenWrt:/# dmesg | grep ath
[   10.084337] ath10k_pci 0000:01:00.0: assign IRQ: got 35
[   10.084358] ath10k 5.10 driver, optimized for CT firmware, probing pci device: 0x46.
[   10.084862] ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142)
[   10.091216] ath10k_pci 0000:01:00.0: enabling bus mastering
[   10.091729] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   10.615307] ath10k_pci 0000:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[   10.615336] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   10.626066] ath10k_pci 0000:01:00.0: firmware ver 10.4b-ct-9984-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 7ea63dc5
[   12.930191] ath10k_pci 0000:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0046,subsystem-vendor=168c,subsystem-device=cafe from ath10k/QCA9984/hw1.0/board-2.bin
[   12.970843] ath10k_pci 0000:01:00.0: failed to fetch board-2.bin or board.bin from ath10k/QCA9984/hw1.0
[   12.970878] ath10k_pci 0000:01:00.0: failed to fetch board file: -12
[   12.979363] ath10k_pci 0000:01:00.0: could not probe fw (-12)
[   12.986273] ath10k_pci 0001:01:00.0: assign IRQ: got 37
[   12.986297] ath10k 5.10 driver, optimized for CT firmware, probing pci device: 0x46.
[   12.992009] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142)
[   12.999235] ath10k_pci 0001:01:00.0: enabling bus mastering
[   12.999783] ath10k_pci 0001:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   13.538869] ath10k_pci 0001:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[   13.538916] ath10k_pci 0001:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   13.550442] ath10k_pci 0001:01:00.0: firmware ver 10.4b-ct-9984-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 7ea63dc5
[   15.847195] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0046,subsystem-vendor=168c,subsystem-device=cafe from ath10k/QCA9984/hw1.0/board-2.bin
[   15.903682] ath10k_pci 0001:01:00.0: failed to fetch board-2.bin or board.bin from ath10k/QCA9984/hw1.0
[   15.903713] ath10k_pci 0001:01:00.0: failed to fetch board file: -12
[   15.912048] ath10k_pci 0001:01:00.0: could not probe fw (-12)

1 Like

well good news is that we are not stuck with usb...

we can simply point to a free mmc partition (but I need to make another kernel with that hardcoded)... the wireless has me a little stuck tho...

so might wait to see if anyone recognizes anything in that log... seem like the hardware is detected but some sort of drama with the right board/version being recognized or something... vaguely recall some random file we can add id's to... not sure if that is the case here... (if my board does the same then it's on me / also something i've overlooked with the 5.4 porting... simple enough to test)

(if you get bored in the meantime... i've routed an extension wire from the uart/serial to the center-rear-bottom of the case and tapped a small slot for female 4 pin connector (only need 3) so you can close the case up but still have serial access, have to give them credit it's a beautifully designed unit even room underneath to mount a 2.5 ssd>usb3)

Haha, i already did that this morning :smiley: I got very curious kids wandering around here and even with a 12V model you don't know the ground floating voltage. So I soldered a dupont cable that extends from one of the holes in the bottom and closed the unit already. Not the most elegant solution, but it's safe, and it's a router, so it's usually attached to the wall anyway and you won't see the cable.

You kinda got me hooked now so I wish to do something with it ^^ So if I can test something else, let me know.

1 Like

If you're talking about this one. I did find some posts about this hardware id and library. Perhaps you can tie the knots together.

https://www.mail-archive.com/search?l=ath10k@lists.infradead.org&q=subject:"QCA9984+bmi+identification+failure"&o=newest&f=1

well if you get really bored... you can mess around with the 'hexdump' command on your mtd ( or a dd image of it )

cat /proc/mtd

find which number is VENDORPART

careful with the dd command

dd if=/dev/mtdN of=/tmp/mtdN
hexdump -C /tmp/mtdN | grep MACBIT

looking for your original mac addresses....

don't spend too long on it tho'... but either I need to fix the logic or the macs are in an alternate location or both-ish...

(no need to post the macs... but hexdump should list an offset where they are stored... )

mine are on this line(s);

hexdump -C /dev/mtd11 | grep '000000d0'
hexdump -C /dev/mtd11 | grep '000000e0'

(p.s. your serial number is there too back that up also)

o no... there is no mtd in your dmesg... ok... that's interesting(and explains alot)... i'll definitely need to test this build on my device...

There is a mtd0, but might not be the one you're looking for:

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00800000 00010000 "spi0.0"
root@OpenWrt:/# hexdump -C /dev/mtd0 | grep '000000d0'
000000d0  04 40 2d e5 dc 40 9f e5  00 40 94 e5 14 ff 2f e1  |.@-..@...@..../.|
^C
root@OpenWrt:/# hexdump -C /dev/mtd0 | grep '000000e0'
000000e0  04 40 2d e5 d0 40 9f e5  00 40 94 e5 14 ff 2f e1  |.@-..@...@..../.|
1 Like

ok... looks like a porting issue... but we are a little closer again...

If you're looking for the wireless MAC Address, I could boot into Syn console again to check it right? And then grep through the hexdump output for this value?

1 Like

nah... looking like an issue on my end...

but that was the reason your wifi did not come up...

it needs to get metadata off mtd... specifically this line;

[   14.351877] ath10k_mac_create, priv_size: 868  hw: f09f0288  hw->priv: 5a09c63a
1 Like

In the process of learning. Which options do you set in the .config for building ?
Or since there is no target profile for it in the list , building like this is not possible (yet) ?
image

1 Like

this board is 97% identical as the ipq806x > nbg6817

so you can select that for a build or two... this is good because first run takes 1 hour or so... and changing the board on the same target uses all the same pre-built stuff

Target Images (+tar.gz initramfs)
(we use this to install)

other than that just mess around and choose a few things... larger/fancy stuff can sometimes be problematic...

each time you select a few things you can make a backup...

./scripts/diffconfig.sh > config.seed.v1.1-added-airmon-ng

etc. etc.

the nbg initramfs should boot ok on your device (without wifi and proper leds)

all fixed up [r17096-b0483b19f9]... enjoy

notes
  • do not use sysupgrade... needs a total rewrite due to the syno firmware developments
  • usb3 not tested
  • mmc-card slot does not work (never fully got this working)
    (will fry cards)

(actually let me know if your mac's come up ok)
(ath10k-ct is pedestrian from initramfs give it a good 2mins)
(you should only really need the initramfs for recovery now anyways)

1 Like

VERRRYYYY NICE WORK :wink: !!! Boots up fine and wireless is working !!

LAN LED's don't seem to work. Wireless LED does light up.

How can I make it autoboot from the USB now? :slight_smile:

Edit: i've sent you the bootlog so you can verify all works fine :slight_smile:

1 Like

uboot commands and sample 'booty.txt' which goes on part1 next to kernel are at the github repo...

they are a little different than the first set I gave you but have the advantage that you can;

  • remove the drive and oem boots
  • change the bootcommand / switch to another booty.txt that boots 'ramfs' instead of 'kernel' or 'tftp' or whatever...
  • mount it (/dev/sda1 /dev/sdq1 in syno and mv booty.txt) to toggle boot order remotely if need be...

(i noticed a minor bug with a function that used to be used to set the lanmacs so don't worry too much about those...)

excellent it mounted the rootfs on usb

thankyou also for all the info about the newer oem firmware (and all the testing)... like I said... I needed to update my own so it was good to sort of tackle two stones with one bird... :thinking:

(fun fact... I realized the first 'pat' file I sent you was the incorrect file... you must have some serious good karma or something...)

1 Like

Trying to test some settings, but Luci couldn't be reached anymore.

Tried to reset via serial:

root@**:/# firstboot && reboot now
This will erase all settings and remove any installed packages. Are you sure? [N/y]
y
MTD partition 'rootfs_data' not found

firstboot (as does sysyupgrade) works on your boards flash... weve been very carefull not to mess with that

(well any uboot commands we save get written there hence why we made sure we had a copy of the originals if we ever need to revert stuff... i believe there is an 'env default -a' command or similar but i've never tested that... and it could possibly wipe out all the uboot saved environment)

all you need to do is replace the rootfs on your usb partition2

1 Like

ok, makes sense indeed. i was thinking it when i posted it :stuck_out_tongue:

1 Like

First impression is that everything looks good. Why don't you submit it as-is? If it stays stable I'm considering using it as the main router.

1 Like