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-nand: (re)add hiveap-121 #2552

Merged

Conversation

AiyionPrime
Copy link
Member

@AiyionPrime AiyionPrime commented Jun 16, 2022

ath79-nand: (re)add hiveap-121

Gone due to
commit 45c84a117bf8 ("ar71xx: drop target")

ath79-nand: add vendor to GL.iNet devices

@kpanic23 intends to test this device starting monday.

  • Must be flashable from vendor firmware
  • Must support upgrade mechanism
    • Must have working sysupgrade
      • Must keep/forget configuration (sysupgrade [-n], firstboot)
    • Gluon profile name matches autoupdater image name
      (lua -e 'print(require("platform_info").get_image_name())')
  • Reset/WPS/... button must return device into config mode
  • Primary MAC address should match address on device label (or packaging)
    (https://gluon.readthedocs.io/en/latest/dev/hardware.html#notes)
    • When re-adding a device that was supported by an earlier version of Gluon, a
      factory reset must be performed before checking the primary MAC address, as
      the setting from the old version is not reset otherwise.
  • Wired network
    • should support all network ports on the device
    • must have correct port assignment (WAN/LAN)
      • On devices supplied via PoE, there is usually no explicit WAN/LAN labeling on the hardware.
        The PoE input should be the WAN port in this case.
  • Wireless network (if applicable)
    • Association with AP must be possible on all radios
    • Association with 802.11s mesh must work on all radios
    • AP+mesh mode must work in parallel on all radios
  • LED mapping
    • Power/system LED
    • Radio LEDs none
      • Should map to their respective radio
      • Should show activity
    • Switch port LEDs has none
      • Should map to their respective port (or switch, if only one led present)
      • Should show link state and activity
  • Outdoor devices only:
    • Added board name to is_outdoor_device function in package/gluon-core/luasrc/usr/lib/lua/gluon/platform.lua

@github-actions github-actions bot added 3. topic: docs Topic: Documentation 3. topic: hardware Topic: Hardware Support labels Jun 16, 2022
@AiyionPrime AiyionPrime force-pushed the ath79-migrate-hiveap-121 branch from 4d1bc0d to 4724267 Compare July 15, 2022 09:02
@AiyionPrime AiyionPrime force-pushed the ath79-migrate-hiveap-121 branch from 4724267 to 82fd035 Compare July 31, 2022 14:46
@AiyionPrime
Copy link
Member Author

The patch appears to work well. Checklist follows, when @kpanic23 gets to it.

@blocktrron The patch I'd like to hand in at OpenWrt would use symlinks instead of copies, so would not increase the sysupgrade-imagesize this drastically.
It will contain some logic to handle symlinks in the updater, so it will not help in this migration.

I'd recommend to keep this patch as long as the migrations from ar71xx.

@AiyionPrime AiyionPrime added the 2. status: merge conflict The merge has a conflict and needs rebasing label Jan 21, 2023
Direct migration from 19.07 is currently not possible.

Gone due to
commit 45c84a1 ("ar71xx: drop target")
@AiyionPrime AiyionPrime force-pushed the ath79-migrate-hiveap-121 branch from 82fd035 to a18510c Compare February 1, 2023 21:27
@AiyionPrime AiyionPrime changed the title Ath79 migrate hiveap 121 ath79-nand: (re)add hiveap-121 Feb 1, 2023
@AiyionPrime AiyionPrime removed the 2. status: merge conflict The merge has a conflict and needs rebasing label Feb 1, 2023
@Djfe
Copy link
Contributor

Djfe commented Feb 6, 2023

How is this coming along? Do you need an active tester?
There are 5 of these installed and used in Freifunk Aachen. I could try getting into contact with one of the owners to avoid this from being dropped.

@AiyionPrime
Copy link
Member Author

There are few options for this device; one is to re-add it without adding a migration.
Owners of the device will need to manually update their router.
@kpanic23 received an image for testing this approach last week.
He'll get to it.

The other approach would have been a proper migration, involving upstream patches of tar based sysupgrades, backporting them and then a two image based update; one to have the migration and one two recognize it.
This would have been a little to much effort for the few devices deployed.

A compromise would have included keeping a downstream patch. And at least one update would have been double the size of a regular update.
@blocktrron didn't like that approach to much.
So unless someone is willing to refactor and upstream the sysupgrade-tar-patch, this will stay without migration. Sorry :/

@Djfe
Copy link
Contributor

Djfe commented Feb 7, 2023

how does the manual user interaction look like? do they have to return to factory and then flash?

edit:
is the two image approach used for other ath79 devices as well? what do we need two updates for? (is there maybe a post on an issue that explains this further? I get what you just explained to me but this is the first I read about needing two updates to complete the dsa migration and I wonder why. Are there sysupgrade paths that were never modified upstream to support dsa migration and tar is one of those rarer paths?)

@AiyionPrime
Copy link
Member Author

how does the manual user interaction look like? do they have to return to factory and then flash?

sysupgrade -nF <image>

edit: is the two image approach used for other ath79 devices as well?

Upstream there might be more, anything that used sysupgrade-tar and changed its board_name.

what do we need two updates for?

While you need the update to contain a reference to the old board_name, you also need the update process in the router to be able to handle such references correctly.
Neither is done yet, so if you currently implemented such references by e.g. symlinks, the currently running images won't be able to unpack the update properly.
So you'll need an update of the stable branch which contains code that handles such references/symlinks properly.

(is there maybe a post on an issue that explains this further?

I don't think so.
You can look at past commits of this PR to see the compromise I described above.
82fd035

Maybe some past protocol of a developer meetup contains an explanation; I explained it and our options at some point, when blocktrron dismissed the approach with the bloated image and the staying patch in the old-stable branch.

I get what you just explained to me but this is the first I read about needing two updates to complete the dsa migration and I wonder why.

It's not the DSA migration, that requires a second update, but the implicit modification of sysupgrade-tar, which is necessary due to changes in the board_name of the device, which happened while cleaning up devices in the migration.

Are there sysupgrade paths that were never modified upstream to support dsa migration and tar is one of those rarer paths?)

Not many anymore, I'd say. And this is not necessary for the DSA-migration, but just happened during it.

@AiyionPrime AiyionPrime added the 5. needs: testing Testing of the changes is necessary label Feb 21, 2023
@blocktrron
Copy link
Member

CLosing as discussed at last meeting. This can be re-opened once someone is interested to pursue this further.

@blocktrron blocktrron closed this Apr 16, 2023
@AiyionPrime
Copy link
Member Author

@kpanic23 Just finished testing the proposed changes. Results are above, this is ready for review.

@AiyionPrime AiyionPrime reopened this Apr 24, 2023
@AiyionPrime AiyionPrime added 2. status: waiting-on-review Awaiting review from the assignee but also interested parties. and removed 5. needs: testing Testing of the changes is necessary labels Apr 24, 2023
@AiyionPrime AiyionPrime marked this pull request as ready for review April 24, 2023 21:40
@AiyionPrime
Copy link
Member Author

I just ran make lint-editorconfig locally, no issues.
GitHubs networking ftw.

@AiyionPrime AiyionPrime added the backport v2022.1.x Backport this pull request to v2022.1.x label Apr 24, 2023
@blocktrron blocktrron merged commit 8b5a282 into freifunk-gluon:master May 2, 2023
@github-actions
Copy link

github-actions bot commented May 2, 2023

Successfully created backport PR for v2022.1.x:

@Djfe
Copy link
Contributor

Djfe commented Feb 4, 2024

update-path from v2021 is not working. see #3181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. status: waiting-on-review Awaiting review from the assignee but also interested parties. 3. topic: docs Topic: Documentation 3. topic: hardware Topic: Hardware Support backport v2022.1.x Backport this pull request to v2022.1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants