| #
0bcaecc8 |
| 20-Jan-2021 |
Yifeng Zhao <yifeng.zhao@rock-chips.com> |
drivers: dfu: add DFU to read and write to MTD base storage
Add DFU to read and write to MTD base storage.
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I84cb160b182c31d7f84ed7
drivers: dfu: add DFU to read and write to MTD base storage
Add DFU to read and write to MTD base storage.
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com> Change-Id: I84cb160b182c31d7f84ed700896a4970845a3ca8
show more ...
|
| #
90aa625c |
| 16-Sep-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
treewide: replace with error() with pr_err()
U-Boot widely uses error() as a bit noisier variant of printf().
This macro causes name conflict with the following line in include/linux/compiler-gcc.h
treewide: replace with error() with pr_err()
U-Boot widely uses error() as a bit noisier variant of printf().
This macro causes name conflict with the following line in include/linux/compiler-gcc.h:
# define __compiletime_error(message) __attribute__((error(message)))
This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)
Let's convert error() into now treewide-available pr_err().
Done with the help of Coccinelle, excluing tools/ directory.
The semantic patch I used is as follows:
// <smpl> @@@@ -error +pr_err (...) // </smpl>
Change-Id: I921807c1770d36a91e692c48ab477558bb2ed0b8 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 9b643e312d528f291966c1f30b0d90bf3b1d43dc)
show more ...
|
| #
00caae6d |
| 03-Aug-2017 |
Simon Glass <sjg@chromium.org> |
env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h.
Quite a few place
env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h.
Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also.
Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
211aaf30 |
| 29-Jul-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
6fa8dddd |
| 19-Jul-2017 |
Patrick Delaunay <patrick.delaunay@st.com> |
dfu: add common function to initiate transaction
- factorize code between read and write transaction - always use dfu_transaction_cleanup() to initialize the internal variable: easy maintenance -
dfu: add common function to initiate transaction
- factorize code between read and write transaction - always use dfu_transaction_cleanup() to initialize the internal variable: easy maintenance - replace direct access by dfu_get_buf() and dfu_get_buf_size()
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
show more ...
|
| #
57da0607 |
| 19-Jul-2017 |
Patrick Delaunay <patrick.delaunay@st.com> |
dfu: factorize transaction cleanup
rename cleanup function, as now called by read
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
|
| #
15970d87 |
| 19-Jul-2017 |
Patrick Delaunay <patrick.delaunay@st.com> |
dfu: remove limitation on partition size
Change long (32 bits on arm) to u64 (same type than offset) for size and read offset r_left
So partition and device used for DFU can be greater than 4GB
Si
dfu: remove limitation on partition size
Change long (32 bits on arm) to u64 (same type than offset) for size and read offset r_left
So partition and device used for DFU can be greater than 4GB
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
show more ...
|
| #
4de51201 |
| 19-Jul-2017 |
Patrick Delaunay <patrick.delaunay@st.com> |
dfu: allow dfu read on partition greater than 2GB
solve issue on get_medium_size() function the detection of error is a simple test < 0 but for ARM platform, long is 32bits and 2GB = 0x80000000 is s
dfu: allow dfu read on partition greater than 2GB
solve issue on get_medium_size() function the detection of error is a simple test < 0 but for ARM platform, long is 32bits and 2GB = 0x80000000 is seen as error.
I solve the issue by changing the prototype fo the function to separate size and result. This patch prepare the next patch with size change to u64.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
show more ...
|
| #
66928afb |
| 04-May-2017 |
B, Ravi <ravibabu@ti.com> |
common: dfu: ignore reset for spl-dfu
The SPL-DFU feature enable to load and execute u-boot from RAM over usb from PC using dfu-util. Hence dfu-reset should not be issued when dfu-util -R switch is
common: dfu: ignore reset for spl-dfu
The SPL-DFU feature enable to load and execute u-boot from RAM over usb from PC using dfu-util. Hence dfu-reset should not be issued when dfu-util -R switch is issued.
Signed-off-by: Ravi Babu <ravibabu@ti.com>
show more ...
|
| #
eef55e5f |
| 03-Nov-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-usb
|
| #
dd93a8e9 |
| 28-Oct-2016 |
Patrick Delaunay <patrick.delaunay73@gmail.com> |
dfu: align array in dfu_get_dev_type with enum dfu_device_type
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
|
| #
52b1eaf9 |
| 17-May-2016 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
7b4f17bf |
| 07-May-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-usb
|
| #
5d8fae79 |
| 03-May-2016 |
Peng Fan <van.freenix@gmail.com> |
dfu: avoid memory leak
When dfu_fill_entity fail, need to free dfu to avoid memory leak.
Reported by Coverity: " Resource leak (RESOURCE_LEAK) leaked_storage: Variable dfu going out of scope leaks
dfu: avoid memory leak
When dfu_fill_entity fail, need to free dfu to avoid memory leak.
Reported by Coverity: " Resource leak (RESOURCE_LEAK) leaked_storage: Variable dfu going out of scope leaks the storage it points to. "
Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: "Łukasz Majewski" <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
show more ...
|
| #
13a39725 |
| 14-Oct-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge remote-tracking branch 'u-boot/master'
|
| #
411c5e57 |
| 05-Sep-2015 |
Stephen Warren <swarren@nvidia.com> |
dfu: mmc: buffer file reads too
When writing to files in a filesystem on MMC, dfu_mmc.c buffers up the entire file content until the end of the transaction, at which point the file is written in one
dfu: mmc: buffer file reads too
When writing to files in a filesystem on MMC, dfu_mmc.c buffers up the entire file content until the end of the transaction, at which point the file is written in one go. This allows writing files larger than the USB transfer size (CONFIG_SYS_DFU_DATA_BUF_SIZE); the maximum written file size is CONFIG_SYS_DFU_MAX_FILE_SIZE (the size of the temporary buffer).
The current file reading code does not do any buffering, and so limits the maximum read file size to the USB transfer size. Enhance the code to do the same kind of buffering as the write path, so the same file size limits apply.
Remove the size checking code from dfu_read() since all read paths now support larger files than the USB transfer buffer.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
806bd245 |
| 05-Sep-2015 |
Stephen Warren <swarren@nvidia.com> |
dfu: don't keep freeing/reallocating
DFU currently allocates buffer memory at the start of each data transfer operation and frees it at the end. Especially since memalign() is used to allocate the b
dfu: don't keep freeing/reallocating
DFU currently allocates buffer memory at the start of each data transfer operation and frees it at the end. Especially since memalign() is used to allocate the buffer, and various other allocations happen during the transfer, this can expose the code to heap fragmentation, which prevents the allocation from succeeding on subsequent transfers.
Fix the code to allocate the buffer once when DFU mode is initialized, and free the buffer once when DFU mode is exited, to reduce the exposure to heap fragmentation.
The failure mode is:
// Internally to memalign(), this allocates a lot more than s to guarantee // that alignment can occur, then returns chunks of memory at the start/ // end of the allocated buffer to the heap. p = memalign(a, s); // Various other malloc()s occur here, some of which allocate the RAM // immediately before/after "p". // // DFU transfer is complete, so buffer is released. free(p); // By chance, no other malloc()/free() here, in DFU at least. // // A new DFU transfer starts, so the buffer is allocated again. // In theory this should succeed since we just free()d a buffer of the // same size. However, this fails because memalign() internally attempts // to allocate much more than "s", yet free(p) above only free()d a // little more than "s". p = memalign(a, s);
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| #
cdc7732f |
| 07-Sep-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
2092e461 |
| 23-Aug-2015 |
Lukasz Majewski <l.majewski@majess.pl> |
dfu: tftp: update: Add dfu_write_from_mem_addr() function
This function allows writing via DFU data stored from fixed buffer address (like e.g. loadaddr env variable).
Such predefined buffers are u
dfu: tftp: update: Add dfu_write_from_mem_addr() function
This function allows writing via DFU data stored from fixed buffer address (like e.g. loadaddr env variable).
Such predefined buffers are used in the update_tftp() code. In fact this function is a wrapper on the dfu_write() and dfu_flush().
Signed-off-by: Lukasz Majewski <l.majewski@majess.pl> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| #
a7e6892f |
| 08-Jul-2015 |
Lukasz Majewski <l.majewski@majess.pl> |
dfu: Delete superfluous initialization of the dfu_buf_size static variable
After extension of the dfu_get_buf() to also setup (implicitly) the dfu_buf_size variable it is not needed to set dfu_buf_s
dfu: Delete superfluous initialization of the dfu_buf_size static variable
After extension of the dfu_get_buf() to also setup (implicitly) the dfu_buf_size variable it is not needed to set dfu_buf_size to CONFIG_SYS_DFU_DATA_BUF_SIZE.
This variable is set in the dfu_get_buf() by not only considering CONFIG_SYS_DFU_DATA_BUF but more importantly the "dfu_bufsiz" env variable. Therefore, dfu_get_buf() should be used for initialization.
Signed-off-by: Lukasz Majewski <l.majewski@majess.pl> Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
show more ...
|
| #
cc357343 |
| 29-Jul-2015 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-tegra
|
| #
e621c7ab |
| 22-Jul-2015 |
Stephen Warren <swarren@nvidia.com> |
dfu: fix 64-bit compile warnings
Use %p to print pointers.
The max value of (i_buf - i_buf_start) should be dfu_buf_size, which is an unsigned long, so cast the pointer difference to that type to p
dfu: fix 64-bit compile warnings
Use %p to print pointers.
The max value of (i_buf - i_buf_start) should be dfu_buf_size, which is an unsigned long, so cast the pointer difference to that type to print.
Change-Id: Iee242df9f8eb091aecfe0cea4c282b28b547acfe Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
show more ...
|
| #
9b5b60a0 |
| 05-Mar-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
57c6941b |
| 02-Mar-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-usb
|
| #
899a5282 |
| 17-Feb-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
dfu: samsung: move call to set_dfu_alt_info() to dfu common code
This common call can be used for setting proper entities based on dfu command arguments. The config: CONFIG_SET_DFU_ALT_INFO, was use
dfu: samsung: move call to set_dfu_alt_info() to dfu common code
This common call can be used for setting proper entities based on dfu command arguments. The config: CONFIG_SET_DFU_ALT_INFO, was used only for few configs, and now it is common.
The board file should implement: - set_dfu_alt_info() function
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [Test HW: Odroid U3 (Exynos 4412)]
show more ...
|