From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] ti_armv7_common: env: Add support for loading FIT images
Date: Tue, 29 Nov 2016 11:58:00 +0530 [thread overview]
Message-ID: <20161129062804.8398-3-lokeshvutla@ti.com> (raw)
In-Reply-To: <20161129062804.8398-1-lokeshvutla@ti.com>
FIT is a new image format which is a Tree like structure and gives more
flexibility in handling of various images. Mainly used for unification of
multiple images in a single blob and provide security information for each
image.
U-Boot already has support for loading such images, so adding the environment
support to load FIT image on all TI platforms.
Reviewed-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
include/configs/am335x_evm.h | 4 ++++
include/configs/am43xx_evm.h | 4 ++++
include/configs/ti_armv7_common.h | 15 ++++++++++++++-
include/configs/ti_omap4_common.h | 4 ++++
include/configs/ti_omap5_common.h | 4 ++++
5 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 7f5bee9..59f838a 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -90,6 +90,9 @@
func(DHCP, dhcp, na)
#define CONFIG_BOOTCOMMAND \
+ "if test ${boot_fit} -eq 1; then " \
+ "run update_to_fit;" \
+ "fi;" \
"run findfdt; " \
"run init_console; " \
"run envboot; " \
@@ -101,6 +104,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
DEFAULT_MMC_TI_ARGS \
+ DEFAULT_FIT_TI_ARGS \
"bootpart=0:2\0" \
"bootdir=/boot\0" \
"bootfile=zImage\0" \
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index abfa852..a04cc76 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -206,6 +206,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
DEFAULT_MMC_TI_ARGS \
+ DEFAULT_FIT_TI_ARGS \
"fdtfile=undefined\0" \
"bootpart=0:2\0" \
"bootdir=/boot\0" \
@@ -269,6 +270,9 @@
DFUARGS \
#define CONFIG_BOOTCOMMAND \
+ "if test ${boot_fit} -eq 1; then " \
+ "run update_to_fit;" \
+ "fi;" \
"run findfdt; " \
"run envboot;" \
"run mmcboot;" \
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index d720b2b..d13fc94 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -110,10 +110,23 @@
"if mmc rescan; then " \
"echo SD/MMC found on device ${mmcdev};" \
"if run loadimage; then " \
- "run mmcloados;" \
+ "if test ${boot_fit} -eq 1; then " \
+ "run loadfit; " \
+ "else " \
+ "run mmcloados;" \
+ "fi;" \
"fi;" \
"fi;\0" \
+#define DEFAULT_FIT_TI_ARGS \
+ "boot_fit=0\0" \
+ "fit_loadaddr=0x88000000\0" \
+ "fit_bootfile=fitImage.itb\0" \
+ "update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}\0" \
+ "args_fit=setenv bootargs console=${console} \0" \
+ "loadfit=run args_fit; bootm ${loadaddr}:kernel at 1 " \
+ "${loadaddr}:ramdisk at 1 ${loadaddr}:${fdtfile};\0" \
+
/*
* DDR information. If the CONFIG_NR_DRAM_BANKS is not defined,
* we say (for simplicity) that we have 1 bank, always, even when
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index ce9d3e8..8e0f9eb 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -98,6 +98,9 @@
func(DHCP, dhcp, na)
#define CONFIG_BOOTCOMMAND \
+ "if test ${boot_fit} -eq 1; then " \
+ "run update_to_fit;" \
+ "fi;" \
"run findfdt; " \
"run envboot; " \
"run distro_bootcmd"
@@ -107,6 +110,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
DEFAULT_MMC_TI_ARGS \
+ DEFAULT_FIT_TI_ARGS \
"console=ttyO2,115200n8\0" \
"fdtfile=undefined\0" \
"bootpart=0:2\0" \
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index 90ead56..37d6565 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -65,6 +65,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
DEFAULT_MMC_TI_ARGS \
+ DEFAULT_FIT_TI_ARGS \
"console=" CONSOLEDEV ",115200n8\0" \
"fdtfile=undefined\0" \
"bootpart=0:2\0" \
@@ -110,6 +111,9 @@
"echo Booting into fastboot ...; " \
"fastboot " __stringify(CONFIG_FASTBOOT_USB_DEV) "; " \
"fi;" \
+ "if test ${boot_fit} -eq 1; then " \
+ "run update_to_fit;" \
+ "fi;" \
"run findfdt; " \
"run envboot; " \
"run mmcboot;" \
--
2.10.1
next prev parent reply other threads:[~2016-11-29 6:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 6:27 [U-Boot] [PATCH 0/5] ti_armv7_common: env: Add support for loading FIT images Lokesh Vutla
2016-11-29 6:27 ` [U-Boot] [PATCH 1/5] ti_armv7_common: env: Consolidate support for loading images from mmc Lokesh Vutla
2016-11-29 18:03 ` Tom Rini
2016-12-04 0:45 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 6:28 ` Lokesh Vutla [this message]
2016-11-29 18:03 ` [U-Boot] [PATCH 2/5] ti_armv7_common: env: Add support for loading FIT images Tom Rini
2016-12-04 0:45 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 6:28 ` [U-Boot] [PATCH 3/5] ARM: DRA7: Make FIT boot as default boot on HS devices Lokesh Vutla
2016-11-29 18:04 ` Tom Rini
2016-12-04 0:46 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 6:28 ` [U-Boot] [PATCH 4/5] ARM: AM57xx: " Lokesh Vutla
2016-11-29 18:04 ` Tom Rini
2016-12-04 0:47 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 6:28 ` [U-Boot] [PATCH 5/5] ARM: AMx3xx: " Lokesh Vutla
2016-11-29 18:04 ` Tom Rini
2016-12-04 0:48 ` [U-Boot] [U-Boot, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161129062804.8398-3-lokeshvutla@ti.com \
--to=lokeshvutla@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.