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

safe-upgrade: update calibration data partition name #1098

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

G10h4ck
Copy link
Member

@G10h4ck G10h4ck commented Mar 20, 2024

DISCLAIMER: Breaks safe-upgrade retrocompatibility!

Newer OpenWrt rely on calibration data MTD partitions being named 'art' older OpenWrt on which librerouterOS 1.5 is based, looked for calibration calibration data for on-SoC radio on 'ART' partition. In particular librerouter v1 have an on SoC radio which have calibration data in art partition, safe-upgrade can either support older OpenWrt version or newer, but not both at least without change the code drastically. Here in development branch let's support new OpenWrt.

DISCLAIMER: Breaks safe-upgrade retrocompatibility!

Newer OpenWrt rely on calibration data MTD partitions being named 'art'
older OpenWrt on which librerouterOS 1.5 is based, looked for calibration
calibration data for on-SoC radio on 'ART' partition.
In particular librerouter v1 have an on SoC radio which have calibration data
in art partition, safe-upgrade can either support older OpenWrt version or
newer, but not both at least without change the code drastically.
Here in development branch let's support new OpenWrt.
@G10h4ck G10h4ck added this to the mesh-wide milestone Mar 20, 2024
@spiccinini
Copy link
Contributor

When I hardcoded the partiions name years ago I tought that if the partitions name changed then they should come with the upgrade file so that it is not hardcoded here. So maybe sesrching for a specific env variable or file somewhere and use that or default to the hardcoded values is valuable?

@G10h4ck
Copy link
Member Author

G10h4ck commented Mar 24, 2024

One of the big problems is that such environments variables or config files where we could get such information, differ between the running system (the one where safe-upgrade is executed) and the image one is going to flash, so the running safe-upgrade is the old one in the old image and can access the information in the old image, while we would need the information stored in the new image, unless we mount the new image and look into it do discover such information we cannot de-hardcode the info.

@spiccinini
Copy link
Contributor

eupgrade supports an installer type that we used in the past to provide this kind of upgrades. The installer is just a .sh script that can also contain the image binary.
I created this tool https://github.com/spiccinini/shellbinscript that embeds files inside the installer.sh script. In that way we provided a new safe-upgrade to not rely in the one already installed.
In this repo there are some install scripts we used in the past: https://gitlab.com/librerouter/lros-installersh-scripts/-/tree/v1.5?ref_type=heads

So the idea can to just use the installer type, providing the bootargs alongside the image. Other idea is to put the bootargs as metadata of the image (the image currently has the board name as metadata)

@G10h4ck G10h4ck merged commit 70b08a6 into libremesh:master Apr 24, 2024
1 check passed
@ilario
Copy link
Member

ilario commented Apr 24, 2024

Should we pick this to the 2024.1 branch? Is this good or bad for the next release candidate?

@G10h4ck
Copy link
Member Author

G10h4ck commented Apr 24, 2024

@ilario this is needed if you plan to use safe-upgrade with librerouter v1 devices based on OpenWrt current release

@ilario
Copy link
Member

ilario commented Apr 24, 2024

So I understand that yes, it should be included in the next release candidate.
Thanks

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