summaryrefslogtreecommitdiff
path: root/common/bootm.c
Commit message (Collapse)AuthorAgeLines
* common: Make sure arch-specific map_sysmem() is definedJoe Hershberger2015-04-18-0/+1
| | | | | | | | | | | In the case where the arch defines a custom map_sysmem(), make sure that including just mapmem.h is sufficient to have these functions as they are when the arch does not override it. Also split the non-arch specific functions out of common.h Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd_fdt: Actually fix fdt command in sandboxJoe Hershberger2015-02-17-1/+1
| | | | | | | | | | | Commit 90bac29a76bc8d649b41a55f2786c0abef9bb2c1 claims to fix this bug that was introduced in commit a92fd6577ea17751ead9b50243e3c562125cf581 but doesn't actually make the change that the commit message describes. Actually fix the bug this time. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* bootm: Factor out common parts of image decompression codeSimon Glass2015-01-14-39/+49
| | | | | | | | | | Adjust the code so that the error reporting can all be done at the end, and is the same for each decompression method. Try to detect when decompression fails due to lack of space. Keep the behaviour of resetting on failure even though there should be no memory corruption now. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Use print_decomp_msg() in all casesSimon Glass2015-01-14-16/+18
| | | | | | | | Refactor to allow this function to be used to announce the image being loaded regardless of compression type and even when there is no decompression. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Export bootm_decomp_image()Simon Glass2015-01-14-19/+10
| | | | | | | Export this function for testing. Also add a parameter so that values other than CONFIG_SYS_BOOTM_LEN can be used for the maximum uncompressed size. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Move compression progress/error messages into a functionSimon Glass2015-01-14-24/+47
| | | | | | | | | This code is repeated in several places, and does not detect a common fault where the image is too large. Move it into its own function and provide a more helpful messages in this case, for compression schemes which support this. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: image: Add new image type for x64_64Simon Glass2014-10-28-1/+2
| | | | | | | This is a bit odd in that we are permitted to boot images for either, even though they are separate architectures. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Fix Android boot image supportAhmad Draidi2014-10-27-2/+2
| | | | | | | | | | | | | | | This patch makes the following changes: - Set kernel entry point correctly - Append bootargs from image to global bootargs instead of replacing them - Return end address instead of size from android_image_get_end() - Give correct parameter to genimg_get_format() in boot_get_ramdisk() - Move ramdisk message printing from android_image_get_kernel() to android_image_get_ramdisk() Signed-off-by: Ahmad Draidi <ar2000jp@gmail.com> Cc: Tom Rini <trini@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* x86: Support loading kernel setup from a FITSimon Glass2014-10-22-2/+21
| | | | | | | | Add a new setup@ section to the FIT which can be used to provide a setup binary for booting Linux on x86. This makes it possible to boot x86 from a FIT. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: make sure pass NULL when argc < 1Bryan Wu2014-08-21-2/+3
| | | | | | arg[0] might not be NULL even if argc < 1, so fix this as before. Signed-off-by: Bryan Wu <pengw@nvidia.com>
* image: fix bootm failure for FIT imageBryan Wu2014-08-21-6/+3
| | | | | | | | | | | | | Commit b3dd64f5d537 "bootm: use genimg_get_kernel_addr()" introduced a bug for booting FIT image. It's because calling fit_parse_config() twice will give us wrong value in img_addr. Add a new function genimg_get_kernel_addr_fit() whichl will always return fit_uname_config and fit_uname_kernel for CONFIG_FIT. genimg_get_kernel_addr() will ignore those to parameters. Reported-by: York Sun <yorksun@freescale.com> Signed-off-by: Bryan Wu <pengw@nvidia.com>
* bootm: use genimg_get_kernel_addr()Bryan Wu2014-08-09-20/+5
| | | | | | | | | | | Use the new API which is originally taken out from boot_get_kernel of bootm.c Signed-off-by: Bryan Wu <pengw@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> [trini: Fix warnings with CONFIG_FIT] Signed-off-by: Tom Rini <trini@ti.com>
* Enhance fit_check_sign to check all imagesSimon Glass2014-06-19-0/+71
| | | | | | | | | At present this tool only checks the configuration signing. Have it also look at each of the images in the configuration and confirm that they verify. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de> (v1)
* bootm: Move decompression code into its own functionSimon Glass2014-06-19-27/+48
| | | | | | | This makes it possible to decompress an image without it being a kernel and without intending to boot it (as it needed for host tools, for example). Signed-off-by: Simon Glass <sjg@chromium.org>
* Allow compiling common/bootm.c on with HOSTCCSimon Glass2014-06-19-4/+14
| | | | | | | We want to use some of the functionality in this file, so make it build on the host. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Support android boot on sandboxSimon Glass2014-06-19-1/+1
| | | | | | A small change allows this to operate on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* image: Remove the fit_load_image() property parameterSimon Glass2014-06-19-2/+1
| | | | | | | This can be obtained by looking up the image type, so is redundant. It is better to centralise this lookup to avoid errors. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Split out code from cmd_bootm.cSimon Glass2014-06-19-0/+812
This file has code in three different categories: - Command processing - OS-specific boot code - Locating images and setting up to boot Only the first category really belongs in a file called cmd_bootm.c. Leave the command processing code where it is. Split out the OS-specific boot code into bootm_os.c. Split out the other code into bootm.c Header files and extern declarations are tidied but otherwise no code changes are made, to make it easier to review. Signed-off-by: Simon Glass <sjg@chromium.org>