aboutsummaryrefslogtreecommitdiff
path: root/common/bootm.c
AgeCommit message (Collapse)AuthorFilesLines
2021-11-11Create a new boot/ directorySimon Glass1-1038/+0
Quite a lot of the code in common/relates to booting and images. Before adding more it seems like a good time to move the code into its own directory. Most files with 'boot' or 'image' in them are moved, except: - autoboot.c which relates to U-Boot automatically running a script - bootstage.c which relates to U-Boot timing Drop the removal of boot* files from the output directory, since this interfers with the symlinks created by tools and there does not appear to be any such file from my brief testing. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Artem Lapkin <email2tema@gmail.com> Tested-by: Artem Lapkin <email2tema@gmail.com>
2021-10-08image: Drop IMAGE_ENABLE_OF_LIBFDTSimon Glass1-2/+2
Add a host Kconfig for OF_LIBFDT. With this we can use CONFIG_IS_ENABLED(OF_LIBFDT) directly in the tools build, so drop the unnecessary indirection. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Drop IMAGE_ENABLE_FITSimon Glass1-5/+5
Make use of the host Kconfig for FIT. With this we can use CONFIG_IS_ENABLED(FIT) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Remove ifdefs around image_setup_linux() el atSimon Glass1-8/+8
Drop some more ifdefs in image-board.c and also the FPGA part of bootm.c which calls into it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-27bootm: Skip command-line substitution if !CONFIG_CMDLINESimon Glass1-1/+2
When there is no command line, we cannot enable this feature. Add a check to avoid a build error. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-02bootm: Fix duplicate debugging in bootm_process_cmdline()Simon Glass1-1/+1
These two returns use the same string so are not distinguishable with LOG_ERROR_RETURN. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass1-0/+1
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-12-04bootm: Support string substitution in bootargsSimon Glass1-3/+35
In some cases it is necessary to pass parameters to Linux so that it will boot correctly. For example, the rootdev parameter is often used to specify the root device. However the root device may change depending on whence U-Boot loads the kernel. At present it is necessary to build up the command line by adding device strings to it one by one. It is often more convenient to provide a template for bootargs, with U-Boot doing the substitution from other environment variables. Add a way to substitute strings in the bootargs variable. This allows things like "rootdev=${rootdev}" to be used in bootargs, with the ${rootdev} substitution providing the UUID of the root device. For example, to substitute the GUID of the kernel partition: setenv bootargs "console=/dev/ttyS0 rootdev=${uuid}/PARTNROFF=1 kern_guid=${uuid}" part uuid mmc 2:2 uuid bootm This is particularly useful when the command line from another place. For example, Chrome OS stores the command line next to the kernel itself. It depends on the kernel version being used as well as the hardware features, so it is extremely difficult to devise a U-Boot script that works on all boards and kernel versions. With this feature, the command line can be read from disk and used directly, with a few substitutions set up. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-04bootm: Allow updating the bootargs in a bufferSimon Glass1-1/+17
At present we only support updating the 'bootargs' environment variable. Add another function to update a buffer instead. This will allow zimage to use this feature. Also add a lot more tests to cover various cases. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-04bootm: Update bootm_process_cmdline_env() to use flagsSimon Glass1-3/+5
At present only one transformation is supported: making the Linux console silent. To prepare for adding more, convert the boolean parameter into a flag value. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-04bootm: Split out bootargs environment reading / writingSimon Glass1-22/+73
At present bootm_process_cmdline_env() reads the 'bootargs' variable and then writes it back afterwards. This is painful for tests, which would rather use a simple buffer. It is also useful for zimage to use a buffer, since it does not actually put the Linux command line in the bootargs variable. Refactor the existing code into two pieces. One handles reading and writing the environment variable, as well as allocating a buffer for use by the rest of the code, which now operates on a buffer. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-04bootm: Use size rather than length for CONSOLE_ARGSimon Glass1-7/+8
Use the size (including terminator) for in this function, rather than the length. This is arguably easier to follow, with the coming refactor. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-04bootm: Add a bool parameter to bootm_process_cmdline_env()Simon Glass1-10/+10
This function will soon do more than just handle the 'silent linux' feature. As a first step, update it to take a boolean parameter, indicating whether or not the processing is required. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-04bootm: Rename fixup_silent_linux()Simon Glass1-2/+2
We want to add more processing to this function. Before doing so, rename it to bootm_process_cmdline_env(), which is more generic. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-04bootm: Update fixup_silent_linux() to return an errorSimon Glass1-7/+15
At present this function fails silently on error. Update it to produce an error code. Report this error to the user and abort the boot, since it likely will prevent a successful start. No tests are added at this stage, since additional refactoring is taking place in subsequent patches. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-04bootm: Add tests for fixup_silent_linux()Simon Glass1-7/+7
This function currently has no tests. Export it so that we can implement a simple test on sandbox. Use IS_ENABLED() to remove the unused code, instead #ifdef. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-23bootm: fix wrong conditions about images overlapJaehoon Chung1-3/+5
It doesn't need to consider start byte address. If ramdisk size is 0x800000 and start address is 0x2700000, then it's used until 0x02efffff, not 0x02f00000. But it's detected to overlapt RD image, when kernel start address is 0x02f00000. Because it's doing wrong calculation about rd_len. This patch fixed wrong calculation address position when check condition. In addition, it needs to check one more condition about overlapping entire area. Fixes: commit fbde7589ce30 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image") Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-09-11bootm: update image OS image size when decompressingHeinrich Schuchardt1-0/+2
In bootm_load_os() the OS image is decompressed. In later stages of the boot process we need the decompressed size of the image. Update images->os.image_len after decompression. Passing the correct size is necessary if we want to check loaded EFI binararies for file truncation by comparing the loaded size to the header field SizeOfImage. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-17common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS imageTero Kristo1-2/+27
These cases are typically fatal and are difficult to debug for random users. Add checks for detecting overlapping images and abort if overlap is detected. Signed-off-by: Tero Kristo <t-kristo@ti.com>
2020-05-18common: Drop log.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass1-13/+14
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop net.h from common headerSimon Glass1-0/+2
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-01image: Load the correct configuration in fit_check_signSimon Glass1-2/+4
At present bootm_host_load_images() is passed the configuration that has been verified, but ignores it and just uses the default configuration. This may not be the same. Update this function to use the selected configuration. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-12-02common: Move enable/disable_interrupts out of common.hSimon Glass1-0/+1
Move these two functions into the irq_funcs.h header file. Also move interrupt_handler_t as this is used by the irq_install_handler() function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move ARM cache operations out of common.hSimon Glass1-0/+1
These functions are CPU-related and do not use driver model. Move them to cpu_func.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Move env_set_hex() to env.hSimon Glass1-0/+1
Move env_set_hex() over to the new header file along with env_set_addr() which uses it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-07-29common: Move bootm_decomp_image() to image.c (as image_decomp())Julius Werner1-128/+22
Upcoming patches want to add decompression to use cases that are no longer directly related to booting. It makes sense to retain a single decompression routine, but it should no longer be in bootm.c (which is not compiled for all configurations). This patch moves bootm_decomp_image() to image.c and renames it to image_decomp() in preparation of those upcoming patches. Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> [trini: Fix warning around handle_decomp_error being unused] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-11configs: Rename CONFIG_IMAGE_FORMAT_LEGACY to CONFIG_LEGACY_IMAGE_FORMATTom Rini1-4/+4
The name CONFIG_LEGACY_IMAGE_FORMAT reads slightly better along with allowing us to avoid a rather nasty Kbuild/Kconfig issue down the line with CONFIG_IS_ENABLED(IMAGE_FORMAT_LEGACY). In a few places outside of cmd/ switch to using CONFIG_IS_ENABLED() to test what is set. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-05-09Make FIT support really optionalFabrice Fontaine1-0/+2
Due to some mistakes in the source code, it was not possible to really turn FIT support off. This commit fixes the problem by means of the following changes: - Enclose "bootm_host_load_image" and "bootm_host_load_images" between checks for CONFIG_FIT_SIGNATURE, in common/bootm.c. - Enclose the declaration of "bootm_host_load_images" between checks for CONFIG_FIT_SIGNATURE, in common/bootm.h. - Condition the compilation and linking of fit_common.o fit_image.o image-host.o common/image-fit.o to CONFIG_FIT=y, in tools/Makefile. Signed-off-by: Carlos Santos <casantos@datacom.ind.br> [fabio: adapt for 2016.07] Signed-off-by: Fabio Estevam <festevam@gmail.com> [Ricardo: fix conditional compilation and linking of the files mentioned above for 2016.07] Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> [Jörg: adapt for 2019.01] Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> [Retrieved from: https://git.buildroot.net/buildroot/tree/package/uboot-tools/0003-Make-FIT-support-really-optional.patch] Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-04-24image: android: allow booting lz4-compressed kernelsEugeniu Rosca1-1/+1
According to Android image format [1], kernel image resides at 1 page offset from the boot image address. Grab the magic number from there and allow U-Boot to handle LZ4-compressed KNL binaries instead of hardcoding compression type to IH_COMP_NONE. Other compression types, if needed, can be added later. Tested on H3ULCB-KF using the image detailed in [2]. [1] Excerpt from include/android_image.h +-----------------+ | boot header | 1 page +-----------------+ | kernel | n pages +-----------------+ | ramdisk | m pages +-----------------+ | second stage | o pages +-----------------+ [2] => iminfo 4c000000 ## Checking Image at 4c000000 ... Android image found kernel size: 85b9d1 kernel address: 48080000 ramdisk size: 54ddbc ramdisk addrress: 4a180000 second size: 0 second address: 48000800 tags address: 48000100 page size: 800 os_version: 1200012a (ver: 0.9.0, level: 2018.10) name: cmdline: buildvariant=userdebug Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
2019-04-23bootm: Simplying cache flush codeTrent Piepho1-6/+1
The cache flush of the kernel load area needs to be aligned outward to the DMA cache alignment. The operations are simpler if we think of this as aligning the start down, ALIGN_DOWN(load, ARCH_DMA_MINALIGN), and aligning the end up, ALIGN(load_end, ARCH_DMA_MINALIGN), and then find the length of the flushed region by subtracting the former from the latter. Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Trent Piepho <tpiepho@impinj.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-02-13efi_loader: refactor switch to non-secure modeHeinrich Schuchardt1-0/+10
Refactor the switch from supervisor to hypervisor to a new function called at the beginning of do_bootefi(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-02lmb: handle more than one DRAM BANKSimon Goldschmidt1-2/+2
This fixes the automatic lmb initialization and reservation for boards with more than one DRAM bank. This fixes the CVE-2018-18439 and -18440 fixes that only allowed to load files into the firs DRAM bank from fs and via tftp. Found-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-16bootm: use new common function lmb_init_and_reserveSimon Goldschmidt1-6/+2
This reduces duplicate code only. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-01-14image: fix compiling without CMD_FDTSimon Goldschmidt1-1/+2
Booting an image currently sets the environment variable "fdtaddr" by calling into 'cmd/fdt.c'. As a result, linking U-Boot fails if CMD_FDT is not enabled. Fix this by adding 'if (CONFIG_IS_ENABLED(CMD_FDT))' to the two places where 'set_working_fdt_addr()' is called. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2018-09-26sandbox: Fix set_working_fdt_addr usersAlexander Graf1-1/+1
When running sandbox with the new pointer sanitization we just recently introduced, we're running into a case with FIT images where we end up interpreting pointers as addresses. What happened is that most callers of set_working_fdt_addr() simply convert pointers into addresses without taking into account that they might be 2 separate address spaces. Fix the callers up to map their pointers into addresses. This makes sandbox tests pass for me again. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-06-19bootm: Handle kernel_noload on arm64Marek Vasut1-2/+17
The ARM64 has 2 MiB alignment requirement for the kernel. When using fitImage, this requirement may by violated, the kernel will thus be executed from unaligned address and fail to boot. Do what booti does and run booti_setup() for kernel_noload images on arm64 to obtain a suitable aligned address to which the image shall be relocated. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Bin Chen <bin.chen@linaro.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Tom Rini <trini@konsulko.com>
2018-06-03Define board_quiesce_devices() in a shared locationSimon Glass1-0/+4
This undocumented function relies on arch-specific code to declare a nop weak version. Add the weak function in common code instead to avoid having to duplicate the same function in each arch. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-05-08bootm.c: Correct the flush_len used in bootm_load_os()Tom Rini1-14/+12
In do_bootm_states when doing BOOTM_STATE_LOADOS we use load_end uninitialized and Coverity notes this now. This however leads down another interesting path. We pass this pointer to bootm_load_os and that in turn uses this uninitialized value immediately to calculate the flush length, and is wrong. We do not know what load_end will be until after bootm_decomp_image is called, so we must only set flush_len after that. All of this also makes it clear that the only reason we pass a pointer for load_end to bootm_load_os is so that we can call lmb_reserve on success. Rather than initialize load_end to 0 in do_bootm_states we can just call lmb_reserve ourself. Reported-by: Coverity (CID: 175572) Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-17bootm: Align cache flush begin addressBryan O'Donoghue1-1/+7
commit b4d956f6bc0f ("bootm: Align cache flush end address correctly") aligns the end address of the cache flush operation to a cache-line size to ensure lower-layers in the code accept the range provided and flush. A similar action should be taken for the begin address of a cache flush operation. The load address may not be aligned to a cache-line boundary, so ensure the passed address is aligned. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reported-by: Breno Matheus Lima <brenomatheus@gmail.com> Suggested-by: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Tested-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-12-14fpga: allow programming fpga from FIT image for all FPGA driversGoldschmidt Simon1-1/+1
This drops the limit that fpga is only loaded from FIT images for Xilinx. This is done by moving the 'partial' check from 'common/image.c' to 'drivers/fpga/xilinx.c' (the only driver supporting partial images yet) and supplies a weak default implementation in 'drivers/fpga/fpga.c'. Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (On zcu102) Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-10-16common: Remove genimg_get_image()Tuomas Tynkkynen1-3/+0
Removal of the legacy DataFlash code turned genimg_get_image() into a no-op. Drop all calls to it and the function itself. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-08-16env: Rename some other getenv()-related functionsSimon Glass1-2/+2
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>
2017-08-16env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()Simon Glass1-2/+2
We are now using an env_ prefix for environment functions. Rename these for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass1-2/+2
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>
2017-08-16env: Rename common functions related to setenv()Simon Glass1-2/+2
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>
2017-08-16env: Rename setenv() to env_set()Simon Glass1-1/+1
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>
2016-10-01bootm: fix passing argc to standalone appsZubair Lutfullah Kakakhel1-3/+1
This bug appears in b6396403 which makes u-boot unable to pass arguments via bootm to a standalone application without this patch. Steps to reproduce. Compile a u-boot. Use mkimage to package the standalone hello_world.bin file. e.g. For the MIPS Boston platform mkimage -n "hello" -A mips -O u-boot -C none -T standalone \ -a 0xffffffff80200000 -d hello_world.bin \ -ep 0xffffffff80200000 hello_out Then tftp hello_out and run it using boston # dhcp 192.168.154.45:hello_out ... boston # bootm $loadaddr 123 321 Without the patch the following output is observed. boston # bootm $loadaddr 123 321 Image Name: hello Image Type: MIPS U-Boot Standalone Program (uncompressed) Data Size: 1240 Bytes = 1.2 KiB Load Address: 80200000 Entry Point: 80200000 Verifying Checksum ... OK Loading Standalone Program ... OK Example expects ABI version 8 Actual U-Boot ABI version 8 Hello World argc = 0 argv[0] = "0xffffffff88000000" With the patch, you see the following. boston # bootm $loadaddr 123 321 Image Name: hello Image Type: MIPS U-Boot Standalone Program (uncompressed) Data Size: 1240 Bytes = 1.2 KiB Load Address: 80200000 Entry Point: 80200000 Verifying Checksum ... OK Loading Standalone Program ... OK Example expects ABI version 8 Actual U-Boot ABI version 8 Hello World argc = 3 argv[0] = "0xffffffff88000000" argv[1] = "123" argv[2] = "321" argv[3] = "<NULL>" Without the patch, the go command at the entry point seems to work. boston # go 0xffffffff80200000 123 321 Example expects ABI version 8 Actual U-Boot ABI version 8 Hello World argc = 3 argv[0] = "0xffffffff80200000" argv[1] = "123" argv[2] = "321" argv[3] = "<NULL>" Hit any key to exit ... Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-20cmd: Split 'bootz' and 'booti' out from 'bootm'Tom Rini1-0/+2
The bootz and booti commands rely on common functionality that is found in common/bootm.c and common/bootm_os.c. They do not however rely on the rest of cmd/bootm.c to be implemented so split them into their own files. Have various Makefiles include the required infrastructure for CONFIG_CMD_BOOT[IZ] as well as CONFIG_CMD_BOOTM. Move the declaration of 'images' over to common/bootm.c. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>