image: Add support for Plan 9
PATCH v2 1/1 image: Add support for Plan 9
Signed-off-by Steven Stallion <[email protected]>
Cc Tom Rini <[email protected]>
---
This patch adds support for Plan 9 from Bell Labs kernel images.
Changes for v2:
- Combined previous patches for image and bootm
common/cmd_bootm.c | 39 +++++++++++++++++++++++++++++++++++++++ common/image.c | 1 + include/config_defaults.h | 1 + include/image.h | 1 + 4 files changed, 42 insertions(+)
common/cmd_bootm.c +39 -0
@@ -128,6 +128,9 @@ static boot_os_fn do_bootm_rtems;#if defined(CONFIG_BOOTM_OSE )static boot_os_fn do_bootm_ose;#endif +#if defined(CONFIG_BOOTM_PLAN9 ) +static boot_os_fn do_bootm_plan9; +#endif #if defined(CONFIG_CMD_ELF )static boot_os_fn do_bootm_vxworks;static boot_os_fn do_bootm_qnxelf;
@@ -154,6 +157,9 @@ static boot_os_fn *boot_os[] = {#if defined(CONFIG_BOOTM_OSE ) [IH_OS_OSE] = do_bootm_ose,#endif +#if defined(CONFIG_BOOTM_PLAN9 ) + [IH_OS_PLAN9] = do_bootm_plan9, +#endif #if defined(CONFIG_CMD_ELF ) [IH_OS_VXWORKS] = do_bootm_vxworks, [IH_OS_QNX] = do_bootm_qnxelf,
@@ -1628,6 +1634,39 @@ static int do_bootm_ose(int flag, int argc, char * const argv[], }#endif /* CONFIG_BOOTM_OSE */ +#if defined(CONFIG_BOOTM_PLAN9 ) +static int do_bootm_plan9 (int flag,int argc,char *const argv[], +bootm_headers_t *images) +{ +void (*entry_point)(void ); + +if ((flag !=0 ) && (flag !=BOOTM_STATE_OS_GO )) +return 1 ; + +#if defined(CONFIG_FIT ) +if (!images->legacy_hdr_valid) { +fit_unsupported_reset ("Plan 9" ); +return 1 ; + } +#endif + + entry_point = (void (*)(void ))images->ep; + +printf ("## Transferring control to Plan 9 (at address %08lx) ...\n" , + (ulong )entry_point); + +bootstage_mark (BOOTSTAGE_ID_RUN_OS ); + +/* +* Plan 9 Parameters: +* None +*/ + (*entry_point)(); + +return 1 ; +} +#endif /* CONFIG_BOOTM_PLAN9 */ +#if defined(CONFIG_CMD_ELF )static int do_bootm_vxworks (int flag,int argc,char *const argv[],bootm_headers_t *images)
common/image.c +1 -0
@@ -108,6 +108,7 @@ static const table_entry_t uimage_os[] = {#endif { IH_OS_NETBSD, "netbsd", "NetBSD", }, { IH_OS_OSE, "ose", "Enea OSE", }, + { IH_OS_PLAN9, "plan9", "Plan 9", }, { IH_OS_RTEMS, "rtems", "RTEMS", }, { IH_OS_U_BOOT, "u-boot", "U-Boot", }, #if defined(CONFIG_CMD_ELF) || defined(USE_HOSTCC)
include/config_defaults.h +1 -0
@@ -12,6 +12,7 @@/* Support bootm-ing different OSes */ #define CONFIG_BOOTM_LINUX 1#define CONFIG_BOOTM_NETBSD 1 +#define CONFIG_BOOTM_PLAN9 1#define CONFIG_BOOTM_RTEMS 1#define CONFIG_GZIP 1
include/image.h +1 -0
@@ -84,6 +84,7 @@#define IH_OS_UNITY 20/* Unity OS */ #define IH_OS_INTEGRITY 21/* INTEGRITY */ #define IH_OS_OSE 22/* OSE */ +#define IH_OS_PLAN9 23/* Plan 9 */ /* * CPU Architecture Codes (supported by Linux)
Signature · 1 line
1.8.2
PATCH v2 1/1 image: Add support for Plan 9
Quoted 5 lines · Steven Stallion
Signed-off-by Steven Stallion <[email protected]>Cc Tom Rini <[email protected]>---
This patch adds support for Plan 9 from Bell Labs kernel images.
Quoted 8 lines
Changes for v2:
- Combined previous patches for image and bootmcommon/cmd_bootm.c | 39 +++++++++++++++++++++++++++++++++++++++ common/image.c | 1 + include/config_defaults.h | 1 + include/image.h | 1 + 4 files changed, 42 insertions(+)
Reviewed-by Tom Rini <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130320/2dbff7c4/attachment.pgp>
PATCH v2 1/1 image: Add support for Plan 9
In reply to Steven StallionQuoted 3 lines · Steven Stallion
Signed-off-by Steven Stallion <[email protected]>Cc Tom Rini <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130327/19b62f3f/attachment.pgp>