diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-08-23 08:15:23 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-04 13:44:05 +0200 |
commit | f65080793ce9c92eb63432ddd940a4a950882331 (patch) | |
tree | 5711d7bd64ef61dbfbab4ad2fab77001d33554d0 /package/utils/mdadm/Makefile | |
parent | 34002d5c8bff7c3893058829c5ed23882e6be1d1 (diff) | |
download | upstream-f65080793ce9c92eb63432ddd940a4a950882331.tar.gz upstream-f65080793ce9c92eb63432ddd940a4a950882331.tar.bz2 upstream-f65080793ce9c92eb63432ddd940a4a950882331.zip |
base-files: use JSON for storing firmware validation info
So far firmware validation result was binary limited: it was either
successful or not. That meant various limitations, e.g.:
1) Lack of proper feedback on validation problems
2) No way of marking firmware as totally broken (impossible to install)
This change introduces JSON for storing detailed validation info. It
provides a list of performed validation tests and their results. It
allows marking firmware as non-forceable (broken image that can't be
even forced to install).
Example:
{
"tests": {
"fwtool_signature": true,
"fwtool_device_match": true
},
"valid": true,
"forceable": true
}
Implementation is based on *internal* check_image bash script that:
1) Uses existing validation functions
2) Provides helpers for setting extra validation info
This allows e.g. platform_check_image() to call notify_check_broken()
when needed & prevent user from bricking a device.
Right now the new JSON info is used by /sbin/sysupgrade only. It still
doesn't make use of "forceable" as that is planned for later
development.
Further plans for this feature are:
1) Expose firmware validation using some new ubus method
2) Move validation step from /sbin/sysupgrade into "sysupgrade" ubus
method so:
a) It's possible to safely sysupgrade using ubus only
b) /sbin/sysupgrade can be more like just a CLI
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit f522047958f99ab7b506ec550f796c0460af1a85)
Diffstat (limited to 'package/utils/mdadm/Makefile')
0 files changed, 0 insertions, 0 deletions