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

razvan becheriu razvan.becheriu at gmail.com
Tue Jun 2 21:23:52 CEST 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

hm...

It seems that the changes never reached upstream:

git://github.com/01org/edison-u-boot.git branch edison-v2014.04

this branch was implementing 'part info' sub-command which was useful to
retrieve partition info.

the new repo:

git://github.com/edison-fw/u-boot.git branch acpi-v2020.04 does implement
'part number' but does not implement neither 'info' or 'block'.

I do not insist for you to take this patch, but I think it is useful (it is
the simplest version which supports all needed functionality).

If you think the same, let me 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, trini at konsulko.com wrote:
> 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
-----BEGIN PGP SIGNATURE-----
Version: FlowCrypt 7.7.7 Gmail Encryption
Comment: Seamlessly send and receive encrypted email

wsFcBAEBCAAGBQJe1qdHAAoJECfW4OyT2xPzjDsQAMJXfApPKklwOEWoUXdV
NslWt02UhJrdgg5kztuPxiaHH5sdTEwBj98Ub6B8guhBDeIIoHPp8NYEyRLj
MrCQTsAaM5+QyB1V2BVm7ZYEcTFrpAoaXy0gwKFKllzixpsGEv+99PqT5wDV
ihGLwYWjoTZXCEVazYSoGPWp10s0qpkWmXsCHhGp8GYl1t5Ut0oif8RIx6jl
xGIFXs9vpKi2jsklx4SYSNdpdMPjzB0y+ssG1T5VjovAmb6O/0y0Cv+i+ZYS
UaoJRRMSpwHQ3UNVfuB4TdH7CRiDl8QX2mPCK28JYJSRqxHj7cyD8urp6brE
8xOzIcbb873I3BLXcITkIkcHBRvkp3durqWrmPcSRn0UtqdXaSKv1q9c3LeV
9rQNhE6vF2KmuKm8P5BuLNFUUlkRcf9umRDXm22e8Fah/S82WD08Uh+o5GBB
YzLuXjFfKYCcyi/aQDl3OYpQ3fBZUrmAzJQpPJ/RpsmFAQTJH1QIq98P21Kx
qTUCQPKpctgXlDxx3UgCitN/NXbGTXUVQmBvLZm62Ch750VaBtYf70tSzQYE
n+p5P+EhEfy5MQmU9XWnJ1LIc9TirOGn7IUzu0p+BxT4b+qpazkWQUvhkNB5
R4rfUwr0wcouMi1jzgEinriYAhU90ezKZOBA2ENsr6aPnhgXwdG9nGEcCX4A
UpZA
=OUpE
-----END PGP SIGNATURE-----


More information about the U-Boot mailing list