[U-Boot-Users] bootm change for standalone images

Andrew May acmay at acmay.homeip.net
Wed Jul 28 00:31:52 CEST 2004

On Wed, Jul 28, 2004 at 12:05:20AM +0200, Wolfgang Denk wrote:
> Dear Andrew,
> in message <20040727012114.GA22062 at acmay.homeip.net> you wrote:
> > But I am not sure if the check would be universal.
> > Would it better to add a new type or flag to image header.
> If you boot "a stupid homegrown OS" then do it  like  that:  use  the
> "bootm" command for it.
> > It looks like RTEMS is the simplest OS loader and it should work as
> > is with my image, but it would be nice to have a generic print instead.
> What exactly do you mean by "have a generic print instead" ?

Not until after I did the code and started to write the message
did I start to look at the other OS type boots.
Then I realized that the RTEMS bootm is just what I need. So
instead of adding a whole new type just change RTEMS to a generic
OS type, that may not care about the args.

So just change the function names and printf to make it obvious
it is a simple OS type. Also do a fall through case for both
RTEMS and GENERIC OS image types.

Here is an incomplete patch of what I mean.
-------------- next part --------------
--- u-boot-gige2/common/cmd_bootm.c	2004-07-15 19:55:08.000000000 -0700
+++ u-boot-gige2/common/cmd_bootm.c.test	2004-07-27 15:21:06.000000000 -0700
@@ -121,7 +121,7 @@
 static void fixup_silent_linux (void);
 static boot_os_Fcn do_bootm_netbsd;
-static boot_os_Fcn do_bootm_rtems;
+static boot_os_Fcn do_bootm_generic_os;
 static boot_os_Fcn do_bootm_vxworks;
 static boot_os_Fcn do_bootm_qnxelf;
@@ -413,8 +413,9 @@
 	case IH_OS_RTEMS:
-	    do_bootm_rtems (cmdtp, flag, argc, argv,
-			     addr, len_ptr, verify);
+	    do_bootm_generic (cmdtp, flag, argc, argv,
+                              addr, len_ptr, verify);
@@ -1302,7 +1303,7 @@
 #endif /* CONFIG_BZIP2 */
 static void
-do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
+do_bootm_generic (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 		ulong addr, ulong *len_ptr, int verify)
@@ -1311,7 +1312,7 @@
 	entry_point = (void (*)(bd_t *)) hdr->ih_ep;
-	printf ("## Transferring control to RTEMS (at address %08lx) ...\n",
+	printf ("## Transferring control to OS (at address %08lx) ...\n",

More information about the U-Boot mailing list