Commit 58bd77db9dc32847bc5a5f0b5d0f8f6e3780679a
Committed by
Tom Rini
1 parent
d2af028db3
Exists in
master
and in
54 other branches
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>
Showing 1 changed file with 7 additions and 1 deletions Side-by-side Diff
common/cmd_bootm.c
... | ... | @@ -592,12 +592,18 @@ |
592 | 592 | #ifdef CONFIG_NEEDS_MANUAL_RELOC |
593 | 593 | static int relocated = 0; |
594 | 594 | |
595 | - /* relocate boot function table */ | |
596 | 595 | if (!relocated) { |
597 | 596 | int i; |
597 | + | |
598 | + /* relocate boot function table */ | |
598 | 599 | for (i = 0; i < ARRAY_SIZE(boot_os); i++) |
599 | 600 | if (boot_os[i] != NULL) |
600 | 601 | boot_os[i] += gd->reloc_off; |
602 | + | |
603 | + /* relocate names of sub-command table */ | |
604 | + for (i = 0; i < ARRAY_SIZE(cmd_bootm_sub); i++) | |
605 | + cmd_bootm_sub[i].name += gd->reloc_off; | |
606 | + | |
601 | 607 | relocated = 1; |
602 | 608 | } |
603 | 609 | #endif |