diff options
author | T Karthik Reddy | 2020-09-16 01:13:56 -0600 |
---|---|---|
committer | Michal Simek | 2020-09-23 14:29:57 +0200 |
commit | 504d179157aec248e61ff0a39e1a2cf13d3fd4fa (patch) | |
tree | c3edc8826fcb415012b8362b4b9e2834dca02f60 | |
parent | a2c87cb82ac7b09bc48650d84330aa76941839dd (diff) |
cmd: pxe: Add relocation to pxe_sub cmds
pxe sub commands need to be manually relocated for architectures which
enables MANUAL_RELOC as Microblaze.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | cmd/pxe.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/pxe.c b/cmd/pxe.c index 6372fc98718..46ac08fa3a0 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -212,10 +212,24 @@ static struct cmd_tbl cmd_pxe_sub[] = { U_BOOT_CMD_MKENT(boot, 2, 1, do_pxe_boot, "", "") }; +static void __maybe_unused pxe_reloc(void) +{ + static int relocated_pxe; + + if (!relocated_pxe) { + fixup_cmdtable(cmd_pxe_sub, ARRAY_SIZE(cmd_pxe_sub)); + relocated_pxe = 1; + } +} + static int do_pxe(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct cmd_tbl *cp; +#if defined(CONFIG_NEEDS_MANUAL_RELOC) + pxe_reloc(); +#endif + if (argc < 2) return CMD_RET_USAGE; |