From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeroen Hofstee Date: Tue, 16 Dec 2014 21:00:58 +0100 Subject: [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type In-Reply-To: <1418735242-5801-1-git-send-email-marex@denx.de> References: <1418735242-5801-1-git-send-email-marex@denx.de> Message-ID: <54908F7A.1010603@myspectrum.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.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 > Cc: Simon Glass > Cc: Tom Rini > --- > 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