Skip to content
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

ath79: add mikrotik subtarget #2811

Closed
wants to merge 1 commit into from

Conversation

rogerpueyo
Copy link
Contributor

@rogerpueyo rogerpueyo commented Mar 6, 2020

This is a RFC for adding a new ath79/mikrotik subtarget and moving the two currently supported MikroTik devices there. The main rationale behind this is the need for:

  • CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y to property to manage the 4K-sized flash partitions
  • FEATURES += minor and CONFIG_MTD_SPLIT_MINOR_FW=y for the MiNor (MikroTik NOR) split MTD format

Issues (so far):

  • mikrotik/config-default has the symbols from ath79/generic + ath79/nand + ar71xx/mikrotik, removing those that didn't seem needed (e.g. drivers not used). Are all of the current ones needed or is any missing?
  • the NAND board (rb922) still has the BOARD_NAME variable (related: ath79: get rid of BOARD_NAME for RouterBOARD 922UAGS-5HPacD #2790)
  • filenames get a duplicate "mikrotik" string, for the subtarget and for the vendor (e.g., openwrt-ath79-mikrotik-mikrotik_routerboard-922uags-5hpacd-squashfs-sysupgrade.bin)

This commit creates the ath79/mikrotik subtarget in order to support
MikroTik devices based on Qualcomm Atheros MIPS SoCs.

MikroTik devices need a couple of specific features: the split MiNOR
firmware MTD format, which is not used by other devices, and the 4k
sector erase size on SPI NOR storage, which can not be added to the
ath79/generic and ath79/nand subtargets now.

Additionally, the commit moves the two MikroTik devices already in
the generic and nand subtargets to this new one.

Tested on the RB922 board and the wAP AC router.

@ynezz ynezz added the target/ath79 pull request/issue for ath79 target label Mar 8, 2020
@adschm
Copy link
Member

adschm commented Mar 14, 2020

Since IIRC there was no response at all on this subject, let's just go on with this as the subtarget seems (unfortunately) the best solution for now.

I will have a closer look on the code later.

filenames get a duplicate "mikrotik" string, for the subtarget and for the vendor (e.g., openwrt-ath79-mikrotik-mikrotik_routerboard-922uags-5hpacd-squashfs-sysupgrade.bin)

Yes, that's not nice, but I'd still keep it for consistency.

When we added the first mikrotik device to ath79, I had the idea to call the subtarget "minor" instead of "mikrotik", but I'm not sure yet whether this is really an improvement for the entire situation.

@adschm
Copy link
Member

adschm commented Mar 14, 2020

@xback Can you check the symbols in new config-default for mikrotik target

@rogerpueyo
Copy link
Contributor Author

Thanks, Adrian. :)

When we added the first mikrotik device to ath79, I had the idea to call the subtarget "minor" instead of "mikrotik", but I'm not sure yet whether this is really an improvement for the entire situation.

Yup, mikrotik_mikrotik is not nice, but is consistent. "minor" makes sense since the subtarget has the MiNor-type MTD, but it might be mistakenly understood by something in between "generic" and "tiny", who knows.

@adschm
Copy link
Member

adschm commented Mar 15, 2020

Looks good despite my comments and the config-default files where I would rely on @xback for judgement.

Your comment about the possible "minor" misunderstanding complements my other concerns, so let's just stay with mikrotik.

This commit creates the ath79/mikrotik subtarget in order to support
MikroTik devices based on Qualcomm Atheros MIPS SoCs.

MikroTik devices need a couple of specific features: the split MiNOR
firmware MTD format, which is not used by other devices, and the 4k
sector erase size on SPI NOR storage, which can not be added to the
ath79/generic and ath79/nand subtargets now.

Additionally, the commit moves the two MikroTik devices already in
the generic and nand subtargets to this new one.

Tested on the RB922 board and the wAP AC router.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
@rogerpueyo rogerpueyo changed the title [RFC] ath79: add mikrotik subtarget ath79: add mikrotik subtarget Mar 15, 2020
@adschm
Copy link
Member

adschm commented Mar 17, 2020

I've decided to merge this now as it somehow blocks development for mikrotik on ath79.
If we need to adjust kernel config afterwards, that should be easy to do ...

@adschm adschm closed this Mar 17, 2020
@rogerpueyo
Copy link
Contributor Author

Great!

@ch6574
Copy link
Contributor

ch6574 commented Mar 24, 2020

Should this PR now mean we get snapshots appearing in https://downloads.openwrt.org/snapshots/targets/ath79/mikrotik/ ?

@f00b4r0
Copy link
Contributor

f00b4r0 commented Mar 24, 2020

The subtarget isn't autobuilt yet. Given it seems there is a problem with the handling of the soft_config partition erasesize, I recommend it remains that way for a bit longer to prevent "average users" from risking to trash their flash. I'm trying to isolate this regression.

@f00b4r0
Copy link
Contributor

f00b4r0 commented Mar 28, 2020

A bit of extra info, I think I spotted part of the problem (re erasesize issues): http://git.openwrt.org/9261e7447

I'm still investigating, it would also seem that 4K_SECTORS_LIMIT is also broken in 4.19

For now the ramips and ar71xx mikrotik devices are unaffected since they still run 4.14, in which the bug(s) is/are absent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target/ath79 pull request/issue for ath79 target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants