All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH]: cmd: part: add part block command
Date: Tue, 2 Jun 2020 14:51:23 -0400	[thread overview]
Message-ID: <20200602185123.GS21630@bill-the-cat> (raw)
In-Reply-To: <CAJAoKi905qV86nGyzt6mJrmfY0OUR0JgjK1QcBg9NC8o5RY-Og@mail.gmail.com>

On Tue, Jun 02, 2020 at 11:36:48AM -0700, razvan becheriu wrote:
> -----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
> setenv ota_conv_sizes 'setexpr num_blk $bytesize / $blksize ; setexpr
> mod_blk $bytesize % $blksize ; if itest $mod_blk > 0 ; then setexpr num_blk
> $num_blk + 1; fi;'
> 
> # 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
> setenv ota_mmc_write 'if itest $ota_verbose == 1 ; then echo "mmc write
> ${floadaddr} ${u_part_start} ${num_blk};"; fi; mmc write $floadaddr
> $u_part_start $num_blk; ret=$?; if itest $ret != 0 ; then setenv
> ota_abort_reason "mmc write ${floadaddr} ${u_part_start} ${num_blk}
> failed"; setenv ota_abort 1; fi;'
> 
> the old u-boot version supported 'part info mmc 0:${u_part_num}
> u_part_start u_part_sz u_part_blksz;' to get the block size.

Old upstream U-Boot?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200602/cac556f5/attachment.sig>

  reply	other threads:[~2020-06-02 18:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 10:20 [PATCH]: cmd: part: add part block command razvan.becheriu at gmail.com
2020-06-01 10:20 ` [PATCH] cmd: part: Add 'block' sub-command razvan.becheriu at gmail.com
2020-06-02 17:55   ` Tom Rini
2020-06-02 17:55 ` [PATCH]: cmd: part: add part block command Tom Rini
2020-06-02 18:08   ` razvan becheriu
2020-06-02 18:30     ` Tom Rini
2020-06-02 18:36     ` razvan becheriu
2020-06-02 18:51       ` Tom Rini [this message]
2020-06-02 19:23         ` razvan becheriu
2020-06-05 18:01           ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200602185123.GS21630@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.