bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
PATCH 1/1 bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
From: Lihua Zhao <[email protected]>
Enhance do_bootm_vxworks() to support Linux compatible standard DTB for ARM and PPC, when the least significant bit of flags in VxWorks bootargs is set. Otherwise it falls back to the existing bootm flow which is now legacy.
---
common/bootm_os.c | 39 +++++++++++++++++++++++++++++++++++++-- doc/README.vxworks | 13 +++++++++++++ include/vxworks.h | 3 +++ 3 files changed, 53 insertions(+), 2 deletions(-)
common/bootm_os.c +37 -2
@@ -318,8 +318,8 @@ static void do_bootvx_fdt(bootm_headers_t *images)puts ("## vxWorks terminated\n" ); } -int do_bootm_vxworks (int flag,int argc,char *const argv[], -bootm_headers_t *images) +static int do_bootm_vxworks_legacy (int flag,int argc,char *const argv[], +bootm_headers_t *images) {if (flag !=BOOTM_STATE_OS_GO )return 0 ;
@@ -335,6 +335,41 @@ int do_bootm_vxworks(int flag, int argc, char * const argv[],return 1 ; } + +int do_bootm_vxworks (int flag,int argc,char *const argv[], +bootm_headers_t *images) +{ +char *bootargs; +int pos; +unsigned long vxflags; +bool std_dtb = false; + +/* get bootargs env */ + bootargs =env_get ("bootargs" ); + +if (bootargs !=NULL ) { +for (pos =0 ; pos <strlen (bootargs); pos++) { +/* find f=0xnumber flag */ +if ((bootargs[pos] =='=' ) && (pos >=1 ) && + (bootargs[pos -1 ] =='f' )) { + vxflags =simple_strtoul (&bootargs[pos +1 ], +NULL ,16 ); +if (vxflags &VXWORKS_SYSFLG_STD_DTB ) + std_dtb = true; + } + } + } + +if (std_dtb) { +if (flag &BOOTM_STATE_OS_PREP ) +printf (" Using standard DTB\n" ); +return do_bootm_linux (flag, argc, argv, images); + }else { +if (flag &BOOTM_STATE_OS_PREP ) +printf (" !!! WARNING !!! Using legacy DTB\n" ); +return do_bootm_vxworks_legacy (flag, argc, argv, images); + } +}#endif #if defined(CONFIG_CMD_ELF )
doc/README.vxworks +13 -0
@@ -2,6 +2,7 @@ # # Copyright (C) 2013, Miao Yan <[email protected]> # Copyright (C) 2015-2018, Bin Meng <[email protected]> +# Copyright (C) 2019, Lihua Zhao <[email protected]> VxWorks Support ===============
@@ -24,6 +25,15 @@ From VxWorks 7, VxWorks starts adopting device tree as its hardware description mechanism (for PowerPC and ARM), thus requiring boot interface changes. This section will describe the new interface. +Since VxWorks 7 SR0640 release, VxWorks starts using Linux compatible standard +DTB for some boards. With that, the exact same bootm flow as used by Linux is +used, which includes board-specific DTB fix up. To keep backward compatibility, +only when the least significant bit of flags in bootargs is set, the standard +DTB will be used. Otherwise it falls back to the legacy bootm flow. + +For legacy bootm flow, make sure the least significant bit of flags in bootargs +is cleared. The calling convention is described below: + 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):
@@ -33,6 +43,9 @@ For ARM, the calling convention is shown below: void (*kernel_entry)(void *fdt_addr) +When using the Linux compatible standard DTB, the calling convention of VxWorks +entry point is exactly the same as the Linux kernel. + When booting a VxWorks 7 kernel (uImage format), the parameters passed to bootm is like below:
include/vxworks.h +3 -0
@@ -9,6 +9,9 @@#include <efi_api.h> +/* Use Linux compatible standard DTB */ +#define VXWORKS_SYSFLG_STD_DTB 0x1 +/* * Physical address of memory base for VxWorks x86 * This is LOCAL_MEM_LOCAL_ADRS in the VxWorks kernel configuration.
Signature · 1 line
2.7.4
PATCH 1/1 bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
Hi Tom,
Quoted 11 lines · Bin Meng
From: Lihua Zhao <[email protected]>
Enhance
do_bootm_vxworks()to support Linux compatible standard DTB for ARM and PPC, when the least significant bit of flags in VxWorks bootargs is set. Otherwise it falls back to the existing bootm flow which is now legacy.Signed-off-by Lihua Zhao <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Bin Meng <[email protected]>
Quoted 7 lines
---
common/bootm_os.c | 39 +++++++++++++++++++++++++++++++++++++-- doc/README.vxworks | 13 +++++++++++++ include/vxworks.h | 3 +++ 3 files changed, 53 insertions(+), 2 deletions(-)
It would be good if you pick this up for v2020.01. Thanks!
Regards,
Bin
PATCH 1/1 bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
Quoted 16 lines · Bin Meng
Hi Tom,
Quoted 13 lines · Bin Meng
From: Lihua Zhao <[email protected]>
Enhance
do_bootm_vxworks()to support Linux compatible standard DTB for ARM and PPC, when the least significant bit of flags in VxWorks bootargs is set. Otherwise it falls back to the existing bootm flow which is now legacy.Signed-off-by Lihua Zhao <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Bin Meng <[email protected]>---
Quoted 6 lines
Quoted 4 lines
common/bootm_os.c | 39 +++++++++++++++++++++++++++++++++++++-- doc/README.vxworks | 13 +++++++++++++ include/vxworks.h | 3 +++ 3 files changed, 53 insertions(+), 2 deletions(-)It would be good if you pick this up for v2020.01. Thanks!
OK, thanks. I'll put this on my TODO list for soon.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191120/842a260d/attachment.sig>
PATCH 1/1 bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
Hi Tom,
Quoted 18 lines · Tom Rini
Quoted 16 lines · Bin Meng
Hi Tom,
Quoted 13 lines · Bin Meng
From: Lihua Zhao <[email protected]>
Enhance
do_bootm_vxworks()to support Linux compatible standard DTB for ARM and PPC, when the least significant bit of flags in VxWorks bootargs is set. Otherwise it falls back to the existing bootm flow which is now legacy.Signed-off-by Lihua Zhao <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Bin Meng <[email protected]>---
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
common/bootm_os.c | 39 +++++++++++++++++++++++++++++++++++++-- doc/README.vxworks | 13 +++++++++++++ include/vxworks.h | 3 +++ 3 files changed, 53 insertions(+), 2 deletions(-)It would be good if you pick this up for v2020.01. Thanks!
OK, thanks. I'll put this on my TODO list for soon.
A gentle ping?
Regards,
Bin
PATCH 1/1 bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
Quoted 26 lines · Bin Meng
Hi Tom,
Quoted 23 lines · Tom Rini
Quoted 21 lines · Bin Meng
Hi Tom,
Quoted 17 lines · Bin Meng
From: Lihua Zhao <[email protected]>
Enhance
do_bootm_vxworks()to support Linux compatible standard DTB for ARM and PPC, when the least significant bit of flags in VxWorks bootargs is set. Otherwise it falls back to the existing bootm flow which is now legacy.Signed-off-by Lihua Zhao <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Bin Meng <[email protected]>---
common/bootm_os.c | 39 +++++++++++++++++++++++++++++++++++++-- doc/README.vxworks | 13 +++++++++++++ include/vxworks.h | 3 +++ 3 files changed, 53 insertions(+), 2 deletions(-)
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
It would be good if you pick this up for v2020.01. Thanks!
OK, thanks. I'll put this on my TODO list for soon.
A gentle ping?
So the issue now is that this causes size growth and then link failure on tbs2910. And I don't think "boot modern VxWorks kernels" is a new CONFIG option I want to see. So I'm not quite sure what to do here yet. Soeren, do you care about VxWorks support on this platform? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191127/c09c62ea/attachment.sig>
PATCH 1/1 bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
Quoted 24 lines · Tom Rini
Quoted 23 lines · Bin Meng
Hi Tom,
Quoted 20 lines · Tom Rini
Quoted 19 lines · Bin Meng
Hi Tom,
Quoted 16 lines · Bin Meng
From: Lihua Zhao <[email protected]>
Enhance
do_bootm_vxworks()to support Linux compatible standard DTB for ARM and PPC, when the least significant bit of flags in VxWorks bootargs is set. Otherwise it falls back to the existing bootm flow which is now legacy.Signed-off-by Lihua Zhao <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Bin Meng <[email protected]>---
common/bootm_os.c | 39 +++++++++++++++++++++++++++++++++++++-- doc/README.vxworks | 13 +++++++++++++ include/vxworks.h | 3 +++ 3 files changed, 53 insertions(+), 2 deletions(-)
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
It would be good if you pick this up for v2020.01. Thanks!
OK, thanks. I'll put this on my TODO list for soon.
A gentle ping?
So the issue now is that this causes size growth and then link failure on tbs2910. And I don't think "boot modern VxWorks kernels" is a new CONFIG option I want to see. So I'm not quite sure what to do here yet. Soeren, do you care about VxWorks support on this platform? Thanks!
I'm not aware of any user of VxWorks on tbs2910. So would be OK for me to disable CONFIG_BOOTM_VXWORKS in tbs2910_defconfig.
Do you want me to send a patch for this? Has this to go through the imx tree? I'm also happy to send an Acked-by instead, if this makes things easier.
Regards,
Soeren
PATCH 1/1 bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
Quoted 33 lines · Soeren Moch
Quoted 24 lines · Tom Rini
Quoted 23 lines · Bin Meng
Hi Tom,
Quoted 20 lines · Tom Rini
Quoted 19 lines · Bin Meng
Hi Tom,
Quoted 16 lines · Bin Meng
From: Lihua Zhao <[email protected]>
Enhance
do_bootm_vxworks()to support Linux compatible standard DTB for ARM and PPC, when the least significant bit of flags in VxWorks bootargs is set. Otherwise it falls back to the existing bootm flow which is now legacy.Signed-off-by Lihua Zhao <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Bin Meng <[email protected]>---
common/bootm_os.c | 39 +++++++++++++++++++++++++++++++++++++-- doc/README.vxworks | 13 +++++++++++++ include/vxworks.h | 3 +++ 3 files changed, 53 insertions(+), 2 deletions(-)Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
It would be good if you pick this up for v2020.01. Thanks!
OK, thanks. I'll put this on my TODO list for soon.
A gentle ping?
So the issue now is that this causes size growth and then link failure on tbs2910. And I don't think "boot modern VxWorks kernels" is a new CONFIG option I want to see. So I'm not quite sure what to do here yet. Soeren, do you care about VxWorks support on this platform? Thanks!
Quoted 6 lines
I'm not aware of any user of VxWorks on tbs2910. So would be OK for me to disable
CONFIG_BOOTM_VXWORKSintbs2910_defconfig.Do you want me to send a patch for this? Has this to go through the imx tree? I'm also happy to send an Acked-by instead, if this makes things easier.
Thanks. I'll post a patch shortly and you can ack it.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191127/7de7a266/attachment.sig>
PATCH 1/1 bootm: vxworks: Support Linux compatible standard DTB for ARM and PPC
In reply to Bin MengQuoted 10 lines · Bin Meng
From: Lihua Zhao <[email protected]>
Enhance
do_bootm_vxworks()to support Linux compatible standard DTB for ARM and PPC, when the least significant bit of flags in VxWorks bootargs is set. Otherwise it falls back to the existing bootm flow which is now legacy.Signed-off-by Lihua Zhao <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Bin Meng <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191203/3e247c8d/attachment.sig>