| d510859b | 10-Nov-2011 |
Stephen Warren <swarren@nvidia.com> |
image: Don't detect XIP images as overlapping.
bootm_load_os() detects when it writes the decompressed image over the top of the compressed image. If this happens, the original image is corrupted. W
image: Don't detect XIP images as overlapping.
bootm_load_os() detects when it writes the decompressed image over the top of the compressed image. If this happens, the original image is corrupted. When the original image is a multi-component legacy image, or a (potentially multi-component) FIT image, this implies that other components may be corrupted. In turn, this means that booting is unlikely to be successful.
However, in the case of no image compresssion coupled with an image with load address equal to where the image is already located (e.g. an XIP kernel, or IH_TYPE_KERNEL_ANYLOAD), there has been no copy and hence no corruption, no matter whether it's a single-component legacy image, a multi-component legacy image, or a FIT image. In this case, disable the overlap detection, and allow boot to continue.
Without this change, when booting a single-component legacy image that contains an IH_TYPE_KERNEL_ANYLOAD, bootm_load_os() would have returned BOOTM_ERR_OVERLAP, but the caller ignores this, and boot continues and succeeds. Now, the false error is no longer even returned.
Without this change, when booting a FIT image that contains an IH_TYPE_KERNEL_ANYLOAD, bootm_load_os() would have returned BOOTM_ERR_OVERLAP, which would then cause the caller to reset the board. Now, the false error is no longer returned, and boot succeeds.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Stefan Roese <sr@denx.de>
show more ...
|
| b9b50e89 | 10-Nov-2011 |
Stephen Warren <swarren@nvidia.com> |
image: Implement IH_TYPE_KERNEL_NOLOAD
The legacy uImage format includes an absolute load and entry-point address. When bootm operates on a kernel uImage in memory that isn't loaded at the address i
image: Implement IH_TYPE_KERNEL_NOLOAD
The legacy uImage format includes an absolute load and entry-point address. When bootm operates on a kernel uImage in memory that isn't loaded at the address in the image's load address, U-Boot will copy the image to its address in the header.
Some kernel images can actually be loaded and used at any arbitrary address. An example is an ARM Linux kernel zImage file. To represent this capability, IH_TYPE_KERNEL_NOLOAD is implemented, which operates just like IH_TYPE_KERNEL, except that the load address header is ignored, and U-Boot does not copy the image to its load address, but rather uses it in-place.
This is useful when sharing a single (uImage-wrapped) zImage across multiple boards with different memory layouts; in this case, a specific load address need not be picked when creating the uImage, but instead is selected by the board-specific U-Boot environment used to load and boot that image.
v2: Rename from IH_TYPE_KERNEL_ANYLOAD to IH_TYPE_KERNEL_NOLOAD.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Stefan Roese <sr@denx.de>
show more ...
|
| bd2a23ac | 07-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean env_embedded.c checkpatch and code style
Cleanup the env_embedded.c checkpatch warnings, errors and coding style. There is one error left though: ERROR: Macros with multiple statements s
env: clean env_embedded.c checkpatch and code style
Cleanup the env_embedded.c checkpatch warnings, errors and coding style. There is one error left though: ERROR: Macros with multiple statements should be enclosed in a do - while loop #79: FILE: u-boot/common/env_embedded.c:79: +#define GEN_ABS(name, value) \ + asm(".globl " GEN_SYMNAME(name)); \ + GEN_SET_VALUE(name, value)
total: 1 errors, 0 warnings, 213 lines checked
We cannot enclose that statement in a do - while loop, because these are a global assembly declarations.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
show more ...
|
| e8db8f71 | 07-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean env_mmc.c checkpatch and code style
Cleanup the env_mmc.c checkpatch warnings, errors and coding style. Simplify env_relocate_spec() function implementation. Also mark internal functions
env: clean env_mmc.c checkpatch and code style
Cleanup the env_mmc.c checkpatch warnings, errors and coding style. Simplify env_relocate_spec() function implementation. Also mark internal functions as static.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
show more ...
|
| 91494ca6 | 07-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean env_nvram.c checkpatch and code style
Cleanup the env_nvram.c checkpatch warnings, errors and coding style. There are 2 wanring left about the extern used in c file: WARNING: externs sho
env: clean env_nvram.c checkpatch and code style
Cleanup the env_nvram.c checkpatch warnings, errors and coding style. There are 2 wanring left about the extern used in c file: WARNING: externs should be avoided in .c files #53: FILE: env_nvram.c:53: +extern void *nvram_read(void *dest, const long src, size_t count);
WARNING: externs should be avoided in .c files #54: FILE: env_nvram.c:54: +extern void nvram_write(long dest, const void *src, size_t count);
total: 0 errors, 2 warnings, 138 lines checked
There is no common nvram header file to use instead of the externs.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
show more ...
|
| d09b1787 | 07-Nov-2011 |
Igor Grinberg <grinberg@compulab.co.il> |
env: clean cmd_nvedit.c checkpatch and code style
Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: sim
env: clean cmd_nvedit.c checkpatch and code style
Cleanup the cmd_nvedit.c checkpatch warnings, errors and coding style. There are 10 wanrings left about the simple_strtoul() function: WARNING: simple_strtoul is obsolete, use kstrtoul instead #359: FILE: cmd_nvedit.c:359: + load_addr = simple_strtoul(argv[2], NULL, 16);
...
total: 0 errors, 10 warnings, 1043 lines checked
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
show more ...
|