Commit 17ab52fef1c5221839f294d251224e4a8f19ad35

Authored by Miao Yan
Committed by Tom Rini
1 parent 878a095e44

common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.

do_bootm_vxworks now is available under the configuration option
CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems
that supported by bootm command. The bootvx command still depneds
on CONFIG_CMD_ELF.

Signed-off-by: Miao Yan <miao.yan@windriver.com>

Showing 1 changed file with 12 additions and 3 deletions Side-by-side Diff

... ... @@ -120,8 +120,10 @@
120 120 #if defined(CONFIG_BOOTM_PLAN9)
121 121 static boot_os_fn do_bootm_plan9;
122 122 #endif
123   -#if defined(CONFIG_CMD_ELF)
  123 +#if defined(CONFIG_BOOTM_VXWORKS)
124 124 static boot_os_fn do_bootm_vxworks;
  125 +#endif
  126 +#if defined(CONFIG_CMD_ELF)
125 127 static boot_os_fn do_bootm_qnxelf;
126 128 int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
127 129 int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
128 130  
... ... @@ -149,8 +151,10 @@
149 151 #if defined(CONFIG_BOOTM_PLAN9)
150 152 [IH_OS_PLAN9] = do_bootm_plan9,
151 153 #endif
152   -#if defined(CONFIG_CMD_ELF)
  154 +#if defined(CONFIG_BOOTM_VXWORKS)
153 155 [IH_OS_VXWORKS] = do_bootm_vxworks,
  156 +#endif
  157 +#if defined(CONFIG_CMD_ELF)
154 158 [IH_OS_QNX] = do_bootm_qnxelf,
155 159 #endif
156 160 #ifdef CONFIG_INTEGRITY
... ... @@ -1678,7 +1682,7 @@
1678 1682 }
1679 1683 #endif /* CONFIG_BOOTM_PLAN9 */
1680 1684  
1681   -#if defined(CONFIG_CMD_ELF)
  1685 +#if defined(CONFIG_BOOTM_VXWORKS)
1682 1686 static int do_bootm_vxworks(int flag, int argc, char * const argv[],
1683 1687 bootm_headers_t *images)
1684 1688 {
1685 1689  
1686 1690  
1687 1691  
... ... @@ -1696,11 +1700,16 @@
1696 1700  
1697 1701 sprintf(str, "%lx", images->ep); /* write entry-point into string */
1698 1702 setenv("loadaddr", str);
  1703 +
  1704 +#if defined(CONFIG_CMD_ELF)
1699 1705 do_bootvx(NULL, 0, 0, NULL);
  1706 +#endif
1700 1707  
1701 1708 return 1;
1702 1709 }
  1710 +#endif
1703 1711  
  1712 +#if defined(CONFIG_CMD_ELF)
1704 1713 static int do_bootm_qnxelf(int flag, int argc, char * const argv[],
1705 1714 bootm_headers_t *images)
1706 1715 {