21 Commits

Author SHA1 Message Date
Arif Alam
a6fdd32e40 cmd_upgrade: enable curl to follow redirects
Add -L flag to curl download command to automatically follow HTTP
redirects when downloading firmware images. This ensures that upgrade
operations work correctly when the firmware URI returns a redirect
response (e.g., 301, 302).

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-12-11 06:16:11 +01:00
John Crispin
e155483ea0 command: update upgrade and factory commands to handle new operational certs
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-13 07:49:59 +02:00
Paul White
b4cfdc6a1c cmd_upgrade: implement secure download
This implements secure download by adding additional fields to the
upgrade command payload:

  - use-local-certificates (boolean): When provided, enables secure download
    and if true uses built-in certificates, if false requires below fields
  - ca-certificate (string): base64 encoded cas.pem
  - certificate (string): base64 encoded cert.pem
  - private-key (string): base64 encoded key.pem

The following additional changes are included:
  - Switches from wget to curl for downloading as curl supports using
    certificates and in general seems more reliable
  - An automatic download retry was added before reporting the failure
  - When download fails, provides both exit code & http code to the cloud

Fixes: WIFI-14643
Signed-off-by: Paul White <paul@shasta.cloud>
2025-05-26 16:17:29 +02:00
John Crispin
e2cef05c78 return a success message before triggering FW upgrade
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-13 09:53:38 +01:00
John Crispin
71f42ca0f3 add keep_config to upgrade command
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-23 08:27:22 +02:00
John Crispin
2e6be837cb keep-redirector should store the new gateway.json instead
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:40 +02:00
John Crispin
e156652c1b FWsignature->signature
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-28 08:53:54 +02:00
John Crispin
47f39e9e1d cmd_upgrade: signature requirement was not properly detected
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-14 09:24:53 +02:00
John Crispin
27b1d45c98 cmd_upgrade: create /ucentral.upgrade
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-17 15:40:38 +02:00
John Crispin
e30b05f369 propagate reboot_cause
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-16 14:05:50 +02:00
John Crispin
4b86496e07 fix generation of upgrade.tgz
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-11 14:55:27 +02:00
John Crispin
c3f6981844 sysupgrade: GW sends FWsignature and not signature
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-13 09:02:09 +01:00
John Crispin
77f1d1d42f use correct rstriction property during upgrade
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-12 13:57:03 +01:00
John Crispin
eb0c25c1f3 add signature verification wrapper
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-21 06:32:10 +01:00
John Crispin
d40b4c676c add FCC restriction support
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-31 09:19:09 +01:00
John Crispin
81f1886bea convert system and command scripts to raw mode
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-20 15:02:25 +02:00
John Crispin
439a29dc91 command: keep profile.json when doing sysupgrade of factory reset
Signed-off-by: John Crispin <john@phrozen.org>
2021-07-01 16:35:44 +02:00
John Crispin
9c18a7b604 command: add dying gasp to upgrade script
Signed-off-by: John Crispin <john@phrozen.org>
2021-06-28 14:12:09 +02:00
John Crispin
3eb43a120f command: do an implicit factory reset when flashing a new image
Signed-off-by: John Crispin <john@phrozen.org>
2021-06-16 09:00:42 +02:00
John Crispin
057864d0bc schema: preserve GW settings when doing a factory reset
Signed-off-by: John Crispin <john@phrozen.org>
2021-05-23 09:08:27 +02:00
John Crispin
9585ababf7 schema: move over to the new schema/renderer
Signed-off-by: John Crispin <john@phrozen.org>
2021-05-14 10:39:10 +02:00