Add WinCE image load/boot cmd
PATCH 1/1 Add WinCE image load/boot cmd
The patch is to add support functions which load and boot WinCE image. It introduces one new CMD macro named 'CONFIG_CMD_WINCE'. The source codes have tested on STLS board.
--- common/Makefile | 1 + common/cmd_bootm.c | 32 ++++++++ common/cmd_wince.c | 193 ++++++++++++++++++++++++++++++++++++++++++++++ include/config_cmd_all.h | 1 + include/image.h | 1 + 5 files changed, 228 insertions(+), 0 deletions(-) create mode 100644 common/cmd_wince.c
common/Makefile +1 -0
@@ -144,6 +144,7 @@ COBJS-y += cmd_mac.o COBJS-$(CONFIG_CMD_MFSL) += cmd_mfsl.o COBJS-$(CONFIG_MP) += cmd_mp.o COBJS-$(CONFIG_CMD_SF) += cmd_sf.o +COBJS-$(CONFIG_CMD_WINCE) += cmd_wince.o COBJS := $(COBJS-y) SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
common/cmd_bootm.c +32 -0
@@ -106,6 +106,10 @@ int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);#if defined(CONFIG_ARTOS ) && defined(CONFIG_PPC )static boot_os_fn do_bootm_artos;#endif +#if defined(CONFIG_CMD_WINCE ) +static boot_os_fn do_bootm_wince; +int do_bootwince (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]); +#endif ulong load_addr =CFG_LOAD_ADDR ;/* Default Load Address */ static bootm_headers_t images;/* pointers to os/initrd/fdt images */
@@ -358,6 +362,12 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])do_bootm_artos (cmdtp, flag, argc, argv, &images);break ;#endif + +#ifdef CONFIG_CMD_WINCE +case IH_OS_WINCE : +do_bootm_wince (cmdtp, flag, argc, argv, &images); +break ; +#endif }show_boot_progress (-9 );
@@ -1142,3 +1152,25 @@ static void do_bootm_artos (cmd_tbl_t *cmdtp, int flag, (*entry) (kbd, cmdline, fwenv, top); }#endif + +#if defined(CONFIG_CMD_WINCE ) +static void do_bootm_wince (cmd_tbl_t *cmdtp,int flag, +int argc,char *argv[], +bootm_headers_t *images) +{ +char str[80 ]; +image_header_t *hdr = &images->legacy_hdr_os_copy; + +#if defined(CONFIG_FIT ) +if (!images->legacy_hdr_valid) { +fit_unsupported_reset ("WinCE" ); +do_reset (cmdtp, flag, argc, argv); + } +#endif + +sprintf (str,"%x" ,image_get_ep (hdr));/* write entry-point into string */ +setenv ("loadaddr" , str); +do_bootwince (cmdtp,0 ,0 ,NULL ); +} +#endif /* CONFIG_CMD_WINCE */ +
common/cmd_wince.c new file +193 -0
193 lines not on this page · raw message
include/config_cmd_all.h +1 -0
@@ -81,5 +81,6 @@#define CONFIG_CMD_VFD /* VFD support (TRAB) */ #define CONFIG_CMD_XIMG /* Load part of Multi Image */ #define CONFIG_CMD_AT91_SPIMUX /* AT91 MMC/SPI Mux Support */ +#define CONFIG_CMD_WINCE /* WinCE load/boot cmd */ #endif /* _CONFIG_CMD_ALL_H */
include/image.h +1 -0
@@ -85,6 +85,7 @@#define IH_OS_RTEMS 18/* RTEMS */ #define IH_OS_ARTOS 19/* ARTOS */ #define IH_OS_UNITY 20/* Unity OS */ +#define IH_OS_WINCE 21/* WinCE OS */ /* * CPU Architecture Codes (supported by Linux)
Signature · 1 line
1.6.0.rc1
PATCH 1/1 Add WinCE image load/boot cmd
Dear Ryan CHEN,
Quoted 6 lines · In message <[email protected]> you wrote:
The patch is to add support functions which load and boot WinCE image. It introduces one new CMD macro named '
CONFIG_CMD_WINCE'. The source codes have tested on STLS board.Signed-off-by Ryan Chen <[email protected]>
Quoted 8 lines
--- common/Makefile | 1 + common/cmd_bootm.c | 32 ++++++++ common/cmd_wince.c | 193 ++++++++++++++++++++++++++++++++++++++++++++++ include/config_cmd_all.h | 1 + include/image.h | 1 + 5 files changed, 228 insertions(+), 0 deletions(-) create mode 100644 common/cmd_wince.c
Sorry, this patch doesn't apply any more.
Can you please rebase and resubmit it? Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de While most peoples' opinions change, the conviction of their correct- ness never does.
PATCH 1/1 Add WinCE image load/boot cmd
In reply to Ryan CHENQuoted 6 lines · Ryan CHEN
The patch is to add support functions which load and boot WinCE image. It introduces one new CMD macro named '
CONFIG_CMD_WINCE'. The source codes have tested on STLS board.Signed-off-by Ryan Chen <[email protected]>
Quoted 8 lines
--- common/Makefile | 1 + common/cmd_bootm.c | 32 ++++++++ common/cmd_wince.c | 193 ++++++++++++++++++++++++++++++++++++++++++++++ include/config_cmd_all.h | 1 + include/image.h | 1 + 5 files changed, 228 insertions(+), 0 deletions(-) create mode 100644 common/cmd_wince.c
Do you have any plan to rebase it against current HEAD?
Best Regards,
J.
PATCH 1/1 Add WinCE image load/boot cmd
In reply to Ryan CHENQuoted 6 lines · Ryan CHEN
The patch is to add support functions which load and boot WinCE image. It introduces one new CMD macro named '
CONFIG_CMD_WINCE'. The source codes have tested on STLS board.Signed-off-by Ryan Chen <[email protected]>
Quoted 9 lines
--- common/Makefile | 1 + common/cmd_bootm.c | 32 ++++++++ common/cmd_wince.c | 193 ++++++++++++++++++++++++++++++++++++++++++++++ include/config_cmd_all.h | 1 + include/image.h | 1 + 5 files changed, 228 insertions(+), 0 deletions(-) create mode 100644 common/cmd_wince.c
+
Quoted 26 lines
common/cmd_wince.c new file +20
-0@@ -0,0 +1,193 @@ +/* +* 2008 (c) STMicroelectronics, Inc. +* Author: Ryan Chen <[email protected]> +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* 3. All advertising materials mentioning features or use of this software +* must display the following acknowledgement: +* This product includes software developed by Opsycon AB, Sweden. +* 4. The name of the author may not be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
common/cmd_wince.c line 30
Quoted 10 lines
common/cmd_wince.c new file +10
-0+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +*/
Hi,
Could resend this code under either GPL or a clean, GPL-compatible BSD license.
And BTW if needed put Opsycon AB in copy.
Best Regards,
J.