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

razvan becheriu razvan.becheriu at gmail.com
Tue Jun 2 20:08:19 CEST 2020


-----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 at 17:55, trini at konsulko.com wrote:
> On Mon, Jun 01, 2020 at 01:20:25PM +0300, razvan.becheriu at gmail.com
wrote:
> >
> >     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 block in bytes
> >     # output num_blk  : converted size in blocks
> >
> >     # function ota_mmc_write
> >     # Write a memory buffer to mmc drive
> >     # input floadaddr    : address of buffer to write
> >     # input u_part_start : block start in mmc
> >     # input num_blk      : number of block to write
> >
> >     This patch adds the cmd part sub-command 'block' which returns
> >     the partition block size in bytes.
>
> This is usually done with the setexpr command today, thanks!
>
> --
> Tom
-----BEGIN PGP SIGNATURE-----
Version: FlowCrypt 7.7.7 Gmail Encryption
Comment: Seamlessly send and receive encrypted email

wsFcBAEBCAAGBQJe1pWTAAoJECfW4OyT2xPzMlgQAJVisTh8t9wGyC0vGmt0
B3vdRqbo2KyHILomQffFSvPxw2s3KiXSCYzL7rXe+rnSQhVAylnCoM2NQSxi
66alVw6yQzxdLSmOddQmemuH5AEpVV3XFRfG4t78upRarfDffQn2xAy0OFs4
/1jrAktvxcXvaZetwu3Idi/lzoFynqT44Nbv1xpjRJgGyTseZh9xXCB5f6rr
sxQTAq5H7Ez+v2XkXtQLoJJnO51N4lBjjoXv+nbWYYBwBOLgOlQMXDNVpY4W
mY4Dc71GEl2YH7tF7mpzKNZuOKUUpLlMh5FOm17QsL3XjuORIUhwUjKYKzIR
kWRi/Inr4MoYH7eIlK/CCzXEMkrLSAkforcrN2kuolY229vGVuDiSUsrFawV
xfsqGTLGKJmYnYXiBDNSrqOQGSk4UDLydP/EAGxyvwq4m2pVLRQlVxttfejU
aD0eh1x6QLBTC2B55VlASyg8KFnobpUMJEWiMJMa3lcytbGLahqSbEax9ZF3
5rdsxWXuW6rv4zJvKzAnSt6dz3qI6vDJy3/5RoE0Zoxp9O5p7uSsTMPxpu2b
bDYoJY4+Th5MNXQYb7F2WAj1G42a1J6QNM3RsTFbDULYCSLPxqa5dOhLJI+U
Fv9ezGedKkAAhmeKhfFVqCX1O5UGIPrYfV5NRDRFVpmNXd4GjhRfSs0Ozfdw
D0ty
=Nf5n
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x27D6E0EC93DB13F3.asc
Type: application/pgp-keys
Size: 3236 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200602/5df7ca30/attachment.key>


More information about the U-Boot mailing list