All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew May <acmay@acmay.homeip.net>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] bootm change for standalone images
Date: Tue, 27 Jul 2004 15:31:52 -0700	[thread overview]
Message-ID: <20040727223152.GA11596@acmay.homeip.net> (raw)
In-Reply-To: <20040727220525.F2879C109F@atlas.denx.de>

On Wed, Jul 28, 2004 at 12:05:20AM +0200, Wolfgang Denk wrote:
> Dear Andrew,
> 
> in message <20040727012114.GA22062@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);
 #endif
 static boot_os_Fcn do_bootm_netbsd;
-static boot_os_Fcn do_bootm_rtems;
+static boot_os_Fcn do_bootm_generic_os;
 #if (CONFIG_COMMANDS & CFG_CMD_ELF)
 static boot_os_Fcn do_bootm_vxworks;
 static boot_os_Fcn do_bootm_qnxelf;
@@ -413,8 +413,9 @@
 #endif
 
 	case IH_OS_RTEMS:
-	    do_bootm_rtems (cmdtp, flag, argc, argv,
-			     addr, len_ptr, verify);
+	case IH_OS_GENERIC:
+	    do_bootm_generic (cmdtp, flag, argc, argv,
+                              addr, len_ptr, verify);
 	    break;
 
 #if (CONFIG_COMMANDS & CFG_CMD_ELF)
@@ -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)
 {
 	DECLARE_GLOBAL_DATA_PTR;
@@ -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",
 		(ulong)entry_point);
 
 	SHOW_BOOT_PROGRESS (15);

  reply	other threads:[~2004-07-27 22:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-27  1:21 [U-Boot-Users] bootm change for standalone images Andrew May
2004-07-27 22:05 ` Wolfgang Denk
2004-07-27 22:31   ` Andrew May [this message]
2004-07-28  8:57     ` Wolfgang Denk
2004-07-28 19:59       ` Andrew May
2004-07-28 21:22         ` Wolfgang Denk
2004-07-29 17:16           ` Andrew May
2004-07-29 17:29             ` Wolfgang Denk
2004-07-29 18:00               ` Andrew May

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040727223152.GA11596@acmay.homeip.net \
    --to=acmay@acmay.homeip.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.