From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 10 Jan 2020 16:50:52 -0500 Subject: [PATCH 3/3] cmd: adtimg: Refactor usage style In-Reply-To: <20191224165108.2836-4-erosca@de.adit-jv.com> References: <20191224165108.2836-1-erosca@de.adit-jv.com> <20191224165108.2836-4-erosca@de.adit-jv.com> Message-ID: <20200110215052.GR31026@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Dec 24, 2019 at 05:51:08PM +0100, Eugeniu Rosca wrote: > 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 - Print image contents > adtimg start - Get DT address by index > adtimg size - Get DT size by index > > [5] New usage > adtimg addr - Set image location to > adtimg dump - Print out image contents > adtimg get dt --index= [avar [svar]] - Get DT address and size by index > > [6] Soon-to-be-provided "by id|rev" add-on functionality > adtimg get dt --id= --rev= [avar [svar [ivar]]] > - Get DT address/size/index by id|rev fields > > Signed-off-by: Eugeniu Rosca > Reviewed-by: Sam Protsenko Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: