Skip to content

ipq40xx: Add support for linksys MR6350 #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RolandoMagico
Copy link

@RolandoMagico RolandoMagico commented Dec 19, 2023

Extracted from FW_MR6350_1.1.3.210129_prod.img and repacked.
It's containing only the settings for FCC. EU is identical to FCC.

MD5: 673a0d9f1508f5b6943ceb2ee64f64c8
SHA256: f6197c9e6f28ee0192f3e182b3543ab67209109d29bc493793044231381ce6a3

Based on the thread https://forum.openwrt.org/t/howto-create-ipq40xx-bdf-files

PR adding the device: openwrt/openwrt#14098

@testuser7
Copy link
Contributor

How are BDF files selected?

@RolandoMagico
Copy link
Author

RolandoMagico commented Dec 21, 2023

How are BDF files selected?

Hi @testuser7, that's the first time I tried to create BDF files so I don't have detailled background regarding this topic. Can you please give me some more background regarding your question?

Update: No clear if it answers your question: The BDF contains the data for the main areas. I also checked if there is already a file with the same MD5 in this repository, there isn't.
The file is required for openwrt/openwrt#14098 and is referenced in t the devlice DTS (see https://github.com/openwrt/openwrt/pull/14098/files#diff-12d25e8195d7707e624211ad97b60f2f75c3041cef9c44bdd4f182902b463a93, line 86 and line 91.

@testuser7
Copy link
Contributor

How are BDF files selected?

Hi @testuser7, that's the first time I tried to create BDF files so I don't have detailled background regarding this topic. Can you please give me some more background regarding your question?

I'm not sure if additional BDF files will be used. Currently, there is no mechanism that would allow you to set another variant from the system level.

@RolandoMagico
Copy link
Author

I'm not sure if additional BDF files will be used. Currently, there is no mechanism that would allow you to set another variant from the system level.

Right, as far as I understood from this post, additional BDFs are only included to give "power users" the ability to change them.

@testuser7
Copy link
Contributor

Right, as far as I understood from this post, additional BDFs are only included to give "power users" the ability to change them.

BDF files fcc and eum just have different country code and checksum. Otherwise they are identical.

