[PATCH] net: tftp: fix progress marker for file transfer

2020-05-08 Thread Ravik Hasija
During packet sequence number wraparound the show_block_marker() API was not called, as a result the progress marker doesn't stay within column boundary. Use position in file instead of sequence number to align the marker. Signed-off-by: Ravik Hasija --- net/tftp.c | 16 +--- 1 file

[PATCH] net: tftp: fix option validation as per RFCs

2020-05-18 Thread Ravik Hasija
RFC2348, RFC2349: - Option string is case in-sensitive. - Client must generate ERR pkt in case option value mismatch in server OACK - Fix debug print for options Signed-off-by: Ravik Hasija --- net/tftp.c | 59 +++--- 1 file changed, 52

Re: [PATCH v4] net: tftp: Add client support for RFC 7440

2020-06-04 Thread Ravik Hasija
On Wed, Jun 3, 2020 at 5:55 AM Ravik Hasija rahasij@.microsoft wrote: > > Ramon Fried-4 wrote > > + if (strcmp((char *)pkt + i, "windowsize") == 0) { > > For servers that doesnt support windowsize option the above check could > > result in

Re: [PATCH v4] net: tftp: Add client support for RFC 7440

2020-06-02 Thread Ravik Hasija
Ramon Fried-4 wrote > + if (strcmp((char *)pkt + i, "windowsize") == 0) { > For servers that doesnt support windowsize option the above check could > result in accessing memory outside of valid range. Please check if (i+11) > < len before comparing the strings. > > > + > +

Re: [PATCH v2] cmd: mmc: add mmcboot command

2021-01-07 Thread Ravik Hasija
> I think that it's not good about building disk.c by default when CONFIG_CMD_MMC is enabled. Agree, its not an optimal solution. However, we chose to do it this way because: - It causes minimal change to the size of binary (~200 bytes). - To be consistent with upstream code where it is built

[PATCH] cmd: mmc: add mmcboot command

2020-12-23 Thread Ravik Hasija
for CONFIG_SUPPORT_EMMC_BOOT (suggested by checkpatch.pl). Signed-off-by: Ravik Hasija Signed-off-by: Dhananjay Phadke --- cmd/mmc.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/cmd/mmc.c b/cmd/mmc.c index 1529a3e05d..4d134e35a1 100644 --- a/cmd/mmc.c +++ b/cmd/mmc.c

Re: [PATCH v2] cmd: mmc: add mmcboot command

2021-01-05 Thread Ravik Hasija
> Can this not be implemented by some U-Boot script ? > I can imagine that reading the first few bytes from the partition (mmc > read) would permit you to obtain the uImage/fitImage header from the > partition, from which you can obtain the image size, which is the total > number of bytes to read

[PATCH] cmd: disk: Remove fit_print_contents API

2021-01-08 Thread Ravik Hasija
fit_print_contents prints similar fit information as printed in bootm stages. Removing this API reduces redundancy & provides improvement in boottime. Signed-off-by: Ravik Hasija --- cmd/disk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/disk.c b/cmd/disk.c index 8060e7

[PATCH] common: Kconfig.boot: Add FIT_PRINT config option

2021-01-19 Thread Ravik Hasija
Config allows to disable printing contents of fitImage to optimize boottime. Signed-off-by: Ravik Hasija --- common/Kconfig.boot | 6 ++ common/image-fit.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common/Kconfig.boot b/common/Kconfig.boot index 4525a12ab4

[PATCH v2] cmd: mmc: add mmcboot command

2021-01-04 Thread Ravik Hasija
for CONFIG_SUPPORT_EMMC_BOOT (suggested by checkpatch.pl). Signed-off-by: Ravik Hasija Signed-off-by: Dhananjay Phadke Reviewed-by: Jaehoon Chung Reviewed-by: Simon Glass --- v2: * Fixed build failure. * Updated syntax of mmcboot cmd. --- cmd/Makefile | 2 +- cmd/mmc.c| 22

[PATCH v2] common: Kconfig.boot: Add FIT_PRINT config option

2021-01-27 Thread Ravik Hasija
Config allows to disable printing contents of fitImage to optimize boottime. Signed-off-by: Ravik Hasija Reviewed-by: Simon Glass --- Changes for v2: - updated macro to check for CONFIG - fixed comment to reflect correct condition check --- common/Kconfig.boot | 6 ++ common/image

[PATCH v2] common: Kconfig.boot: Add FIT_PRINT config option

2021-01-27 Thread Ravik Hasija
Config allows to disable printing contents of fitImage to optimize boottime. Signed-off-by: Ravik Hasija Reviewed-by: Simon Glass --- Changes for v2: - updated macro to check for CONFIG - fixed comment to reflect correct condition check --- common/Kconfig.boot | 6 ++ common/image

[PATCH v2] cmd: gpt: remove redundant print messages

2021-03-31 Thread Ravik Hasija
Removing printfs from do_gpt API as the messages are generic and does not specify error codes for failure cases. Signed-off-by: Ravik Hasija Reviewed-by: Patrick Delaunay --- Changes for v2: - Updated usage message for gpt read - Added removed printfs for write & verify - Rearra

[PATCH] cmd: gpt: remove redundant print messages

2021-03-30 Thread Ravik Hasija
Removing printfs from do_gpt API as the messages are generic and does not specify error codes for failure cases. Signed-off-by: Ravik Hasija --- cmd/gpt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmd/gpt.c b/cmd/gpt.c index 76a95ade6c..2c516745b0 100644 --- a/cmd/gpt.c +++ b/cmd