Eugeniu Rosca 4f731c795d cmd: adtimg: Refactor usage style
Trying to extend 'adtimg' functionality [1], we've been severely hit
by a major limitation in the command's usage scheme. Specifically, the
command's user interface appears to be too centric to getting the
DTB/DTBO entry [3] based on the index of the desired DT in the image,
which makes it really difficult retrieving the DT entry based on
alternative criteria (e.g. filtering by id/rev fields), the
latter being demanded by real life customer use-cases [1].

This went to the point of receiving below feedback from Sam [2]:

 -- snip --
 As for 'dtimg' command: after giving it some thought, I think not much
 people using it yet. So in this particular case I don't have some
 strong preference, and if you think the 'dtimg' interface is ugly, and
 it overcomes "don't break interfaces" rule, maybe now is a good time
 to rework it (before it gets widely used).
 -- snip --

Given the above, rework the usage pattern from [4] to [5], in order to
allow an intuitive enablement of "by id|rev" DT search [6].

[1] https://patchwork.ozlabs.org/cover/1202575/
    ("cmd: dtimg: Enhance with --id and --rev options (take #1)")
[2] https://patchwork.ozlabs.org/patch/1182207/#2317020
[3] https://source.android.com/devices/architecture/dto/partitions
[4] Old usage
adtimg dump <addr>                    - Print image contents
adtimg start <addr> <index> <varname> - Get DT address by index
adtimg size <addr> <index> <varname>  - Get DT size by index

[5] New usage
adtimg addr <addr>                      - Set image location to <addr>
adtimg dump                             - Print out image contents
adtimg get dt --index=<i> [avar [svar]] - Get DT address and size by index

[6] Soon-to-be-provided "by id|rev" add-on functionality
adtimg get dt --id=<id> --rev=<rev> [avar [svar [ivar]]]
 - Get DT address/size/index by id|rev fields

Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
2020-01-10 14:18:26 -05:00
..
2019-04-22 12:06:39 -04:00
2019-08-11 16:43:41 -04:00
2019-04-22 12:06:39 -04:00
2019-12-15 11:44:19 +08:00
2017-02-08 15:56:28 -05:00
2019-07-24 13:16:29 -04:00
2020-01-10 14:18:26 -05:00
2019-10-31 07:22:53 -04:00
2018-08-11 09:16:08 +02:00
2020-01-07 11:13:26 -05:00
2017-07-03 17:35:28 -04:00
2019-08-11 16:43:41 -04:00
2018-05-23 17:30:05 -04:00
2019-12-05 10:28:38 -05:00
2019-08-11 16:43:41 -04:00
2019-08-22 00:10:09 +02:00
2018-12-04 19:44:57 +01:00
2018-09-25 21:49:18 -04:00
2019-08-11 16:43:41 -04:00
2019-02-19 08:55:43 -05:00
2020-01-07 14:37:50 +01:00
2020-01-07 18:08:21 +01:00
2018-09-23 21:55:30 +02:00
2019-08-11 16:43:41 -04:00
2019-08-11 16:43:41 -04:00
2019-08-26 11:46:27 -04:00
2019-08-11 16:43:41 -04:00
2019-10-06 15:20:53 -04:00
2019-08-11 19:27:41 -04:00
2019-08-11 16:43:41 -04:00
2019-06-21 10:07:11 -04:00
2019-08-11 16:43:41 -04:00
2019-08-11 16:43:41 -04:00
2019-12-05 10:28:38 -05:00
2019-05-04 19:26:49 +02:00
2019-12-04 17:10:51 -05:00
2019-08-11 16:43:41 -04:00
2016-10-06 20:57:42 -04:00
2018-09-28 18:27:33 +02:00
2019-09-04 11:37:19 -05:00
2019-12-06 16:44:19 -05:00
2019-08-11 16:43:41 -04:00
2019-08-11 16:43:41 -04:00
2020-01-07 18:08:21 +01:00
2019-08-11 16:43:41 -04:00
2019-12-04 17:10:51 -05:00
2018-05-08 09:07:35 -04:00
2019-08-11 16:43:41 -04:00
2019-03-25 17:36:53 -04:00
2019-08-11 16:43:41 -04:00
2019-10-11 15:33:27 -04:00
2019-08-11 16:43:41 -04:00
2019-01-15 15:28:44 -05:00
2019-08-11 16:43:41 -04:00
2019-10-23 20:47:12 -04:00
2019-08-11 16:43:41 -04:00
2018-09-28 20:22:36 -04:00
2019-04-12 07:04:18 +02:00
2018-07-02 14:14:20 -05:00
2019-08-11 16:43:41 -04:00
2019-08-11 16:43:41 -04:00