Re: [PATCH]: cmd: part: add part block command

2020-06-02 Thread razvan becheriu
know. I can change name of the sub-command or implement this in a different way, if needed. Thank you, Razvan On 2020-06-02 at 18:51, tr...@konsulko.com wrote: > On Tue, Jun 02, 2020 at 11:36:48AM -0700, razvan becheriu wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA2

Re: [PATCH]: cmd: part: add part block command

2020-06-02 Thread razvan becheriu
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 here is the implementation of the functions: # function ota_conv_sizes # Convert a bytes size to a block size # input bytesize : size in bytes to convert # input blksize : size of a block in bytes # output num_blk : converted size in blocks

Re: [PATCH]: cmd: part: add part block command

2020-06-02 Thread razvan becheriu
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 setexpr can compute the divide/multiply part, but we still need to get the partition block size somehow. I know that this is 0x200 by default, but we can not hardcode that in the scripts. we should read that from the partition info. On 2020-06-02

[PATCH]: cmd: part: add part block command

2020-06-01 Thread razvan . becheriu
The Intel Edison OTA process requires a conversion of data size from bytes to number of blocks. The following functions are used: # function ota_conv_sizes # Convert a bytes size to a block size # input bytesize : size in bytes to convert # input blksize : size of a

[PATCH] cmd: part: Add 'block' sub-command

2020-06-01 Thread razvan . becheriu
From: Razvan Becheriu Add part block sub-command which returns block size. e.g.: part block mmc $mmcdev system_a system_a_index Signed-off-by: Razvan Becheriu --- cmd/part.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/cmd/part.c b/cmd/part.c index

[PATCH] cmd: part: Add 'block' sub-command

2020-04-21 Thread razvan becheriu
>From 4376dc705acefb5b5281d32dcc1cb5084c61f99c Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Wed, 22 Apr 2020 00:17:33 +0300 Subject: [PATCH] cmd: part: Add 'block' sub-command Add part block sub-command which returns partition block size. e.g.: part block mmc $mmc