| #
5158c8f2 |
| 06-Sep-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
UPSTREAM: cmd: mtdparts: accept spi-nand devices
Let spi-nand devices be recognized by mtdparts. This is superfluous but a full mtdparts rework would be very time-consuming.
Change-Id: I87634917405
UPSTREAM: cmd: mtdparts: accept spi-nand devices
Let spi-nand devices be recognized by mtdparts. This is superfluous but a full mtdparts rework would be very time-consuming.
Change-Id: I876349174057359b475d2cd4ce367a1c444b4148 Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 00ac922db4085982011438e9471e0fcacca2e8fc)
show more ...
|
| #
1132854c |
| 16-Aug-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
UPSTREAM: cmd: mtdparts: add fallthrough in switch statement
Switch blocks for deriving size naturally use fallthrough between 'case' statements. Make it explicit.
Change-Id: I1eea633226514ee32bf69
UPSTREAM: cmd: mtdparts: add fallthrough in switch statement
Switch blocks for deriving size naturally use fallthrough between 'case' statements. Make it explicit.
Change-Id: I1eea633226514ee32bf69edb23bb7552a960725c Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 2b9ace5527d33539844fa831e12ad8357a25246e)
show more ...
|
| #
f41fe7ae |
| 17-Jul-2018 |
Kay Potthoff <kaypotthoff@gmail.com> |
UPSTREAM: mtdparts: fixed buffer overflow bug
In the case that there was no name defined for a partition the code assumes that name_len is 22 and therefore allocates exactly that space for a dummy n
UPSTREAM: mtdparts: fixed buffer overflow bug
In the case that there was no name defined for a partition the code assumes that name_len is 22 and therefore allocates exactly that space for a dummy name. But the function sprintf() first resolves "0x%08llx@0x%08llx" to a string that is longer than 22 bytes. This leads to a buffer overflow. The replacement function snprintf() limits the copied bytes to name_len and therefore avoids the buffer overflow.
Change-Id: I2ca3a23a2b056cfd80d19651b0f21b04048ac794 Signed-off-by: Kay Potthoff <Kay.Potthoff@microsys.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 149c21b098dafc5a2ae619555a844e8d0a9523f6)
show more ...
|
| #
7dff1373 |
| 04-Dec-2017 |
Simon Glass <sjg@chromium.org> |
UPSTREAM: mtdparts: Correct use of debug()
The debug() macro now evaluates its expression so does not need #ifdef protection. In fact the current code causes a warning with the new log implementatio
UPSTREAM: mtdparts: Correct use of debug()
The debug() macro now evaluates its expression so does not need #ifdef protection. In fact the current code causes a warning with the new log implementation. Adjust the code to fix this.
Change-Id: I45700a2b44f8a336a942b328a2910bf4f6fe3695 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 95b41b80d77b8418dac3393784b2a9cbb7abef64)
show more ...
|
| #
331c2375 |
| 30-Nov-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
UPSTREAM: mtd: nand: Rename nand.h into rawnand.h
This header was renamed to rawnand.h in Linux.
The following is the corresponding commit in Linux.
commit d4092d76a4a4e57b65910899948a83cc8646c5
UPSTREAM: mtd: nand: Rename nand.h into rawnand.h
This header was renamed to rawnand.h in Linux.
The following is the corresponding commit in Linux.
commit d4092d76a4a4e57b65910899948a83cc8646c5a5 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Fri Aug 4 17:29:10 2017 +0200
mtd: nand: Rename nand.h into rawnand.h
We are planning to share more code between different NAND based devices (SPI NAND, OneNAND and raw NANDs), but before doing that we need to move the existing include/linux/mtd/nand.h file into include/linux/mtd/rawnand.h so we can later create a nand.h header containing all common structure and function prototypes.
Change-Id: Ia387c26297c268a449e3451c7adfabcd6417b278 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 6ae3900a86b52429bf7a73ad832f0ad02acc2282)
show more ...
|
| #
8b3cec7d |
| 26-Aug-2017 |
Tom Rini <trini@konsulko.com> |
mtdparts: Fix uninitialized scalar usage
When reworking this code to fix other issues found by Coverity, I forgot to ensure tmp_ep was always cleared before use.
Reported-by: Coverity (CID: 166612)
mtdparts: Fix uninitialized scalar usage
When reworking this code to fix other issues found by Coverity, I forgot to ensure tmp_ep was always cleared before use.
Reported-by: Coverity (CID: 166612) Fixes: bc028345acc4 ("mtdparts: Fix final outstanding issue reported by Coverity") Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
bc028345 |
| 21-Aug-2017 |
Tom Rini <trini@konsulko.com> |
mtdparts: Fix final outstanding issue reported by Coverity
As part of fixing the previously reported issues, it was missed that in the case of mtdparts_init() we need to make sure that tmp_ep is lon
mtdparts: Fix final outstanding issue reported by Coverity
As part of fixing the previously reported issues, it was missed that in the case of mtdparts_init() we need to make sure that tmp_ep is long enough to contain PARTITION_MAXLEN and a NULL termination. Then, to be sure the buffer is NULL terminated, zero the entire buffer rather than just ensuring the first character is NULL.
Cc: Lothar Waßmann <LW@KARO-electronics.de> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Reported-by: Coverity (CID: 166329) Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
54f1792c |
| 15-Aug-2017 |
Tom Rini <trini@konsulko.com> |
mtdparts: Fix various issues reported by Coverity
Now that sandbox is building cmd/mtdparts.c Coverity has looked at the code and found a number of issues. In index_partitions() it is possible that
mtdparts: Fix various issues reported by Coverity
Now that sandbox is building cmd/mtdparts.c Coverity has looked at the code and found a number of issues. In index_partitions() it is possible that part will be NULL, so re-work the checks and debug statements to take this into account. We have a number of string buffers that we print to in the exact size of, and use string functions on, so we need to ensure they are large enough to be NULL terminated. In device_parse() it is not possible for num_partitions to be 0 (we would have hit a different error first) so remove logically dead code. Finally, in parse_mtdparts() if we have an error we need to free the memory allocated to dev.
Cc: Lothar Waßmann <LW@KARO-electronics.de> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Reported-by: Coverity (CID: 166334, 166333, 166332, 166329, 166328) Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
723806cc |
| 03-Aug-2017 |
Simon Glass <sjg@chromium.org> |
env: Rename some other getenv()-related functions
We are now using an env_ prefix for environment functions. Rename these other functions as well, for consistency:
getenv_vlan() getenv_bootm_
env: Rename some other getenv()-related functions
We are now using an env_ prefix for environment functions. Rename these other functions as well, for consistency:
getenv_vlan() getenv_bootm_size() getenv_bootm_low() getenv_bootm_mapsize() env_get_default()
Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
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 ...
|
| #
018f5303 |
| 03-Aug-2017 |
Simon Glass <sjg@chromium.org> |
env: Rename common functions related to setenv()
We are now using an env_ prefix for environment functions. Rename these commonly used functions, for consistency. Also add function comments in commo
env: Rename common functions related to setenv()
We are now using an env_ prefix for environment functions. Rename these commonly used functions, for consistency. Also add function comments in common.h.
Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
382bee57 |
| 03-Aug-2017 |
Simon Glass <sjg@chromium.org> |
env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h.
Suggested-by: Wolfgang Denk <wd
env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h.
Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
1aca4d5a |
| 08-Jun-2017 |
Lothar Waßmann <LW@KARO-electronics.de> |
cmd: mtdparts: fix uninitialized variable warning
commit 06a040a31bcf ("cmd: mtdparts: fix null pointer dereference in parse_mtdparts") removed the initialization of a pointer variable, which is sub
cmd: mtdparts: fix uninitialized variable warning
commit 06a040a31bcf ("cmd: mtdparts: fix null pointer dereference in parse_mtdparts") removed the initialization of a pointer variable, which is subsequently used in a debug() call. This produces an uninitialized variable warning, when compiling with DEBUG defined.
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
show more ...
|
| #
08979509 |
| 08-Apr-2017 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
|
| #
0269dfae |
| 27-Feb-2017 |
Maxime Ripard <maxime.ripard@free-electrons.com> |
cmd: Add Kconfig option for CMD_MTDPARTS and related options
CMD_MTDPARTS is something the user might or might not want to select, and might depends on (or be selected by) other options too.
This i
cmd: Add Kconfig option for CMD_MTDPARTS and related options
CMD_MTDPARTS is something the user might or might not want to select, and might depends on (or be selected by) other options too.
This is even truer for the MTDIDS_DEFAULT and MTDPARTS_DEFAULT options that might change from one board to another, or from one user to the other, depending on what it expects and what storage devices are available.
In order to ease that configuration, add those options to Kconfig.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
show more ...
|
| #
fd42e1b5 |
| 25-Jul-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-nand-flash
|
| #
59441ac3 |
| 29-Jun-2016 |
Steve Rae <steve.rae@raedomain.com> |
mtd: fix compiler warnings
- add missing declaration - update debug output format specifiers
Signed-off-by: Steve Rae <steve.rae@raedomain.com>
|
| #
af324436 |
| 12-Jul-2016 |
Ladislav Michl <ladis@linux-mips.org> |
cmd: mtdparts: support runtime generated mtdparts
Some CPUs contains boot ROM code capable reading first few blocks (where SPL resides) of NAND flash and executing it. It is wise to create separate
cmd: mtdparts: support runtime generated mtdparts
Some CPUs contains boot ROM code capable reading first few blocks (where SPL resides) of NAND flash and executing it. It is wise to create separate partition here for SPL. As block size depends on NAND chip used, we could either use worst case (biggest) partition size or base its size on actual block size. This patch adds support for the latter option.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
show more ...
|
| #
f8f744a3 |
| 12-Jul-2016 |
Ladislav Michl <ladis@linux-mips.org> |
cmd: mtdparts: use defaults by default
Boards which are defining default mtdparts often need them early in boot process (to load environment from UBI volume, for example). This is currently solved b
cmd: mtdparts: use defaults by default
Boards which are defining default mtdparts often need them early in boot process (to load environment from UBI volume, for example). This is currently solved by adding mtdparts and mtdids variable definitions also to default environment. With this change, default partitions are used by default unless explicitely deleted or redefined.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
show more ...
|
| #
1c2a262a |
| 12-Jul-2016 |
Ladislav Michl <ladis@linux-mips.org> |
cmd: mtdparts: consolidate mtdparts reading from env
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
|
| #
06a040a3 |
| 12-Jul-2016 |
Ladislav Michl <ladis@linux-mips.org> |
cmd: mtdparts: fix null pointer dereference in parse_mtdparts
In case there is no mtdparts variable in relocated environment, NULL is assigned to p, which is later fed to strncpy. Also function para
cmd: mtdparts: fix null pointer dereference in parse_mtdparts
In case there is no mtdparts variable in relocated environment, NULL is assigned to p, which is later fed to strncpy. Also function parameter mtdparts is completely ignored, so use it in case mtdparts variable is not found in environment. This parameter is checked not to be NULL in caller.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
show more ...
|
| #
c0ac3339 |
| 12-Jul-2016 |
Ladislav Michl <ladis@linux-mips.org> |
cmd: mtdparts: fix mtdparts variable presence confusion in mtdparts_init
A private buffer is used to read mtdparts variable from non-relocated environment. A pointer to that buffer is returned uncon
cmd: mtdparts: fix mtdparts variable presence confusion in mtdparts_init
A private buffer is used to read mtdparts variable from non-relocated environment. A pointer to that buffer is returned unconditionally, confusing later test for variable presence in the environment. Fix it by returning NULL when getenv_f fails.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
show more ...
|
| #
52b1eaf9 |
| 17-May-2016 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
1cc0a9f4 |
| 04-May-2016 |
Robert P. J. Day <rpjday@crashcourse.ca> |
Fix various typos, scattered over the code.
Spelling corrections for (among other things):
* environment * override * variable * ftd (should be "fdt", for flattened device tree) * embedded * FTDI *
Fix various typos, scattered over the code.
Spelling corrections for (among other things):
* environment * override * variable * ftd (should be "fdt", for flattened device tree) * embedded * FTDI * emulation * controller
show more ...
|
| #
57dc53a7 |
| 08-Feb-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
|