* [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type
@ 2014-12-16 13:07 Marek Vasut
2014-12-16 13:07 ` [U-Boot] [PATCH 2/2] image: Enable OpenRTOS booting via fitImage Marek Vasut
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Marek Vasut @ 2014-12-16 13:07 UTC (permalink / raw)
To: u-boot
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);
+
+ /*
+ * OpenRTOS Parameters:
+ * None
+ */
+ (*entry_point)();
+
+ return 1;
+}
+#endif
+
static boot_os_fn *boot_os[] = {
[IH_OS_U_BOOT] = do_bootm_standalone,
#ifdef CONFIG_BOOTM_LINUX
@@ -434,6 +460,9 @@ static boot_os_fn *boot_os[] = {
#ifdef CONFIG_INTEGRITY
[IH_OS_INTEGRITY] = do_bootm_integrity,
#endif
+#ifdef CONFIG_BOOTM_OPENRTOS
+ [IH_OS_OPENRTOS] = do_bootm_openrtos,
+#endif
};
/* Allow for arch specific config before we boot */
diff --git a/common/image.c b/common/image.c
index b75a5ce..64b4281 100644
--- a/common/image.c
+++ b/common/image.c
@@ -120,6 +120,10 @@ static const table_entry_t uimage_os[] = {
{ IH_OS_SOLARIS, "solaris", "Solaris", },
{ IH_OS_SVR4, "svr4", "SVR4", },
#endif
+#if defined(CONFIG_BOOTM_OPENRTOS) || defined(USE_HOSTCC)
+ { IH_OS_OPENRTOS, "openrtos", "OpenRTOS", },
+#endif
+
{ -1, "", "", },
};
diff --git a/include/image.h b/include/image.h
index af30d60..ee3afe3 100644
--- a/include/image.h
+++ b/include/image.h
@@ -152,6 +152,7 @@ struct lmb;
#define IH_OS_INTEGRITY 21 /* INTEGRITY */
#define IH_OS_OSE 22 /* OSE */
#define IH_OS_PLAN9 23 /* Plan 9 */
+#define IH_OS_OPENRTOS 24 /* OpenRTOS */
/*
* CPU Architecture Codes (supported by Linux)
--
2.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH 2/2] image: Enable OpenRTOS booting via fitImage
2014-12-16 13:07 [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type Marek Vasut
@ 2014-12-16 13:07 ` 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
` (2 subsequent siblings)
3 siblings, 2 replies; 8+ messages in thread
From: Marek Vasut @ 2014-12-16 13:07 UTC (permalink / raw)
To: u-boot
Allow booting the OpenRTOS payloads via fitImage image type.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
---
common/image-fit.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/common/image-fit.c b/common/image-fit.c
index 4ffc5aa..1589ee3 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1518,6 +1518,7 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
size_t size;
int type_ok, os_ok;
ulong load, data, len;
+ uint8_t os;
const char *prop_name;
int ret;
@@ -1612,10 +1613,15 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
(image_type == IH_TYPE_KERNEL &&
fit_image_check_type(fit, noffset,
IH_TYPE_KERNEL_NOLOAD));
+
os_ok = image_type == IH_TYPE_FLATDT ||
- fit_image_check_os(fit, noffset, IH_OS_LINUX);
+ fit_image_check_os(fit, noffset, IH_OS_LINUX) ||
+ fit_image_check_os(fit, noffset, IH_OS_OPENRTOS);
if (!type_ok || !os_ok) {
- printf("No Linux %s %s Image\n", genimg_get_arch_name(arch),
+ fit_image_get_os(fit, noffset, &os);
+ printf("No %s %s %s Image\n",
+ genimg_get_os_name(os),
+ genimg_get_arch_name(arch),
genimg_get_type_name(image_type));
bootstage_error(bootstage_id + BOOTSTAGE_SUB_CHECK_ALL);
return -EIO;
--
2.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH 2/2] image: Enable OpenRTOS booting via fitImage
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
1 sibling, 0 replies; 8+ messages in thread
From: Simon Glass @ 2014-12-16 16:25 UTC (permalink / raw)
To: u-boot
On 16 December 2014 at 06:07, Marek Vasut <marex@denx.de> wrote:
> Allow booting the OpenRTOS payloads via fitImage image type.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@ti.com>
> ---
> common/image-fit.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [U-Boot, 2/2] image: Enable OpenRTOS booting via fitImage
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 ` Tom Rini
1 sibling, 0 replies; 8+ messages in thread
From: Tom Rini @ 2015-01-15 14:58 UTC (permalink / raw)
To: u-boot
On Tue, Dec 16, 2014 at 02:07:22PM +0100, Marek Vasut wrote:
> Allow booting the OpenRTOS payloads via fitImage image type.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@ti.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150115/80f89b6b/attachment.pgp>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type
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:28 ` Simon Glass
2014-12-16 17:01 ` Marek Vasut
2014-12-16 20:00 ` Jeroen Hofstee
2015-01-15 14:58 ` [U-Boot] [U-Boot,1/2] " Tom Rini
3 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2014-12-16 16:28 UTC (permalink / raw)
To: u-boot
On 16 December 2014 at 06:07, Marek Vasut <marex@denx.de> 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(+)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type
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
0 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2014-12-16 17:01 UTC (permalink / raw)
To: u-boot
On Tuesday, December 16, 2014 at 05:28:55 PM, Simon Glass wrote:
> On 16 December 2014 at 06:07, Marek Vasut <marex@denx.de> 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(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Thank you! I was a bit worried if these patches are really done
right and if this is the correct way to integrate the OpenRTOS
support.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type
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:28 ` [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type Simon Glass
@ 2014-12-16 20:00 ` Jeroen Hofstee
2015-01-15 14:58 ` [U-Boot] [U-Boot,1/2] " Tom Rini
3 siblings, 0 replies; 8+ messages in thread
From: Jeroen Hofstee @ 2014-12-16 20:00 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot] [U-Boot,1/2] image: bootm: Add OpenRTOS image type
2014-12-16 13:07 [U-Boot] [PATCH 1/2] image: bootm: Add OpenRTOS image type Marek Vasut
` (2 preceding siblings ...)
2014-12-16 20:00 ` Jeroen Hofstee
@ 2015-01-15 14:58 ` Tom Rini
3 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2015-01-15 14:58 UTC (permalink / raw)
To: u-boot
On Tue, Dec 16, 2014 at 02:07:21PM +0100, 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>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150115/db6a790a/attachment.pgp>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-01-15 14:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-01-15 14:58 ` [U-Boot] [U-Boot,1/2] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox