summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2013-01-07 06:54:52 +0000
committerTom Rini <trini@ti.com>2013-01-10 14:35:12 -0700
commit58bd77db9dc32847bc5a5f0b5d0f8f6e3780679a (patch)
tree0e4f2ffba7e509efbaa7e255062754279663d316 /common
parentd2af028db3f75390f56f018e16c0f269521e07c5 (diff)
downloadu-boot-imx-58bd77db9dc32847bc5a5f0b5d0f8f6e3780679a.zip
u-boot-imx-58bd77db9dc32847bc5a5f0b5d0f8f6e3780679a.tar.gz
u-boot-imx-58bd77db9dc32847bc5a5f0b5d0f8f6e3780679a.tar.bz2
bootm: relocate names of sub-command table for archs with CONFIG_NEEDS_MANUAL_RELOC
To make bootm sub-command feature working on archs with CONFIG_NEEDS_MANUAL_RELOC, the name pointers in the sub-command table need to be relocated. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index f7595c0..1b8a8c1 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -592,12 +592,18 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#ifdef CONFIG_NEEDS_MANUAL_RELOC
static int relocated = 0;
- /* relocate boot function table */
if (!relocated) {
int i;
+
+ /* relocate boot function table */
for (i = 0; i < ARRAY_SIZE(boot_os); i++)
if (boot_os[i] != NULL)
boot_os[i] += gd->reloc_off;
+
+ /* relocate names of sub-command table */
+ for (i = 0; i < ARRAY_SIZE(cmd_bootm_sub); i++)
+ cmd_bootm_sub[i].name += gd->reloc_off;
+
relocated = 1;
}
#endif