summaryrefslogtreecommitdiff
path: root/cmd/mtdparts.c
Commit message (Collapse)AuthorAgeLines
* mtd: fix compiler warningsSteve Rae2016-07-24-2/+2
| | | | | | | - add missing declaration - update debug output format specifiers Signed-off-by: Steve Rae <steve.rae@raedomain.com>
* cmd: mtdparts: support runtime generated mtdpartsLadislav Michl2016-07-22-9/+12
| | | | | | | | | | | 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>
* cmd: mtdparts: use defaults by defaultLadislav Michl2016-07-22-6/+16
| | | | | | | | | | | 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>
* cmd: mtdparts: consolidate mtdparts reading from envLadislav Michl2016-07-22-22/+20
| | | | Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* cmd: mtdparts: fix null pointer dereference in parse_mtdpartsLadislav Michl2016-07-22-10/+13
| | | | | | | | | | 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>
* cmd: mtdparts: fix mtdparts variable presence confusion in mtdparts_initLadislav Michl2016-07-22-4/+6
| | | | | | | | | 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>
* Fix various typos, scattered over the code.Robert P. J. Day2016-05-05-1/+1
| | | | | | | | | | | | | Spelling corrections for (among other things): * environment * override * variable * ftd (should be "fdt", for flattened device tree) * embedded * FTDI * emulation * controller
* Use correct spelling of "U-Boot"Bin Meng2016-02-06-1/+1
| | | | | | | | | | Correct spelling of "U-Boot" shall be used in all written text (documentation, comments in source files etc.). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
* Remove the cmd_ prefix from command filesSimon Glass2016-01-25-0/+2106
Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>