Browse Source

bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

Added the ability to config out bootm support for Linux, NetBSD, RTEMS

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala 16 years ago
parent
commit
b1d0db1805
1 changed files with 20 additions and 0 deletions
  1. 20 0
      common/cmd_bootm.c

+ 20 - 0
common/cmd_bootm.c

@@ -103,13 +103,23 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 typedef int boot_os_fn (int flag, int argc, char *argv[],
 typedef int boot_os_fn (int flag, int argc, char *argv[],
 			bootm_headers_t *images); /* pointers to os/initrd/fdt */
 			bootm_headers_t *images); /* pointers to os/initrd/fdt */
 
 
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
+
+#ifdef CONFIG_BOOTM_LINUX
 extern boot_os_fn do_bootm_linux;
 extern boot_os_fn do_bootm_linux;
+#endif
+#ifdef CONFIG_BOOTM_NETBSD
 static boot_os_fn do_bootm_netbsd;
 static boot_os_fn do_bootm_netbsd;
+#endif
 #if defined(CONFIG_LYNXKDI)
 #if defined(CONFIG_LYNXKDI)
 static boot_os_fn do_bootm_lynxkdi;
 static boot_os_fn do_bootm_lynxkdi;
 extern void lynxkdi_boot (image_header_t *);
 extern void lynxkdi_boot (image_header_t *);
 #endif
 #endif
+#ifdef CONFIG_BOOTM_RTEMS
 static boot_os_fn do_bootm_rtems;
 static boot_os_fn do_bootm_rtems;
+#endif
 #if defined(CONFIG_CMD_ELF)
 #if defined(CONFIG_CMD_ELF)
 static boot_os_fn do_bootm_vxworks;
 static boot_os_fn do_bootm_vxworks;
 static boot_os_fn do_bootm_qnxelf;
 static boot_os_fn do_bootm_qnxelf;
@@ -121,12 +131,18 @@ static boot_os_fn do_bootm_integrity;
 #endif
 #endif
 
 
 boot_os_fn * boot_os[] = {
 boot_os_fn * boot_os[] = {
+#ifdef CONFIG_BOOTM_LINUX
 	[IH_OS_LINUX] = do_bootm_linux,
 	[IH_OS_LINUX] = do_bootm_linux,
+#endif
+#ifdef CONFIG_BOOTM_NETBSD
 	[IH_OS_NETBSD] = do_bootm_netbsd,
 	[IH_OS_NETBSD] = do_bootm_netbsd,
+#endif
 #ifdef CONFIG_LYNXKDI
 #ifdef CONFIG_LYNXKDI
 	[IH_OS_LYNXOS] = do_bootm_lynxkdi,
 	[IH_OS_LYNXOS] = do_bootm_lynxkdi,
 #endif
 #endif
+#ifdef CONFIG_BOOTM_RTEMS
 	[IH_OS_RTEMS] = do_bootm_rtems,
 	[IH_OS_RTEMS] = do_bootm_rtems,
+#endif
 #if defined(CONFIG_CMD_ELF)
 #if defined(CONFIG_CMD_ELF)
 	[IH_OS_VXWORKS] = do_bootm_vxworks,
 	[IH_OS_VXWORKS] = do_bootm_vxworks,
 	[IH_OS_QNX] = do_bootm_qnxelf,
 	[IH_OS_QNX] = do_bootm_qnxelf,
@@ -1161,6 +1177,7 @@ static void fixup_silent_linux ()
 /* OS booting routines */
 /* OS booting routines */
 /*******************************************************************/
 /*******************************************************************/
 
 
+#ifdef CONFIG_BOOTM_NETBSD
 static int do_bootm_netbsd (int flag, int argc, char *argv[],
 static int do_bootm_netbsd (int flag, int argc, char *argv[],
 			    bootm_headers_t *images)
 			    bootm_headers_t *images)
 {
 {
@@ -1246,6 +1263,7 @@ static int do_bootm_netbsd (int flag, int argc, char *argv[],
 
 
 	return 1;
 	return 1;
 }
 }
+#endif /* CONFIG_BOOTM_NETBSD*/
 
 
 #ifdef CONFIG_LYNXKDI
 #ifdef CONFIG_LYNXKDI
 static int do_bootm_lynxkdi (int flag, int argc, char *argv[],
 static int do_bootm_lynxkdi (int flag, int argc, char *argv[],
@@ -1269,6 +1287,7 @@ static int do_bootm_lynxkdi (int flag, int argc, char *argv[],
 }
 }
 #endif /* CONFIG_LYNXKDI */
 #endif /* CONFIG_LYNXKDI */
 
 
+#ifdef CONFIG_BOOTM_RTEMS
 static int do_bootm_rtems (int flag, int argc, char *argv[],
 static int do_bootm_rtems (int flag, int argc, char *argv[],
 			   bootm_headers_t *images)
 			   bootm_headers_t *images)
 {
 {
@@ -1299,6 +1318,7 @@ static int do_bootm_rtems (int flag, int argc, char *argv[],
 
 
 	return 1;
 	return 1;
 }
 }
+#endif /* CONFIG_BOOTM_RTEMS */
 
 
 #if defined(CONFIG_CMD_ELF)
 #if defined(CONFIG_CMD_ELF)
 static int do_bootm_vxworks (int flag, int argc, char *argv[],
 static int do_bootm_vxworks (int flag, int argc, char *argv[],