* [U-Boot] [PATCH] dfu:ext4:fix Fix ext4{read|write} command formatting
@ 2013-06-24 14:18 Lukasz Majewski
2013-06-26 14:41 ` Lukasz Majewski
0 siblings, 1 reply; 4+ messages in thread
From: Lukasz Majewski @ 2013-06-24 14:18 UTC (permalink / raw)
To: u-boot
In the following commit:
"dfu: Support larger than memory transfers."
SHA1: ea2453d56b8860dbd18a3c517531ffc8dcb5c839
The ext4{read|write} command formatting has been changed. It removed
a mandatory [sizebytes] parameter.
It prevented from ext4 update via dfu. This commit restored the previous
behaviour.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Tom Rini <trini@ti.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
---
drivers/dfu/dfu_mmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index e2f3978..032c6a7 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -94,10 +94,10 @@ static int mmc_file_op(enum dfu_mmc_op op, struct dfu_entity *dfu,
sprintf(cmd_buf + strlen(cmd_buf), " %lx", *len);
break;
case DFU_FS_EXT4:
- sprintf(cmd_buf, "ext4%s mmc %d:%d 0x%x /%s",
+ sprintf(cmd_buf, "ext4%s mmc %d:%d 0x%x /%s %ld",
op == DFU_OP_READ ? "load" : "write",
dfu->data.mmc.dev, dfu->data.mmc.part,
- (unsigned int) buf, dfu->name);
+ (unsigned int) buf, dfu->name, *len);
break;
default:
printf("%s: Layout (%s) not (yet) supported!\n", __func__,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] dfu:ext4:fix Fix ext4{read|write} command formatting
2013-06-24 14:18 [U-Boot] [PATCH] dfu:ext4:fix Fix ext4{read|write} command formatting Lukasz Majewski
@ 2013-06-26 14:41 ` Lukasz Majewski
2013-06-26 15:05 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Lukasz Majewski @ 2013-06-26 14:41 UTC (permalink / raw)
To: u-boot
Hi Tom,
> In the following commit:
> "dfu: Support larger than memory transfers."
> SHA1: ea2453d56b8860dbd18a3c517531ffc8dcb5c839
>
> The ext4{read|write} command formatting has been changed. It removed
> a mandatory [sizebytes] parameter.
>
> It prevented from ext4 update via dfu. This commit restored the
> previous behaviour.
Tom, please drop this patch, since it only fixes DFU eMMC write.
Unfortunately after dfu.c code changes to support NAND and arbitrary
files transmission, the eMMC ext4 read needs to be fixed.
I will prepare one patch set, which fixes read and write.
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] dfu:ext4:fix Fix ext4{read|write} command formatting
2013-06-26 14:41 ` Lukasz Majewski
@ 2013-06-26 15:05 ` Tom Rini
2013-06-26 15:27 ` Lukasz Majewski
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2013-06-26 15:05 UTC (permalink / raw)
To: u-boot
On Wed, Jun 26, 2013 at 04:41:28PM +0200, Lukasz Majewski wrote:
> Hi Tom,
>
> > In the following commit:
> > "dfu: Support larger than memory transfers."
> > SHA1: ea2453d56b8860dbd18a3c517531ffc8dcb5c839
> >
> > The ext4{read|write} command formatting has been changed. It removed
> > a mandatory [sizebytes] parameter.
> >
> > It prevented from ext4 update via dfu. This commit restored the
> > previous behaviour.
>
> Tom, please drop this patch, since it only fixes DFU eMMC write.
>
> Unfortunately after dfu.c code changes to support NAND and arbitrary
> files transmission, the eMMC ext4 read needs to be fixed.
>
> I will prepare one patch set, which fixes read and write.
Ouch, sorry. I thought I had tested those cases still.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130626/b8f03620/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] dfu:ext4:fix Fix ext4{read|write} command formatting
2013-06-26 15:05 ` Tom Rini
@ 2013-06-26 15:27 ` Lukasz Majewski
0 siblings, 0 replies; 4+ messages in thread
From: Lukasz Majewski @ 2013-06-26 15:27 UTC (permalink / raw)
To: u-boot
On Wed, 26 Jun 2013 11:05:31 -0400, Tom Rini wrote:
> On Wed, Jun 26, 2013 at 04:41:28PM +0200, Lukasz Majewski wrote:
> > Hi Tom,
> >
> > > In the following commit:
> > > "dfu: Support larger than memory transfers."
> > > SHA1: ea2453d56b8860dbd18a3c517531ffc8dcb5c839
> > >
> > > The ext4{read|write} command formatting has been changed. It
> > > removed a mandatory [sizebytes] parameter.
> > >
> > > It prevented from ext4 update via dfu. This commit restored the
> > > previous behaviour.
> >
> > Tom, please drop this patch, since it only fixes DFU eMMC write.
> >
> > Unfortunately after dfu.c code changes to support NAND and arbitrary
> > files transmission, the eMMC ext4 read needs to be fixed.
> >
> > I will prepare one patch set, which fixes read and write.
>
> Ouch, sorry. I thought I had tested those cases still.
>
With RAW_ADDR from very beginning, we can read chunk by chunk when
proper request from DFU arrives.
With e.g. DFU_FS_EXT4 we first need to read all data from file system
to a buffer (dfu_buf) and then give it to DFU gadget piece by piece.
I will fix this and share patches.
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-26 15:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24 14:18 [U-Boot] [PATCH] dfu:ext4:fix Fix ext4{read|write} command formatting Lukasz Majewski
2013-06-26 14:41 ` Lukasz Majewski
2013-06-26 15:05 ` Tom Rini
2013-06-26 15:27 ` Lukasz Majewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox