I dont know this is progress or not but i managed to "fool" the bootloader into booting by appending the first 40(h) bytes of the firmware to all 00 00 00....
But doing so messed up the partition scheme and openwrt cant detect rootfs anymore, so i would assume that this is not an ideal solution
Thanks, I tried to add | append-uImage-fakehdr firmware | before | append-kernel , It cant boot as the header checksum is wrong, I think generating the proper uImage header is the only way now?
I used mkimage utilities to generate the uImage header for ther kernel, but for now it doesn't seems to be working, I am figuring out what the problem is.
Image Name: Plsss work
Created: 2019-07-15 7:00:43 UTC
Image Type: MIPS Linux Multi-File Image (lzma compressed)
Data Size: 1834920 Bytes = 1.7 MB
Load Address: 80060000
Entry Point: 80060000
Contents:
Image 0: 1834912 Bytes = 1.7 MB
Verifying Checksum at 0x9f080040 ...OK
Uncompressing Multi-File Image ... Too big uncompressed streamLZMA ERROR 1 - must RESET board to recover
Unfortunately I cant get the ac wifi mac to set correctly,
I can see the correct mac is patched in pre-cal-pci-0000:00:00.0.bin , but the mac address used is not the correct one, but it is not random at every boot.
Maybe it only looks correct. It's a common mistake with d-link. see th difference between mtd_get_mac_ascii and mtd_get_max_text. I wrote the second one.
Just realized I need to delete pre-cal-pci-0000:00:00.0.bin to make it generate a new one, I found something interesting:
with mtd_get_mac_text , the mac address in the pre-cal file is wrong, but it is the same as the mac inside wifi1.caldata I pulled from the original Dlink firmware.
It is not wrong, It is in different format. Note that mtd_get_mac_text() doesn't use $key parameter. Only $offset. All depends on which format the mac is initially stored.
Haha, this is all because I didnt remove pre-cal-pci-0000:00:00.0.bin after I changed the 11-ath10k-caldata file, so I was very confused about why the mac address in the pre-cal file didnt change no matter how i edit the 11-ath10k-caldata file.
Once you get it running, it would be worthwhile to check if there is a board-specific board-2.bin file in the OEM firmware. This first popped up with the ipq40xx platform and I ran into it with the QCA9888 on the EA8300. No rush, but worth checking once you get to the point of considering submitting your work upstream. Once you get to that point, I can check through my notes and my EA8300 archive on how to determine of your board is already supported by the upstream board-2.bin file.
You'll need to check which of those are actually used by the OEM firmware (dmesg) and then transform them into a form OpenWrt uses (board-2.bin). This addition needs to be submitted upstream (linux-firmware.git).
wifi1: Selecting board data file name boardData_2_0_QCA9888_5G_Y9582.bin
[ 27.290000] ol_transfer_bin_file: Board Data File download to address=0xc0000 file name=QCA9888/hw.2/boardData_2_0_QCA9888_5G_Y9582.bin
[ 27.310000] ol_transfer_bin_file 4506: downloading file 3, Download data len 12064
So it is Y9582.bin, I will look into how to transform it.
as I recall. the bmi_id is what you'd need to check and confirm.
The reference that slh gave is the tooling for wrapping and unwrapping the "raw" content of the files.
You can check that those are the "right" files by manually installing them on your device, their content replacing board-2.bin for the QCA9888. It's worth a signal-level / throughput check against the generic as well.
When the time comes, openwrt/package/firmware/ipq-wifi/ is where the "interim hack" goes (ignore the name, it's a bit of legacy at this point).