public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type
Date: Tue, 16 Dec 2014 21:00:58 +0100	[thread overview]
Message-ID: <54908F7A.1010603@myspectrum.nl> (raw)
In-Reply-To: <1418735242-5801-1-git-send-email-marex@denx.de>

Hello Marek,

On 16-12-14 14:07, Marek Vasut wrote:
> Add separate image type for the Wittenstein OpenRTOS .
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@ti.com>
> ---
>   common/bootm_os.c | 29 +++++++++++++++++++++++++++++
>   common/image.c    |  4 ++++
>   include/image.h   |  1 +
>   3 files changed, 34 insertions(+)
>
> diff --git a/common/bootm_os.c b/common/bootm_os.c
> index 5be4467..72477f0 100644
> --- a/common/bootm_os.c
> +++ b/common/bootm_os.c
> @@ -404,6 +404,32 @@ static int do_bootm_integrity(int flag, int argc, char * const argv[],
>   }
>   #endif
>   
> +#ifdef CONFIG_BOOTM_OPENRTOS
> +static int do_bootm_openrtos(int flag, int argc, char * const argv[],
> +			   bootm_headers_t *images)
> +{
> +	void (*entry_point)(void);
> +
> +	if (flag != BOOTM_STATE_OS_GO)
> +		return 0;
> +
> +	entry_point = (void (*)(void))images->ep;
> +
> +	printf("## Transferring control to OpenRTOS (at address %08lx) ...\n",
> +		(ulong)entry_point);
> +
> +	bootstage_mark(BOOTSTAGE_ID_RUN_OS);

You might consider adding a prepare function here, similar to e.g.
boot_prep_vxworks(images) which eventually calls cleanup_before_linux(),
so you end up jumping into the image with caches flushed and disabled
(at least on ARM).  I don't know if this is needed in your case though...

> +
> +	/*
> +	 * OpenRTOS Parameters:
> +	 *   None
> +	 */
> +	(*entry_point)();
> +
> +	return 1;
> +}
> +#endif

Regards,
Jeroen

  parent reply	other threads:[~2014-12-16 20:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 13:07 [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type Marek Vasut
2014-12-16 13:07 ` [U-Boot] [PATCH 2/2] image: Enable OpenRTOS booting via fitImage Marek Vasut
2014-12-16 16:25   ` Simon Glass
2015-01-15 14:58   ` [U-Boot] [U-Boot, " Tom Rini
2014-12-16 16:28 ` [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type Simon Glass
2014-12-16 17:01   ` Marek Vasut
2014-12-16 20:00 ` Jeroen Hofstee [this message]
2015-01-15 14:58 ` [U-Boot] [U-Boot,1/2] " Tom Rini

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=54908F7A.1010603@myspectrum.nl \
    --to=jeroen@myspectrum.nl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox