19 Dec, 2013
2 commits
-
It is necessary to deter the host from sending subsequent DFU_GETSTATUS
request in the case of e.g. writing the buffer to medium.Here the timeout is increased when we fill up the whole buffer. This delay
allows eMMC memory to perform its internal operations.
Otherwise we end up with HOST's error regarding GET_STATUS receive timeout.Signed-off-by: Lukasz Majewski
-
The method for exporting size of allocated buffer is provided.
It is afterwards used by USB's dfu function code.Signed-off-by: Lukasz Majewski
21 Oct, 2013
2 commits
-
Define the dfu_get_buf() and dfu_free_buf() as global functions.
They are necessary for zero copy buffer management, when DFU backend is
used for storing data.Signed-off-by: Lukasz Majewski
-
New function - dfu_get_alt() - has been added to dfu core. If present, it
returns alt setting's number corresponding to passed name.Signed-off-by: Lukasz Majewski
24 Sep, 2013
5 commits
-
The download gadget code and DFU function lacks of proper declarations
for the case when a target board wants to use only one of available usb
functions.Moreover the relevant declarations have been moved to consistent
localization (like ).Signed-off-by: Lukasz Majewski
Cc: Marek Vasut -
DFU spec mentions it as a method to upgrade firmware (software stored
in writable non-volatile memory). It also says other potential uses of
DFU is beyond scope of the spec.Here such a beyond the scope use is being attempted - directly pumping
binary images from host via USB to RAM. This facility is a developer
centric one in that it gives advantage over upgrading non-volatile
memory for testing new images every time during development and/or
testing.Directly putting image onto RAM would speed up upgrade process. This and
convenience was the initial thoughts that led to doing this, speed
improvement over MMC was only 1 second though - 6 sec on RAM as opposed
to 7 sec on MMC in beagle bone, perhaps enabling cache and/or optimizing
DFU framework to avoid multiple copy for ram (if worth) may help, and
on other platforms and other boot media like NAND maybe improvement
would be higher.And for a platform that doesn't yet have proper DFU suppport for
non-volatile media's, DFU to RAM can be used.Another minor advantage would be to increase life of mmc/nand as it
would be less used during development/testing.usage: ram
eg. kernel ram 0x81000000 0x1000000Downloading images to RAM using DFU is not something new, this is
acheived in openmoko also.DFU on RAM can be used for extracting RAM contents to host using dfu
upload. Perhaps this can be extended to io for squeezing out register
dump through usb, if it is worth.Signed-off-by: Afzal Mohammed
Cc: Heiko Schocher
Cc: Marek Vasut
Cc: Lukasz Majewski
Cc: Pantelis Antoniou
Cc: Gerhard Sittig
Acked-by: Marek Vasut
Acked-by: Lukasz Majewski
Acked-by: Heiko Schocher -
MMC and NAND independently defines same enumerators for read/write.
Unify them by defining enum in dfu header. RAM support that is being
added newly also can make use of it.Signed-off-by: Afzal Mohammed
Cc: Heiko Schocher
Cc: Marek Vasut
Cc: Lukasz Majewski
Cc: Pantelis Antoniou
Acked-by: Lukasz Majewski
Acked-by: Marek Vasut
Acked-by: Heiko Schocher -
New dfu_init_env_entities() function has been extracted from cmd_dfu.c and
stored at dfu core.This is a dfu centric code, so it shall be processed in the core.
Change-Id: I756c5de922fa31399d8804eaadc004ee98844ec2
Signed-off-by: Lukasz Majewski
Tested-by: Heiko Schocher -
Up till now the DFU maximum file size (to be written to e.g. eMMC)
was different from the DFU data buffer size. It caused errors when
one buffer was smaller than data to be written.Now, the maximum DFU file size is equal to default DFU buffer size.
In spite of this, user is still able to manually adjust those default
values.Change-Id: Ied75d0f7b59588ebd79dae9a22af801d36622216
Signed-off-by: Lukasz Majewski
27 Aug, 2013
1 commit
-
updating an ubi partition needs a completely erased mtd partition,
see:
http://lists.infradead.org/pipermail/linux-mtd/2011-May/035416.htmlSo, add partubi alt setting for the dfu_alt_info environment
variable to mark this partition as an ubi partition. In case we
update an ubi partition, we erase after flashing the image into the
partition, the remaining sektors.Signed-off-by: Heiko Schocher
Cc: Pantelis Antoniou
Cc: Tom Rini
Cc: Lukasz Majewski
Cc: Kyungmin Park
Cc: Marek Vasut
Cc: Wolfgang Denk
Cc: Scott Wood
30 Jul, 2013
1 commit
-
This patch extends dfu code to support transmission with -R switch
specified at dfu-util.When -R is specified, the extra USB_REQ_DFU_DETACH request is sent after
successful data transmission. Then dfu resources are released and reset
command is issued.Signed-off-by: Lukasz Majewski
Signed-off-by: Kyungmin Park
24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
01 Jul, 2013
1 commit
-
Dfu transfer uses a buffer before writing data to the
raw storage device. Make the size (in bytes) of this buffer
configurable through environment variable "dfu_bufsiz".
Defaut value is configurable through CONFIG_SYS_DFU_DATA_BUF_SIZESigned-off-by: Heiko Schocher
Cc: Pantelis Antoniou
Cc: Tom Rini
Cc: Lukasz Majewski
Cc: Kyungmin Park
Cc: Marek Vasut
Cc: Wolfgang Denk
Acked-by: Tom Rini
10 Apr, 2013
3 commits
-
Support for NAND storage devices to work with the DFU framework.
Signed-off-by: Pantelis Antoniou
Signed-off-by: Tom Rini
Acked-by: Scott Wood -
Signed-off-by: Tom Rini
-
Previously we didn't support upload/download larger than available
memory. This is pretty bad when you have to update your root filesystem
for example.This patch removes that limitation (and the crashes when you transfered
any file larger than 4MB) by making raw image writes be done in chunks
and making file maximum size be configurable.The sequence number is a 16 bit counter; make sure we handle rollover
correctly. This fixes the wrong transfers for large (> 256MB) images.Also utilize a variable to handle initialization, so that we don't rely
on just the counter sent by the host.Signed-off-by: Pantelis Antoniou
Signed-off-by: Tom Rini
09 Apr, 2013
1 commit
-
Increase size of DMA buffer from 4MiB to 8MiB. This is necessary due to
uImage size increase.Signed-off-by: Lukasz Majewski
Signed-off-by: Kyungmin Park
01 Sep, 2012
1 commit
-
New, separate driver at ./drivers/dfu has been added. It allows platform
and storage independent operation of DFU.
It has been extended to use new MMC level of command abstraction.Signed-off-by: Lukasz Majewski
Signed-off-by: Kyungmin Park
Cc: Marek Vasut