summaryrefslogtreecommitdiffstats
path: root/common/cmd_armflash.c
Commit message (Collapse)AuthorAgeFilesLines
* Move all command code into its own directorySimon Glass2016-01-251-300/+0
| | | | | | | | | | | | | | | | | | | | | | | | | There are a lot of unrelated files in common, including all of the commands. Moving them into their own directory makes them easier to find and is more logical. Some commands include non-command code, such as cmd_scsi.c. This should be sorted out at some point so that the function can be enabled with or without the associated command. Unfortunately, with m68k I get this error: m68k: + M5329AFEE +arch/m68k/cpu/mcf532x/start.o: In function `_start': +arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o I hope someone can shed some light on what this means. I hope it isn't depending on the position of code in the image. 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>
* Move console definitions into a new console.h fileSimon Glass2015-11-191-0/+1
| | | | | | | | The console includes a global variable and several functions that are only used by a small subset of U-Boot files. Before adding more functions, move the definitions into their own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* common/armflash: load_image returns success or failureRyan Harkin2015-10-111-5/+6
| | | | | | | | | | | | | | | | Change the load_image so that it returns success or failure of the command (using CMD_RET_SUCCESS or CMD_RET_FAILURE). This way, hush scripts can optionally load different files depending upon the system configuration. A simple example: if afs load ${kernel_name} ${kernel_addr}; then echo loaded; else echo \ not loaded; fi Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
* common/armflash: add command to check if image existsRyan Harkin2015-10-111-1/+21
| | | | | | | | | | | | | | | | Add a command to the ARM flash support to check if an image exists or not. If the image is found, it will return CMD_RET_SUCCESS, else CMD_RET_FAILURE. This allows hush scripts to conditionally load images. A simple example: if afs exists ${kernel_name}; then echo found; else echo \ not found; fi Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
* common/armflash: Support for ARM flash imagesLinus Walleij2015-04-101-0/+278
The ARM reference designs all use a special flash image format that stores a footer (two versions exist) at the end of the last erase block of the image in flash memory. Version one of the footer is indicated by the magic number 0xA0FFFF9F at 12 bytes before the end of the flash block and version two is indicated by the magic number 0x464F4F54 0x464C5348 (ASCII for "FLSHFOOT") in the very last 8 bytes of the erase block. This command driver implements support for both versions of the AFS images (the name comes from the Linux driver in drivers/mtd/afs.c) and makes it possible to list images and load an image by name into the memory with these commands: afs - lists flash contents afs load <image> - loads image to address indicated in the image afs load <image> <addres> - loads image to a specified address This image scheme is used on the ARM Integrator family, ARM Versatile family, ARM RealView family (not yet supported in U-Boot) and ARM Versatile Express family up to and including the new Juno board for 64 bit development. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
OpenPOWER on IntegriCloud