Add device tree support for VxWorks
Subsystems (2)
cover Add device tree support for VxWorks
Hello Wolfgang and All,
The next release of VxWorks will adopt device tree as its
hardware description mechanism (for PowerPC and ARM), thus requiring boot interface changes for these two architechtures. And we would like to better support U-Boot with our operating system, because almost all the PowerPC and ARM boards that we support come with U-Boot pre-flashed and we would like to create better experience for our users.
Currently, U-Boot provides a 'bootvx' command (bootm internally
uses bootvx) to load and run VxWorks image (for both ELF format or raw binary), for example:
bootvx 0x1000000
or just:
bootvx
if the environmental variable 'loadaddr' is set. The 'bootvx' will
setup bootline and jump to the VxWorks entry using the following calling convention:
(void)(*entry)(int arg /* 0 */)
With the new VxWorks, the kernel entry interface for PowerPC is going to be changed to conform to the ePAPR standard, and for ARM, we need deivce tree's physical address to be passed to the kernel like this:
(void)(*entry)(void *fdt_addr)
And VxWorks bootline will be saved into deivce tree's 'bootargs' node as specified by the ePAPR (for both PowerPC and ARM).
The 'bootvx' commnad stays unchaged, and is still avalaible under the configuration option CONFIG_CMD_ELF for older kernels. A new option CONFIG_BOOTM_VXWORKS is added for bootm to align with other
bootm supported operating systems.
So the do_bootm_vxworks will work as below:
#if (libfdt && (ppc || arm))
if (using device tree)
boot_vxworks_with_device_tree
else
#endif
bootvx(...);The following patches are rebased on today's master branch (commit 6856254fc05d67f874d08a534724c842f93a605f).
Thanks,
Miao Yan (5):
common/cmd_bootm.c: seperate do_bootm_vxworks related code from
CONFIG_CMD_ELF.
common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default
configuration
common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks
boot interface.
common/fdt_support.c: avoid unintended return from
fdt_fixup_memory_banks()
doc/README.vxworks: add a document describing the new VxWorks boot
interface
arch/arm/lib/bootm.c | 21 +++++++++++ arch/powerpc/lib/bootm.c | 52 ++++++++++++++++++++++++++ common/cmd_bootm.c | 90 +++++++++++++++++++++++++++++++++++++++++---- common/fdt_support.c | 5 ++- doc/README.vxworks | 34 +++++++++++++++++ include/common.h | 4 ++ include/config_defaults.h | 1 + include/vxworks.h | 2 + 8 files changed, 200 insertions(+), 9 deletions(-) create mode 100644 doc/README.vxworks
Signature · 1 line
1.7.9.5
PATCH 1/5 common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.
do_bootm_vxworks now is available under the configuration option CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems that supported by bootm command. The bootvx command still depneds on CONFIG_CMD_ELF.
--- common/cmd_bootm.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
common/cmd_bootm.c +12 -3
@@ -120,8 +120,10 @@ static boot_os_fn do_bootm_ose;#if defined(CONFIG_BOOTM_PLAN9 )static boot_os_fn do_bootm_plan9;#endif -#if defined(CONFIG_CMD_ELF ) +#if defined(CONFIG_BOOTM_VXWORKS )static boot_os_fn do_bootm_vxworks; +#endif +#if defined(CONFIG_CMD_ELF )static boot_os_fn do_bootm_qnxelf;int do_bootvx (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]);int do_bootelf (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]);
@@ -149,8 +151,10 @@ static boot_os_fn *boot_os[] = {#if defined(CONFIG_BOOTM_PLAN9 ) [IH_OS_PLAN9] = do_bootm_plan9,#endif -#if defined(CONFIG_CMD_ELF ) +#if defined(CONFIG_BOOTM_VXWORKS ) [IH_OS_VXWORKS] = do_bootm_vxworks, +#endif +#if defined(CONFIG_CMD_ELF ) [IH_OS_QNX] = do_bootm_qnxelf,#endif #ifdef CONFIG_INTEGRITY
@@ -1683,7 +1687,7 @@ static int do_bootm_plan9(int flag, int argc, char * const argv[], }#endif /* CONFIG_BOOTM_PLAN9 */ -#if defined(CONFIG_CMD_ELF ) +#if defined(CONFIG_BOOTM_VXWORKS )static int do_bootm_vxworks (int flag,int argc,char *const argv[],bootm_headers_t *images) {
@@ -1703,11 +1707,16 @@ static int do_bootm_vxworks(int flag, int argc, char * const argv[],sprintf (str,"%lx" , images->ep);/* write entry-point into string */ setenv ("loadaddr" , str); + +#if defined(CONFIG_CMD_ELF )do_bootvx (NULL ,0 ,0 ,NULL ); +#endif return 1 ; } +#endif +#if defined(CONFIG_CMD_ELF )static int do_bootm_qnxelf (int flag,int argc,char *const argv[],bootm_headers_t *images) {
Signature · 1 line
1.7.9.5
PATCH 2/5 common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default configuration
In reply to Miao Yan--- include/config_defaults.h | 1 + 1 file changed, 1 insertion(+)
include/config_defaults.h +1 -0
@@ -14,6 +14,7 @@#define CONFIG_BOOTM_NETBSD 1#define CONFIG_BOOTM_PLAN9 1#define CONFIG_BOOTM_RTEMS 1 +#define CONFIG_BOOTM_VXWORKS 1#define CONFIG_GZIP 1#define CONFIG_ZLIB 1
Signature · 1 line
1.7.9.5
PATCH 3/5 common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.
In reply to Miao YanThe next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware description mechanism. For PowerPC, the boot interface conforms to the ePAPR standard, which is:
void (*kernel_entry)(ulong fdt_addr,
ulong r4 /* 0 */,
ulong r5 /* 0 */,
ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
ulong r8 /* 0 */, ulong r9 /* 0 */)For ARM, the boot interface is:
void (*kernel_entry)(void *fdt_addr)
--- arch/arm/lib/bootm.c | 21 +++++++++++++ arch/powerpc/lib/bootm.c | 52 ++++++++++++++++++++++++++++++++ common/cmd_bootm.c | 75 +++++++++++++++++++++++++++++++++++++++++++--- include/common.h | 4 +++ include/vxworks.h | 2 ++ 5 files changed, 150 insertions(+), 4 deletions(-)
arch/arm/lib/bootm.c +21 -0
@@ -308,3 +308,24 @@ int bootz_setup(ulong image, ulong *start, ulong *end) }#endif /* CONFIG_CMD_BOOTZ */ + +#if defined(CONFIG_BOOTM_VXWORKS ) && defined(CONFIG_OF_LIBFDT ) +void boot_prep_vxworks (bootm_headers_t *images) +{ +int off; + +assert (images->ft_addr); + + off =fdt_path_offset (images->ft_addr,"/memory" ); +if (off <0 ) { +if (arch_fixup_memory_node (images->ft_addr)) +puts ("## WARNING: fixup memory failed!\n" ); + } +cleanup_before_linux (); +} +void boot_jump_vxworks (bootm_headers_t *images) +{ +/* ARM VxWorks requires device tree physical address to be passed */ + ((void (*)(void *))images->ep)(images->ft_addr); +} +#endif
arch/powerpc/lib/bootm.c +52 -0
55 lines not on this page · raw message
common/cmd_bootm.c +71 -4
105 lines not on this page · raw message
include/common.h +4 -0
@@ -690,6 +690,10 @@ ulong get_ddr_freq(ulong);#if defined(CONFIG_MPC85xx)typedef MPC85xx_SYS_INFO sys_info_t ;void get_sys_info (sys_info_t * ); +# if defined(CONFIG_OF_LIBFDT ) +void ft_fixup_cpu (void *,u64 ); +void ft_fixup_num_cores (void *); +# endif #endif #if defined(CONFIG_MPC86xx)typedef MPC86xx_SYS_INFO sys_info_t ;
include/vxworks.h +2 -0
@@ -9,6 +9,8 @@#define _VXWORKS_H_int do_bootvx (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]); +void boot_prep_vxworks (bootm_headers_t *images); +void boot_jump_vxworks (bootm_headers_t *images);/* * Use bootaddr to find the location in memory that VxWorks
Signature · 1 line
1.7.9.5
PATCH 4/5 common/fdt_support.c: avoid unintended return from fdt_fixup_memory_banks()
In reply to Miao Yanfdt_fixup_memory_banks() will add and update /memory node in device tree blob. In the case that /memory node doesn't exist, after adding a new one, this function returns error.
The correct behavior should be continuing to update its properties.
--- common/fdt_support.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
common/fdt_support.c +3 -2
@@ -400,10 +400,11 @@ int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) nodeoffset =fdt_path_offset (blob,"/memory" );if (nodeoffset <0 ) { nodeoffset =fdt_add_subnode (blob,0 ,"memory" ); -if (nodeoffset <0 ) +if (nodeoffset <0 ) {printf ("WARNING: could not create /memory: %s.\n" ,fdt_strerror (nodeoffset)); -return nodeoffset; +return nodeoffset; + } } err =fdt_setprop (blob, nodeoffset,"device_type" ,"memory" ,sizeof ("memory" ));
Signature · 1 line
1.7.9.5
PATCH 5/5 doc/README.vxworks: add a document describing the new VxWorks boot interface
In reply to Miao Yan--- doc/README.vxworks | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 doc/README.vxworks
doc/README.vxworks new file +34 -0
@@ -0,0 +1,34 @@ +From VxWorks 6.9+ (not include 6.9), VxWorks starts adopting device tree as its hardware +decription mechansim (for PowerPC and ARM), thus requiring boot interface changes. +This section will describe the new interface. + +For PowerPC, the calling convention of the new VxWorks entry point conforms to the ePAPR standard[1], +which is shown below (see ePAPR for more details): + + void (*kernel_entry)(ulong fdt_addr, + ulong r4 /* 0 */, ulong r5 /* 0 */, + ulong r6 /* EPAPR_MAGIC */ + ulong r7 /* boot IMA */, + ulong r8 /* 0 */, ulong r9 /* 0 */) + +For ARM, the calling convention is show below: + + void (*kernel_entry)(void *fdt_addr) + +When booting new VxWorks kernel (uImage format), the parameters passed to bootm is like below: + + bootm <kernel image address> - <device tree address> + +for example, booting p2020rdb kernel: (kernel is placed at address 0x1000000 and device tree blob +is places at address 0xf000000) + + setenv bootargs "gei(0,0)....." + tftp 0x1000000 vxWorks.uboot + tftp 0xf000000 p2020rdb.dtb + bootm 0x1000000 - 0xf000000 + +The second parameter to bootm is always '-' for VxWorks (VxWorks kernel doesn't make use of initrd) + +The bootvx command still works as it was for older kernels. + +[1] www.power.org
Signature · 1 line
1.7.9.5
cover Add device tree support for VxWorks
In reply to Miao YanDear Miao Yan,
Quoted 6 lines · In message <[email protected]> you wrote:
The 'bootvx' commnad stays unchaged, and is still avalaible under the configuration option
CONFIG_CMD_ELFfor older kernels. A new optionCONFIG_BOOTM_VXWORKSis added for bootm to align with other
bootm supported operating systems.
Quoted 8 lines
So the
do_bootm_vxworkswill work as below:#if (libfdt && (ppc || arm)) if (using device tree) boot_vxworks_with_device_tree else #endif bootvx(...);
I'm not sure I understand what this means. Please correct if my interpretation is incorrect or incomplete:
You intend to 1) just keep the existing 'bootvx' command for compatibility with older VxWorks versions, and 2) use plain 'bootm' for new versions, like we do for other OSes?
That sounds good to me.
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 You got to learn three things. What's real, what's not real, and what's the difference." - Terry Pratchett, _Witches Abroad_
cover Add device tree support for VxWorks
Hello Wolfgang,
Quoted 3 lines
You intend to 1) just keep the existing 'bootvx' command for compatibility with older VxWorks versions, and 2) use plain 'bootm' for new versions, like we do for other OSes?
Yes, this is what I intended to implement, sorry for not being more clear. The pesdo-code is like this:
int do_bootm_vxworks(bootm_headers_t *images)
{
if (images->ft_addr)
do_bootvx_fdt(images);
else
do_bootvx(NULL, 0, 0, NULL);
}So 'bootm' works with new versions of VxWorks if device tree blob is provided, otherwise it falls back to 'bootvx'.
The original idea was to separate 'bootvx' from 'bootm' entirely, but I am not sure how many users out there that depend on the old
behavior, so I am inclined to keep it and not break anyone.
Could you help review the patches ? Thank you very much.
Miao
cover Add device tree support for VxWorks
Dear Myan,
Quoted 18 lines · In message <[email protected]> you wrote:
Hello Wolfgang,
Quoted 3 lines
You intend to 1) just keep the existing 'bootvx' command for compatibility with older VxWorks versions, and 2) use plain 'bootm' for new versions, like we do for other OSes?
Yes, this is what I intended to implement, sorry for not being more clear. The pesdo-code is like this:
int do_bootm_vxworks(bootm_headers_t *images) { if (images->ft_addr) do_bootvx_fdt(images); else do_bootvx(NULL, 0, 0, NULL); }
Quoted 2 lines
So 'bootm' works with new versions of VxWorks if device tree blob is provided, otherwise it falls back to 'bootvx'.
I think this is not a good idea, for two reasons.
First, it means the behaviour of the "bootm" command is not consistent - with FDT address passed as argument it behaves one way, without it behaves different.
Second, You may want to support images that have the FDT attached or embedded or similar - maybe not now, but I bet such requests will pop up. You cannot do this in your code.
Quoted 3 lines
The original idea was to separate 'bootvx' from 'bootm' entirely, but I am not sure how many users out there that depend on the old
behavior, so I am inclined to keep it and not break anyone.
If there is no way to inquire from the image itself wether it is one with FDT support or not (we might even assign a new IH_OS_ type for the new ones?), then it would probably be better to make "bootm" support only the new FDT aware images, and keep "bootvx" as compatibility command to boot older images.
On the other hand - what exactly is the difference between both boot ways to start an image? Does the additional address passed for the FDT really hurt old style images, so do we need the differentiation at all?
Best regards,
Wolfgang Denk
Signature · 4 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 Any technology distinguishable from magic is insufficiently advanced.
cover Add device tree support for VxWorks
Hello Wolfgang,
Quoted 10 lines
I think this is not a good idea, for two reasons.
First, it means the behaviour of the "bootm" command is not consistent - with FDT address passed as argument it behaves one way, without it behaves different.
Second, You may want to support images that have the FDT attached or embedded or similar - maybe not now, but I bet such requests will pop up. You cannot do this in your code.
I understand this. The only reason that I did this way is that I am afraid of
breaking existing 'bootm' users, but I just searched the mailing, seems that VxWorks volume is rather low, maybe it's OK to separate the two without hurting anyone.
Quoted 5 lines
If there is no way to inquire from the image itself wether it is one with FDT support or not (we might even assign a new
IH_OS_type for the new ones?), then it would probably be better to make "bootm" support only the new FDT aware images, and keep "bootvx" as compatibility command to boot older images.
I don't prefer to add a new OS type. It is still VxWorks after all, and with
the fact that I am not allowed to disclose any information of the new version (not GA yet) makes it harder to come up with a meaningful name like IH_OS_VXWORKS_xxx. I would prefer to do it as you said, just making 'bootm' work with new versions and keeping 'bootvx' for the older ones. This makes
things a lot easier.
Quoted 5 lines
On the other hand - what exactly is the difference between both boot ways to start an image? Does the additional address passed for the FDT really hurt old style images, so do we need the differentiation at all?
90% of the 'do_bootvx' function is about bootline setup (storing bootline to random memory locations that totally depend on individual BSP), which doesn't apply to the new kernel (in fact, if not doing right, it will likely result in memory corruption and hang the board). And I don't see a reliable way to distinguish the new and old kernels at runtime. Mixing them would make the code hard to maintain. I'd rather see them separated so we could focus on supporting the new one.
Miao
v2 cover Add device tree support for VxWorks
In reply to Miao YanHello Wolfgang and All,
The next release of VxWorks will adopt device tree as its
hardware description mechanism (for PowerPC and ARM), thus requiring boot interface changes for these two architechtures. And we would like to better support U-Boot with our operating system, because almost all the PowerPC and ARM boards that we support come with U-Boot pre-flashed and we would like to create better experience for our users.
Currently, U-Boot provides a 'bootvx' command (bootm internally
uses bootvx) to load and run VxWorks image (for both ELF format or raw binary), for example:
bootvx 0x1000000
or just:
bootvx
if the environmental variable 'loadaddr' is set. The 'bootvx' will
setup bootline and jump to the VxWorks entry using the following calling convention:
(void)(*entry)(int arg /* 0 */)
With the new VxWorks, the kernel entry interface for PowerPC is going to be changed to conform to the ePAPR standard, and for ARM, we need deivce tree's physical address to be passed to the kernel like this:
(void)(*entry)(void *fdt_addr)
And VxWorks bootline will be saved into deivce tree's 'bootargs' node as specified by the ePAPR (for both PowerPC and ARM).
The 'bootvx' commnad stays unchaged, and is still avalaible under the configuration option CONFIG_CMD_ELF for older kernels. A new option CONFIG_BOOTM_VXWORKS is added for bootm to align with other
bootm supported operating systems.
So the do_bootm_vxworks will work wit new versions of VxWorks which need device tree support, and do_bootvx will work with older VxWorks kernels as before.
Thanks,
Changes for v2:
1) seperating legacy do_bootvx code from do_bootm_vxworks, thus making do_bootm_vxworks only work with new kernels, old kernels can still use 'bootvx'
2) minor fixes to make code more clear
Miao Yan (5):
common/cmd_bootm.c: seperate do_bootm_vxworks related code from
CONFIG_CMD_ELF.
common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default
configuration
common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks
boot interface.
common/fdt_support.c: avoid unintended return from
fdt_fixup_memory_banks()
doc/README.vxworks: add a document describing the new VxWorks boot
interface
arch/arm/lib/bootm.c | 23 +++++++++++++ arch/powerpc/lib/bootm.c | 55 +++++++++++++++++++++++++++++++ common/cmd_bootm.c | 80 ++++++++++++++++++++++++++++++++++++++++----- common/fdt_support.c | 5 +-- doc/README.vxworks | 34 +++++++++++++++++++ include/common.h | 4 +++ include/config_defaults.h | 1 + include/vxworks.h | 3 ++ 8 files changed, 194 insertions(+), 11 deletions(-) create mode 100644 doc/README.vxworks
Signature · 1 line
1.7.9.5
PATCH v2 1/5 common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.
do_bootm_vxworks now is available under the configuration option CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems that supported by bootm command. The bootvx command still depneds on CONFIG_CMD_ELF.
---
Changes for v2: none
common/cmd_bootm.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
common/cmd_bootm.c +12 -3
@@ -120,8 +120,10 @@ static boot_os_fn do_bootm_ose;#if defined(CONFIG_BOOTM_PLAN9 )static boot_os_fn do_bootm_plan9;#endif -#if defined(CONFIG_CMD_ELF ) +#if defined(CONFIG_BOOTM_VXWORKS )static boot_os_fn do_bootm_vxworks; +#endif +#if defined(CONFIG_CMD_ELF )static boot_os_fn do_bootm_qnxelf;int do_bootvx (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]);int do_bootelf (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]);
@@ -149,8 +151,10 @@ static boot_os_fn *boot_os[] = {#if defined(CONFIG_BOOTM_PLAN9 ) [IH_OS_PLAN9] = do_bootm_plan9,#endif -#if defined(CONFIG_CMD_ELF ) +#if defined(CONFIG_BOOTM_VXWORKS ) [IH_OS_VXWORKS] = do_bootm_vxworks, +#endif +#if defined(CONFIG_CMD_ELF ) [IH_OS_QNX] = do_bootm_qnxelf,#endif #ifdef CONFIG_INTEGRITY
@@ -1683,7 +1687,7 @@ static int do_bootm_plan9(int flag, int argc, char * const argv[], }#endif /* CONFIG_BOOTM_PLAN9 */ -#if defined(CONFIG_CMD_ELF ) +#if defined(CONFIG_BOOTM_VXWORKS )static int do_bootm_vxworks (int flag,int argc,char *const argv[],bootm_headers_t *images) {
@@ -1703,11 +1707,16 @@ static int do_bootm_vxworks(int flag, int argc, char * const argv[],sprintf (str,"%lx" , images->ep);/* write entry-point into string */ setenv ("loadaddr" , str); + +#if defined(CONFIG_CMD_ELF )do_bootvx (NULL ,0 ,0 ,NULL ); +#endif return 1 ; } +#endif +#if defined(CONFIG_CMD_ELF )static int do_bootm_qnxelf (int flag,int argc,char *const argv[],bootm_headers_t *images) {
Signature · 1 line
1.7.9.5
PATCH v3 1/5 common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.
From: Miao Yan <[email protected]>
do_bootm_vxworks now is available under the configuration option CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems that supported by bootm command. The bootvx command still depneds on CONFIG_CMD_ELF.
---
Changes:v2->v3: rebase to master: d19ad726bcd5d9106f7ba9c750462fcc369f1020 v1->v2: none
common/cmd_bootm.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
common/cmd_bootm.c +12 -3
@@ -120,8 +120,10 @@ static boot_os_fn do_bootm_ose;#if defined(CONFIG_BOOTM_PLAN9 )static boot_os_fn do_bootm_plan9;#endif -#if defined(CONFIG_CMD_ELF ) +#if defined(CONFIG_BOOTM_VXWORKS )static boot_os_fn do_bootm_vxworks; +#endif +#if defined(CONFIG_CMD_ELF )static boot_os_fn do_bootm_qnxelf;int do_bootvx (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]);int do_bootelf (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]);
@@ -149,8 +151,10 @@ static boot_os_fn *boot_os[] = {#if defined(CONFIG_BOOTM_PLAN9 ) [IH_OS_PLAN9] = do_bootm_plan9,#endif -#if defined(CONFIG_CMD_ELF ) +#if defined(CONFIG_BOOTM_VXWORKS ) [IH_OS_VXWORKS] = do_bootm_vxworks, +#endif +#if defined(CONFIG_CMD_ELF ) [IH_OS_QNX] = do_bootm_qnxelf,#endif #ifdef CONFIG_INTEGRITY
@@ -1678,7 +1682,7 @@ static int do_bootm_plan9(int flag, int argc, char * const argv[], }#endif /* CONFIG_BOOTM_PLAN9 */ -#if defined(CONFIG_CMD_ELF ) +#if defined(CONFIG_BOOTM_VXWORKS )static int do_bootm_vxworks (int flag,int argc,char *const argv[],bootm_headers_t *images) {
@@ -1696,11 +1700,16 @@ static int do_bootm_vxworks(int flag, int argc, char * const argv[],sprintf (str,"%lx" , images->ep);/* write entry-point into string */ setenv ("loadaddr" , str); + +#if defined(CONFIG_CMD_ELF )do_bootvx (NULL ,0 ,0 ,NULL ); +#endif return 1 ; } +#endif +#if defined(CONFIG_CMD_ELF )static int do_bootm_qnxelf (int flag,int argc,char *const argv[],bootm_headers_t *images) {
Signature · 1 line
1.7.9.5
PATCH v3 2/5 common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default configuration
From: Miao Yan <[email protected]>
---
Changes:v2->v3: rebase to master: d19ad726bcd5d9106f7ba9c750462fcc369f1020 v1->v2: none
include/config_defaults.h | 1 + 1 file changed, 1 insertion(+)
include/config_defaults.h +1 -0
@@ -14,6 +14,7 @@#define CONFIG_BOOTM_NETBSD 1#define CONFIG_BOOTM_PLAN9 1#define CONFIG_BOOTM_RTEMS 1 +#define CONFIG_BOOTM_VXWORKS 1#define CONFIG_GZIP 1#define CONFIG_ZLIB 1
Signature · 1 line
1.7.9.5
PATCH v3 2/5 common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default configuration
Quoted 3 lines · miao.yan at windriver.com
From: Miao Yan <[email protected]>
Signed-off-by Miao Yan <[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/20131216/0e4ad70a/attachment.pgp>
PATCH v3 3/5 common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.
In reply to myanFrom: Miao Yan <[email protected]>
The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware description mechanism. For PowerPC, the boot interface conforms to the ePAPR standard, which is:
void (*kernel_entry)(ulong fdt_addr,
ulong r4 /* 0 */,
ulong r5 /* 0 */,
ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
ulong r8 /* 0 */, ulong r9 /* 0 */)For ARM, the boot interface is:
void (*kernel_entry)(void *fdt_addr)
---
Changes:
v2->v3: rebase to master d19ad726bcd5d9106f7ba9c750462fcc369f1020 v1->v2:
1) remove legacy do_bootvx code from do_bootm_vxworks, thus making do_bootm_vxworks work only with new kernels, old kernels can still use 'bootvx'
2) minor fixes to make code more clear
arch/arm/lib/bootm.c | 23 ++++++++++++++ arch/powerpc/lib/bootm.c | 55 +++++++++++++++++++++++++++++++++ common/cmd_bootm.c | 77 ++++++++++++++++++++++++++++++++++++++-------- include/common.h | 4 +++ include/vxworks.h | 3 ++ 5 files changed, 150 insertions(+), 12 deletions(-)
arch/arm/lib/bootm.c +23 -0
@@ -326,3 +326,26 @@ int bootz_setup(ulong image, ulong *start, ulong *end) }#endif /* CONFIG_CMD_BOOTZ */ + +#if defined(CONFIG_BOOTM_VXWORKS ) +void boot_prep_vxworks (bootm_headers_t *images) +{ +#if defined(CONFIG_OF_LIBFDT ) +int off; + +if (images->ft_addr) { + off =fdt_path_offset (images->ft_addr,"/memory" ); +if (off <0 ) { +if (arch_fixup_memory_node (images->ft_addr)) +puts ("## WARNING: fixup memory failed!\n" ); + } + } +#endif +cleanup_before_linux (); +} +void boot_jump_vxworks (bootm_headers_t *images) +{ +/* ARM VxWorks requires device tree physical address to be passed */ + ((void (*)(void *))images->ep)(images->ft_addr); +} +#endif
arch/powerpc/lib/bootm.c +55 -0
58 lines not on this page · raw message
common/cmd_bootm.c +65 -12
116 lines not on this page · raw message
include/common.h +4 -0
@@ -698,6 +698,10 @@ ulong get_ddr_freq(ulong);#if defined(CONFIG_MPC85xx)typedef MPC85xx_SYS_INFO sys_info_t ;void get_sys_info (sys_info_t * ); +# if defined(CONFIG_OF_LIBFDT ) +void ft_fixup_cpu (void *,u64 ); +void ft_fixup_num_cores (void *); +# endif #endif #if defined(CONFIG_MPC86xx)typedef MPC86xx_SYS_INFO sys_info_t ;
include/vxworks.h +3 -0
@@ -9,6 +9,9 @@#define _VXWORKS_H_int do_bootvx (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]); +void boot_prep_vxworks (bootm_headers_t *images); +void boot_jump_vxworks (bootm_headers_t *images); +void do_bootvx_fdt (bootm_headers_t *images);/* * Use bootaddr to find the location in memory that VxWorks
Signature · 1 line
1.7.9.5
PATCH v3 3/5 common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.
Quoted 12 lines · miao.yan at windriver.com
From: Miao Yan <[email protected]>
The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware description mechanism. For PowerPC, the boot interface conforms to the ePAPR standard, which is:
void (*kernel_entry)(ulong fdt_addr, ulong r4 /* 0 */, ulong r5 /* 0 */, ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */, ulong r8 /* 0 */, ulong r9 /* 0 */)
Quoted 5 lines
For ARM, the boot interface is:
void (*kernel_entry)(void
*fdt_addr)Signed-off-by Miao Yan <[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/20131216/b60d5157/attachment.pgp>
PATCH v3 4/5 common/fdt_support.c: avoid unintended return from fdt_fixup_memory_banks()
In reply to myanFrom: Miao Yan <[email protected]>
fdt_fixup_memory_banks() will add and update /memory node in device tree blob. In the case that /memory node doesn't exist, after adding a new one, this function returns error.
The correct behavior should be continuing to update its properties.
---
changes:
v2->v3: rebase to master: d19ad726bcd5d9106f7ba9c750462fcc369f1020 v1->v2: none
common/fdt_support.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
common/fdt_support.c +3 -2
@@ -400,10 +400,11 @@ int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) nodeoffset =fdt_path_offset (blob,"/memory" );if (nodeoffset <0 ) { nodeoffset =fdt_add_subnode (blob,0 ,"memory" ); -if (nodeoffset <0 ) +if (nodeoffset <0 ) {printf ("WARNING: could not create /memory: %s.\n" ,fdt_strerror (nodeoffset)); -return nodeoffset; +return nodeoffset; + } } err =fdt_setprop (blob, nodeoffset,"device_type" ,"memory" ,sizeof ("memory" ));
Signature · 1 line
1.7.9.5
PATCH v3 4/5 common/fdt_support.c: avoid unintended return from fdt_fixup_memory_banks()
Quoted 9 lines · miao.yan at windriver.com
From: Miao Yan <[email protected]>
fdt_fixup_memory_banks()will add and update /memory node in device tree blob. In the case that /memory node doesn't exist, after adding a new one, this function returns error.The correct behavior should be continuing to update its properties.
Signed-off-by Miao Yan <[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/20131216/5e99320e/attachment.pgp>
PATCH v3 5/5 README.vxworks: add a document describing the new VxWorks boot interface
In reply to myanFrom: Miao Yan <[email protected]>
---
changes:
v2->v3: rebase to master: d19ad726bcd5d9106f7ba9c750462fcc369f1020 v1->v2: none
doc/README.vxworks | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/README.vxworks
doc/README.vxworks new file +19 -0
@@ -0,0 +1,19 @@ +From VxWorks 6.9+ (not include 6.9), VxWorks starts adopting device tree as its hardware +decription mechansim (for PowerPC and ARM), thus requiring boot interface changes. +This section will describe the new interface. + +For PowerPC, the calling convention of the new VxWorks entry point conforms to the ePAPR standard, +which is shown below (see ePAPR for more details): + + void (*kernel_entry)(fdt_addr, + 0, 0, EPAPR_MAGIC, boot_IMA, 0, 0) + +For ARM, the calling convention is show below: + + void (*kernel_entry)(void *fdt_addr) + +When booting new VxWorks kernel (uImage format), the parameters passed to bootm is like below: + + bootm <kernel image address> - <device tree address> + +The do_bootvx command still works as it was for older VxWorks kernels.
Signature · 1 line
1.7.9.5
PATCH v3 5/5 README.vxworks: add a document describing the new VxWorks boot interface
Quoted 3 lines · miao.yan at windriver.com
From: Miao Yan <[email protected]>
Signed-off-by Miao Yan <[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/20131216/443abe18/attachment.pgp>
PATCH v3 1/5 common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.
In reply to myanQuoted 8 lines · miao.yan at windriver.com
From: Miao Yan <[email protected]>
do_bootm_vxworksnow is available under the configuration optionCONFIG_BOOTM_VXWORKS, thus aligned with other operating systems that supported by bootm command. The bootvx command still depneds onCONFIG_CMD_ELF.Signed-off-by Miao Yan <[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/20131216/95cbc7d2/attachment.pgp>
PATCH v2 2/5 common/config_defaults.h: make CONFIG_BOOTM_VXWORKS default configuration
In reply to Miao Yan---
Changes for v2: none
include/config_defaults.h | 1 + 1 file changed, 1 insertion(+)
include/config_defaults.h +1 -0
@@ -14,6 +14,7 @@#define CONFIG_BOOTM_NETBSD 1#define CONFIG_BOOTM_PLAN9 1#define CONFIG_BOOTM_RTEMS 1 +#define CONFIG_BOOTM_VXWORKS 1#define CONFIG_GZIP 1#define CONFIG_ZLIB 1
Signature · 1 line
1.7.9.5
PATCH v2 3/5 common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot interface.
In reply to Miao YanThe next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware description mechanism. For PowerPC, the boot interface conforms to the ePAPR standard, which is:
void (*kernel_entry)(ulong fdt_addr,
ulong r4 /* 0 */,
ulong r5 /* 0 */,
ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */,
ulong r8 /* 0 */, ulong r9 /* 0 */)For ARM, the boot interface is:
void (*kernel_entry)(void *fdt_addr)
---
Changes for v2:
1) remove legacy do_bootvx code from do_bootm_vxworks, thus making do_bootm_vxworks work only with new kernels, old kernels can still use 'bootvx'
2) minor fixes to make code more clear
arch/arm/lib/bootm.c | 23 ++++++++++++++ arch/powerpc/lib/bootm.c | 55 +++++++++++++++++++++++++++++++++ common/cmd_bootm.c | 77 ++++++++++++++++++++++++++++++++++++++-------- include/common.h | 4 +++ include/vxworks.h | 3 ++ 5 files changed, 150 insertions(+), 12 deletions(-)
arch/arm/lib/bootm.c +23 -0
@@ -308,3 +308,26 @@ int bootz_setup(ulong image, ulong *start, ulong *end) }#endif /* CONFIG_CMD_BOOTZ */ + +#if defined(CONFIG_BOOTM_VXWORKS ) +void boot_prep_vxworks (bootm_headers_t *images) +{ +#if defined(CONFIG_OF_LIBFDT ) +int off; + +if (images->ft_addr) { + off =fdt_path_offset (images->ft_addr,"/memory" ); +if (off <0 ) { +if (arch_fixup_memory_node (images->ft_addr)) +puts ("## WARNING: fixup memory failed!\n" ); + } + } +#endif +cleanup_before_linux (); +} +void boot_jump_vxworks (bootm_headers_t *images) +{ +/* ARM VxWorks requires device tree physical address to be passed */ + ((void (*)(void *))images->ep)(images->ft_addr); +} +#endif
arch/powerpc/lib/bootm.c +55 -0
58 lines not on this page · raw message
common/cmd_bootm.c +65 -12
116 lines not on this page · raw message
include/common.h +4 -0
@@ -690,6 +690,10 @@ ulong get_ddr_freq(ulong);#if defined(CONFIG_MPC85xx)typedef MPC85xx_SYS_INFO sys_info_t ;void get_sys_info (sys_info_t * ); +# if defined(CONFIG_OF_LIBFDT ) +void ft_fixup_cpu (void *,u64 ); +void ft_fixup_num_cores (void *); +# endif #endif #if defined(CONFIG_MPC86xx)typedef MPC86xx_SYS_INFO sys_info_t ;
include/vxworks.h +3 -0
@@ -9,6 +9,9 @@#define _VXWORKS_H_int do_bootvx (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]); +void boot_prep_vxworks (bootm_headers_t *images); +void boot_jump_vxworks (bootm_headers_t *images); +void do_bootvx_fdt (bootm_headers_t *images);/* * Use bootaddr to find the location in memory that VxWorks
Signature · 1 line
1.7.9.5
PATCH v2 4/5 common/fdt_support.c: avoid unintended return from fdt_fixup_memory_banks()
In reply to Miao Yanfdt_fixup_memory_banks() will add and update /memory node in device tree blob. In the case that /memory node doesn't exist, after adding a new one, this function returns error.
The correct behavior should be continuing to update its properties.
---
Changes for v2: none
common/fdt_support.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
common/fdt_support.c +3 -2
@@ -400,10 +400,11 @@ int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) nodeoffset =fdt_path_offset (blob,"/memory" );if (nodeoffset <0 ) { nodeoffset =fdt_add_subnode (blob,0 ,"memory" ); -if (nodeoffset <0 ) +if (nodeoffset <0 ) {printf ("WARNING: could not create /memory: %s.\n" ,fdt_strerror (nodeoffset)); -return nodeoffset; +return nodeoffset; + } } err =fdt_setprop (blob, nodeoffset,"device_type" ,"memory" ,sizeof ("memory" ));
Signature · 1 line
1.7.9.5
PATCH v2 5/5 doc/README.vxworks: add a document describing the new VxWorks boot interface
In reply to Miao Yan---
Changes for v2: none
doc/README.vxworks | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 doc/README.vxworks
doc/README.vxworks new file +34 -0
@@ -0,0 +1,34 @@ +From VxWorks 6.9+ (not include 6.9), VxWorks starts adopting device tree as its hardware +decription mechansim (for PowerPC and ARM), thus requiring boot interface changes. +This section will describe the new interface. + +For PowerPC, the calling convention of the new VxWorks entry point conforms to the ePAPR standard[1], +which is shown below (see ePAPR for more details): + + void (*kernel_entry)(ulong fdt_addr, + ulong r4 /* 0 */, ulong r5 /* 0 */, + ulong r6 /* EPAPR_MAGIC */ + ulong r7 /* boot IMA */, + ulong r8 /* 0 */, ulong r9 /* 0 */) + +For ARM, the calling convention is show below: + + void (*kernel_entry)(void *fdt_addr) + +When booting new VxWorks kernel (uImage format), the parameters passed to bootm is like below: + + bootm <kernel image address> - <device tree address> + +for example, booting p2020rdb kernel: (kernel is placed at address 0x1000000 and device tree blob +is places at address 0xf000000) + + setenv bootargs "gei(0,0)....." + tftp 0x1000000 vxWorks.uboot + tftp 0xf000000 p2020rdb.dtb + bootm 0x1000000 - 0xf000000 + +The second parameter to bootm is always '-' for VxWorks (VxWorks kernel doesn't make use of initrd) + +The bootvx command still works as it was for older kernels. + +[1] www.power.org
Signature · 1 line
1.7.9.5
v2 cover Add device tree support for VxWorks
In reply to Miao YanHi Wolfgang,
Quoted 7 lines
Changes for v2:
1) separating legacydo_bootvxcode fromdo_bootm_vxworks, thus makingdo_bootm_vxworksonly work with new kernels, old kernels can still use 'bootvx'
2) minor fixes to make code more clear
I've posted the v2 patches, how do you think of them ? Thanks.
Miao
v2 cover Add device tree support for VxWorks
Hi Tom,
I posted some patches to add device tree support for VxWorks
several days ago. Wolfgang provided me with some very useful feedback, and I sent v2 patches. The
discussion and patches are recorded here:
http://u-boot.10912.n7.nabble.com/PATCH-0-5-Add-device-tree-support-for-VxWorks-td163268.html
I see you are the master branch custodian, so do you think these
patches are OK to be integrated or more discussions are needed ? What else should I do to make
this upstream ? Thank you.
Miao
v2 cover Add device tree support for VxWorks
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 7 lines · myan
Hi Tom,
I posted some patches to add device tree support for VxWorks several days ago. Wolfgang provided me with some very useful feedback, and I sent v2 patches. The discussion and patches are recorded here:
Quoted 7 lines
http://u-boot.10912.n7.nabble.com/PATCH-0-5-Add-device-tree-support-for-VxWorks-td163268.html
I see you are the master branch custodian, so do you think these patches are OK to be integrated or more discussions are needed ? What else should I do to make this upstream ? Thank you.
I think things look OK, but as they were posted after the merge window closed, they won't go in to master until after the v2013.10 release, thanks!
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSQM58AAoJENk4IS6UOR1WG+QQALLtbiycW+RhfZ5Wi79ltpj9 A/Lv4hcGz9HkgS1ODE3L/lbUpmzmGEyDtBv/+O2qPDKJ8aB317mGbZklcFGG3oGC MOZA5TqTk+sP3gVCZ7+0hTy/iHJj37MD7O3Xcx6b34VYCNA0ccl2z0NdwwPBTh9w aoRH0NPVsYfUHX8/r3k+4q0/JxXCJhcyZk/RnYfF2w/7pwNELxUFn+uaN/+jMLHk 8YY9JaSztFPk3gAk2tcaY+WG+z8xzF/0b0YsRK9vAbXKUTR1Kd9bhzBrD17CopWZ BMiiTsG1l+xoQPt8HP1CsIAArsaF26sWaCsJOJiNp93TscwgsmO9A4aNCzYexH2D CuPejp/qRzHr00kZjuij9SgVWY9t7rbYFByCEoOPfmZDr8IOhqIkffgsZvCFkcmw JADjfEnqTkheJbL9U/e2hhAG48d8ugwGA3RBOtY5JxprviK3B45gmzr+PvXXETk3 Ur3VRYeG1r+eneAZ6IjlZedN53C3pKsjOyZpj98a19K+/JQUmSD3oZydYS6B3xQH uVg7o4j4AW2AyXrlUMAGV0CWc3Sg99P7VmI7PaEJomn+yJ382wMMgWckCOVZQAK8 i/AX17aH8AV8SuWMi71yXa0z0tvnpLO5n+mAN7GxaxnVLQIr1TFtVEyuE/WRMHka NYyFoEgA0DQ0TsgCTxx2
=Myl2
-----END PGP SIGNATURE-----
v2 cover Add device tree support for VxWorks
Hi Tom,
Quoted 5 lines · Tom Rini
I think things look OK, but as they were posted after the merge window closed, they won't go in to master until after the v2013.10 release, thanks!
Will this go into master in this merge window ?
And I noticed there are some changes to common do_bootm, which reqiures adjustment to vxworks subcommand handling code, do I need to rebase and resend the patches ? Thanks.
Miao
v2 cover Add device tree support for VxWorks
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 10 lines · myan
Hi Tom,
Quoted 5 lines · Tom Rini
I think things look OK, but as they were posted after the merge window closed, they won't go in to master until after the v2013.10 release, thanks!
Quoted 5 lines
Will this go into master in this merge window ?
And I noticed there are some changes to common
do_bootm, which reqiures adjustment to vxworks subcommand handling code, do I need to rebase and resend the patches ? Thanks.
Yes, it can come in, I just have been a bit busy and getting behind on collecting up patches. If you can re-base and re-test things I'd appreciate it, thanks!
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJScj+cAAoJENk4IS6UOR1WJsYP/2BH+iHMKYTSOVxxNnFjRCMb u1xGLxsdCbloXFE/S5o3pnMxnelXvR+U14QOat1NIYPjw8Qw3Mz0+p0msYXIS++R 0GI5gaa8TRcWmj7AD1TuBKv/xttMufBPkw65HZROlw+rdjIxat/Y40snz4qtprj5 TigAOxzgvYljmuyXeIc9AaH5+WOD2P2t69rst42lAeUDxaxMUDNmt3t445Xpyvut pPUiv6ys3H5l7Op2/poTE1kBsTArf6YQU4HuNUZL/jTY7TGb6Y0l7UGbAMSBXVGZ XsYcdFRgdtl7Cp6nhdnZKNXpUBhJz2nszTl70D1YA6fPq/xPjju01PrEndARc/fX aH1R1cV/zj3LGKhOZePlpfiEsjFweCDc0i4QMAzdNMJMTLokAfVvaa9Jwwij1Z+2 AFfMoO9YPs5gRovqge8S344eoD+DK6AO/3aQXiL9RbL0xEPCYP8jKM8Dp18o0EeO kRvRkCMxeeEUs6NCXP2PT1EpYIQmkHQcHqCJzyf5dYbOaoU0IFydFu3L8CbRMP92 JAvOdPVnG7KaLiJO1Wjkd6O8PH1QkfS1Wexq7ikq1OE4GkKGbkg878cLKF13wJ2x U9WjVkni9UrTmZx1pRZ2dtxMb+y+8LKnJQiSeqVZ0AHJF7rmIKFdJlrdn59c4wpd 0C6/Q7n3oTrk3KxcYKOJ
=i0Iw
-----END PGP SIGNATURE-----
v2 cover Add device tree support for VxWorks
Hi Tom,
Quoted 8 lines · Tom Rini
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 4 lines · myan
Quoted 1 line
Will this go into master in this merge window ?
Quoted 8 lines
Quoted 3 lines
And I noticed there are some changes to common
do_bootm, which reqiures adjustment to vxworks subcommand handling code, do I need to rebase and resend the patches ? Thanks.Yes, it can come in, I just have been a bit busy and getting behind on collecting up patches. If you can re-base and re-test things I'd appreciate it, thanks!
I re-tested against master but found a problem. In commit "5c427e4: use BOOTM_STATE_OS_CMDLINE flag for plain bootm" and "3d187b3:
Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS", BOOTM_STATE_OS_CMLINE was added to do_bootm for PowerPC and MIPS. This breaks other OSes (vxworks, netbsd, plan9,...) that don't support subcommand processing, e.g. they all contain the following code in their do_bootm_xxx():
if (flag & BOOTM_STATE_OS_PREP)
return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1;
which will result a "subcommand not supported" error. IMO, the above
code should be converted to something like this:
/* if not go command, pretend everything to be OK */ if (flag != BOOTM_STATE_OS_GO)
return 0;
And if you are OK with it, I could send patches to clean them up. Thanks.
Miao
v2 cover Add device tree support for VxWorks
Quoted 33 lines · myan
Hi Tom,
Quoted 8 lines · Tom Rini
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 4 lines · myan
Quoted 1 line
Will this go into master in this merge window ?
Quoted 8 lines
Quoted 3 lines
And I noticed there are some changes to common
do_bootm, which reqiures adjustment to vxworks subcommand handling code, do I need to rebase and resend the patches ? Thanks.Yes, it can come in, I just have been a bit busy and getting behind on collecting up patches. If you can re-base and re-test things I'd appreciate it, thanks!
I re-tested against master but found a problem. In commit "5c427e4: use
BOOTM_STATE_OS_CMDLINEflag for plain bootm" and "3d187b3: Only passBOOTM_STATE_OS_CMDLINEon PowerPC/MIPS",BOOTM_STATE_OS_CMLINEwas added todo_bootmfor PowerPC and MIPS. This breaks other OSes (vxworks, netbsd, plan9,...) that don't support subcommand processing, e.g. they all contain the following code in theirdo_bootm_xxx():if (flag &
BOOTM_STATE_OS_PREP)return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1;
Quoted 8 lines
which will result a "subcommand not supported" error. IMO, the
above code should be converted to something like this:/* if not go command, pretend everything to be OK */ if (flag !=
BOOTM_STATE_OS_GO)return 0;And if you are OK with it, I could send patches to clean them up. Thanks.
OK, reading over all of the other OS bootm functions, yeah, I think you're on the right path here. 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/20131101/a7db62a8/attachment.pgp>