0x833A - GB
0x8348 - US
OFFSET      bus=ahb,bmi-chip-id=0,bmi-board-id=20,variant=linksys-mr6350-eum.bin   bus=ahb,bmi-chip-id=0,bmi-board-id=20,variant=linksys-mr6350-fcc.bin
--------------------------------------------------------------------------------
0x00000000  20 2F 0D 14 01 01 00 03 7F 12 34 56 3A 83 00 00 |./........4V:...| \ 20 2F 7F 14 01 01 00 03 7F 12 34 56 48 83 00 00 |./........4VH...|
*
OFFSET      bus=ahb,bmi-chip-id=0,bmi-board-id=21,variant=linksys-mr6350-eum.bin   bus=ahb,bmi-chip-id=0,bmi-board-id=21,variant=linksys-mr6350-fcc.bin
--------------------------------------------------------------------------------
0x00000000  20 2F 28 64 01 01 12 34 56 78 90 12 3A 83 00 00 |./(d...4Vx..:...| \ 20 2F 5A 64 01 01 12 34 56 78 90 12 48 83 00 00 |./Zd...4Vx..H...|
*

@RolandoMagico
Copy link
Author

BDF files fcc and eum just have different country code and checksum. Otherwise they are identical.

Thansk for the hint, I removed the EU variant

@Ansuel
Copy link
Member

Ansuel commented Sep 22, 2024

any news on this? can someone summarize the situation?

@RolandoMagico
Copy link
Author

any news on this? can someone summarize the situation?

Hello, This is the first time I created BDF files, but from my point of view nothing else has to be done here. I tested the files with MR6350 and they worked.
If there is anything missing, please tell me and I’ll fix it

@hauke hauke requested a review from Ansuel October 16, 2024 21:58
@Ansuel
Copy link
Member

Ansuel commented Oct 21, 2024

Honestly I would just include the fcc and remove the tag from the variant. @RolandoMagico can you do that?

Unless you notice big performance degradation, we should stick to the most compatible one across regions (that is FCC)

@RolandoMagico RolandoMagico force-pushed the main branch 2 times, most recently from 964c704 to a7f7852 Compare October 21, 2024 15:46
@RolandoMagico
Copy link
Author

@RolandoMagico can you do that?

@Ansuel: Done and rebased

@Ansuel
Copy link
Member

Ansuel commented Oct 21, 2024

Also drop the "variant=linksys-mr6350-fcc" -fcc from variant.

@RolandoMagico
Copy link
Author

Also drop the "variant=linksys-mr6350-fcc" -fcc from variant.

I removed the variant from board.json and generated the bdf again. Can you please check if it has the expected format?
Thanks

Extracted from FW_MR6350_1.1.3.210129_prod.img and repacked.
It's containing only the settings for FCC. EU is identical to FCC.

MD5: 673a0d9f1508f5b6943ceb2ee64f64c8
SHA256: f6197c9e6f28ee0192f3e182b3543ab67209109d29bc493793044231381ce6a3

Based on the thread https://forum.openwrt.org/t/howto-create-ipq40xx-bdf-files

Signed-off-by: Roland Reinl <[email protected]>
@robimarko
Copy link
Contributor

This does not look right to me:

python ath10k-bdencoder -i board-linksys_mr6350.qca4019 
FileSize: 24276
FileCRC32: d316fa0b
FileMD5: 456b61ac425e4b64821534d5105e5218
BoardNames[0]: 'bus=ahb,bmi-chip-id=0,bmi-board-id=20'
BoardLength[0]: 12064
BoardCRC32[0]: be0a64ca
BoardMD5[0]: e1b78271fb1efda933a54f977cd9c566
BoardNames[1]: 'bus=ahb,bmi-chip-id=0,bmi-board-id=21'
BoardLength[1]: 12064
BoardCRC32[1]: 50a45910
BoardMD5[1]: 20f6b8ee7caaa59cf38bf52349fe4611

First of all, why are there 2 BDF-s inside and second why is there no variant being set?

@testuser7
Copy link
Contributor

@robimarko Maybe some github action should be implemented to check files?

@robimarko
Copy link
Contributor

I dont know how one would do it, but it would be great to just have the info printed

@Ansuel
Copy link
Member

Ansuel commented Feb 17, 2025

Mhhh an action might be interesting to implement... What info/checks should be done?

@testuser7
Copy link
Contributor

Apart from displaying what is in the board file, I am thinking about an implementation that would return some basic information about BDF (version, regdb) to this tool: https://github.com/testuser7/ath_bdf_tool

@RolandoMagico
Copy link
Author

First of all, why are there 2 BDF-s inside and second why is there no variant being set?

@robimarko:
Sorry, I'm new to this BDF creation stuff. Are there further information how to do it correctly?
Thanks

@testuser7
Copy link
Contributor

@Ansuel @robimarko Is there a way to distinguish QCA9888/QCA9984/IPQ4019 BDF files by content?

@testuser7
Copy link
Contributor

@RolandoMagico This was done previously before you closed PR.

@robimarko
Copy link
Contributor

First of all, why are there 2 BDF-s inside and second why is there no variant being set?

@robimarko: Sorry, I'm new to this BDF creation stuff. Are there further information how to do it correctly? Thanks

Just add the missing variant in the board-2.json so there is something to actually match against.

@RolandoMagico
Copy link
Author

@testuser7, @robimarko: Can you please help me with this PR?
Currently my board.json looks is this:

[
    {
        "data": "firmware/FCC/boardData_1_0_IPQ4019_DK04_2G.bin", 
        "names": [
            "bus=ahb,bmi-chip-id=0,bmi-board-id=20"
        ]
    }, 
    {
        "data": "firmware/FCC/boardData_1_0_IPQ4019_DK04_5G.bin", 
        "names": [
            "bus=ahb,bmi-chip-id=0,bmi-board-id=21"
        ]
    }
]

What I execute:

python3 scripts/ath10k/ath10k-bdencoder -c board.json

What do I have to change to get what you need?
Thanks in advance
Roland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants