19 Dec, 2013
1 commit
-
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
09 Nov, 2013
3 commits
-
Nowhere pass a value to len, which always 0, make no transfer which
cause uploading failed.This patch make nand upload working. However it needs enough malloc
buffer to store read data, that means the buffer at least equal to
the upload partition size, or else it doesn't work.Signed-off-by: Bo Shen
-
After dfu buffer is initialized, the buffer should be all available,
while not 0. Initialize its value to min(dfu_buf_size, dfu->r_left).Signed-off-by: Bo Shen
Tested-by: Lukasz Majewski
Acked-by: Lukasz Majewski -
The value of dfu->r_left need decrease along with the transfer
Signed-off-by: Bo Shen
01 Nov, 2013
1 commit
-
Signed-off-by: Masahiro Yamada
21 Oct, 2013
3 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
-
This commit unifies board-specific USB initialization implementations
under one symbol (usb_board_init), declaration of which is available in
usb.h.New API allows selective initialization of USB controllers whenever needed.
Signed-off-by: Mateusz Zalega
Signed-off-by: Kyungmin Park
Reviewed-by: Lukasz Majewski
Cc: Marek Vasut
Cc: Lukasz Majewski
24 Sep, 2013
4 commits
-
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 -
Correct error message if overflow is detected.
Change-Id: I8a915c7353d49822c046fbc36241237b370e6c98
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
03 Jul, 2013
3 commits
-
For the first eMMC read of data for upload, use the "large" dfu_buf (now
configurable) instead of usb request buffer allocated at composite layer
(which is 4KiB) [*].For eMMC the whole file is read, which usually is larger than the buffer [*]
provided with usb request.Signed-off-by: Lukasz Majewski
Cc: Tom Rini
Cc: Pantelis Antoniou
Cc: Marek Vasut
Cc: Heiko Schocher -
In the following commit:
"dfu: Support larger than memory transfers."
SHA1: ea2453d56b8860dbd18a3c517531ffc8dcb5c839The ext4{read|write} command formatting has been changed. It removed
a write mandatory [sizebytes] parameter.It extents DFU_FS_EXT4 case at mmc_file_op to provide mandatory
parameter for DFU write.Signed-off-by: Lukasz Majewski
Cc: Tom Rini
Cc: Pantelis Antoniou
Cc: Marek Vasut
Cc: Heiko Schocher
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
25 Jun, 2013
1 commit
-
before writing the received buffer to nand, erase the nand
sectors. If not doing this, nand write fails. See for
more info here:http://lists.denx.de/pipermail/u-boot/2013-June/156361.html
Using the nand erase option "spread", maybe overwrite
blocks on, for example another mtd partition, if the
erasing range contains bad blocks.
So a limit option is added to nand_erase_opts()Signed-off-by: Heiko Schocher
Cc: Scott Wood
Cc: Pantelis Antoniou
Cc: Lukasz Majewski
Cc: Kyungmin Park
Cc: Marek Vasut
Cc: Tom Rini
Signed-off-by: Scott Wood
10 Apr, 2013
2 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 -
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
-
Following commit:
"cmd_ext4: BREAK and correct ext4write parameter order"
SHA1:0171d52c410cbaa9290b1b214e695697c835bfe5introduced cleanup of ext4write semantics to be consistent with other
filesystem's writing commands (e.g. fatwrite).
This commit provides correct ext4write command generation at DFU eMMC
code.Signed-off-by: Lukasz Majewski
Signed-off-by: Kyungmin Park
17 Mar, 2013
1 commit
-
Dealing with raw block numbers with the dfu is very annoying.
Introduce a partition method.Signed-off-by: Pantelis Antoniou
21 Sep, 2012
2 commits
-
The "filesize" environment variable shall be read only when relevant
file is read.Signed-off-by: Lukasz Majewski
Signed-off-by: Kyungmin Park
Reviewed-by: Marek Vasut -
Support for ext4 file system handling at DFU.
Signed-off-by: Lukasz Majewski
Signed-off-by: Kyungmin Park
Reviewed-by: Marek Vasut
01 Sep, 2012
2 commits
-
Support for MMC storage devices to work with DFU framework.
Signed-off-by: Lukasz Majewski
Signed-off-by: Kyungmin Park
Cc: Marek Vasut -
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