summaryrefslogtreecommitdiff
path: root/cmd/bootm.c
AgeCommit message (Collapse)Author
2018-08-20[iot] Check Trusty OS available before load itYu Shan
When SECURE_BOOT enabled, use HAB verify Trusty OS image or check its IVT available. If not available, bootloader consider the TOS lost unexpected and wipe all data on disk. Then enter limited fastboot mode. In this situation only bootloader and tos is able to flash, gpt won't be available for external. Change-Id: I04f037f5bd5a51f53174b5b99b2c3053182a8fcf Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
2018-06-13MLK-18588 bootm: fix bootm issue for OPTEE HAB bootYe Li
New APIs are used for get the value of environment variable, the old will get build error. Signed-off-by: Ye Li <ye.li@nxp.com>
2018-04-27MLK-17086 bootm: Add authentication to optee imageYe Li
When IMX_OPTEE is enabled for secure boot, update bootm to authenticate the optee image and the kernel zImage before booting into optee. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit d3bee08f12f1d41c83c47773aec6cfa28056694a)
2018-04-27MLK-12500-1 HAB: Add kernel image authentication in image loadingYe Li
To support the trust boot chain, we integrate the authentication into the kernel image loading process. The kernel image will be verified at its load address. So when signing the kernel image, we need to use this load address which may change on different platforms. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 3c118b8d6bbe1a25ca8c8bafeb528309f16fc73d) (cherry picked from commit fd9a9759ed9b3a9fc26b18aff00880382213b1ca)
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass
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-07-11cmd: bootm: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-02-08cmd: bootm: fix build when CONFIG_CMD_IMLS_NANDGrygorii Strashko
Now when CONFIG_CMD_IMLS_NAND is enabled the u-boot build will fail, because nand_read_skip_bad() function has been changed to accept more parameters, hence fix it. CC cmd/bootm.o cmd/bootm.c: In function 'nand_imls_legacyimage': cmd/bootm.c:390:8: error: too few arguments to function 'nand_read_skip_bad' ret = nand_read_skip_bad(mtd, off, &len, imgdata); ^ In file included from cmd/bootm.c:18:0: include/nand.h:101:5: note: declared here int nand_read_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length, ^ LD drivers/block/built-in.o Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-01-20bootm: relocate ramdisk if CONFIG_SYS_BOOT_RAMDISK_HIGH setRick Altherr
In 35fc84f, bootm was refactored so plain 'bootm' and 'bootm <subcommand>' shared a common implementation. The 'bootm ramdisk' command implementation is now part of the common implementation but not invoke by plain 'bootm' since the original implementation never did ramdisk relocation. Instead, ramdisk relocation happened in image_setup_linux() which is typically called during the OS portion of 'bootm'. On ARM, parameters to the Linux kernel can either be passed by FDT or ATAGS. When using FDT, image_setup_linux() is called which also triggers ramdisk relocation. When using ATAGS, image_setup_linux() is _not_ called because it mostly does FDT setup. Instead of calling image_setup_linux() in both FDT and ATAGS cases, include BOOTM_STATE_RAMDISK in the requested states during a plain 'bootm' if CONFIG_SYS_BOOT_RAMDISK_HIGH is set and remove the ramdisk relocation from image_setup_linux(). This causes ramdisk relocation to happen on any system where CONFIG_SYS_BOOT_RAMDISK_HIGH regardless of the OS being booted. Also remove IMAGE_ENABLE_RAMDISK_HIGH as it was only used by the now-removed code from image_setup_linux(). Signed-off-by: Rick Altherr <raltherr@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joel Stanley <joel@jms.id.au>
2016-10-31Fix spelling of "extended".Vagrant Cascadian
Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-20cmd: Split 'bootz' and 'booti' out from 'bootm'Tom Rini
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>
2016-06-24common: image: minimal android image iminfo supportMichael Trimarchi
We already support iminfo for other images. The idea of this patch is start to have a minimal support for android image format. We still need to print id[] array Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-06-03nand: Embed mtd_info in struct nand_chipScott Wood
nand_info[] is now an array of pointers, with the actual mtd_info instance embedded in struct nand_chip. This is in preparation for syncing the NAND code with Linux 4.6, which makes the same change to struct nand_chip. It's in a separate commit due to the large amount of changes required to accommodate the change to nand_info[]. Signed-off-by: Scott Wood <oss@buserror.net>
2016-06-03mtd: nand: Remove nand_info_t typedefScott Wood
This typedef serves no purpose other than causing confusion with struct nand_chip. Signed-off-by: Scott Wood <oss@buserror.net>
2016-05-25arm64: fix arm64 Linux boot image header field sizesAndre Przywara
The arm64 Linux boot protocol [1] describes the fields in the Image header as being 64-bit little endian values. So fix the endianess conversion to use 64-bit sized operations, for both image_size and text_offset. Also we use a local variable for the image_size to avoid both writing to the header and also accessing it after we actually unmapped it. Signed-off-by: Andre Przywara <andre.przywara@arm.com> [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.txt
2016-04-01arm64: booti: add missing unmap_sysmem()Masahiro Yamada
Make sure to call unmap_sysmem() for address allocated by map_sysmem() before leaving the function; however this patch gives no impact on the behavior because map_sysmem()/unmap_sysmem() does nothing except on Sandbox. Sandbox never runs this code because "booti" is a command for booting ARM64 kernel image. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-02-24booti: Help text rework.Karsten Merker
Fix spelling errors in the "booti" help text and bring it more in line with the bootm/bootz help texts. Signed-off-by: Karsten Merker <merker@debian.org>
2016-01-25Remove the cmd_ prefix from command filesSimon Glass
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>