* [meta-virtualization][master][PATCH 0/2] Enable xen boot script using variable @ 2023-08-25 18:18 Sandeep Gundlupet Raju 2023-08-25 18:18 ` [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum Sandeep Gundlupet Raju 2023-08-25 18:18 ` [meta-virtualization][master][PATCH 2/2] u-boot-xlnx-scr: Enable xen boot script using variable Sandeep Gundlupet Raju 0 siblings, 2 replies; 6+ messages in thread From: Sandeep Gundlupet Raju @ 2023-08-25 18:18 UTC (permalink / raw) To: meta-virtualization, bruce.ashfield, christopher.w.clark; +Cc: mark.hatle Since u-boot-xlnx-scr is shared between xen and non-xen builds, Kernel and Devicetree image offset address from dynamic layer will be used during variable pre expansion which causes boot issues on HW. Hence enable xen boot script using variable. Testing: Add below variables to local.conf file to enable xen builds. BOOTMODE = "xen" ENABLE_XEN_UBOOT_SCR = "1" ENABLE_XEN_DTSI = "1" ENABLE_XEN_QEMU_DTSI = "1" Sandeep Gundlupet Raju (2): xen-boot-cmd: Add xen variable as addendum u-boot-xlnx-scr: Enable xen boot script using variable .../recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend | 6 ++++-- .../xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) -- 2.34.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum 2023-08-25 18:18 [meta-virtualization][master][PATCH 0/2] Enable xen boot script using variable Sandeep Gundlupet Raju @ 2023-08-25 18:18 ` Sandeep Gundlupet Raju 2023-08-27 13:23 ` Bruce Ashfield 2023-08-25 18:18 ` [meta-virtualization][master][PATCH 2/2] u-boot-xlnx-scr: Enable xen boot script using variable Sandeep Gundlupet Raju 1 sibling, 1 reply; 6+ messages in thread From: Sandeep Gundlupet Raju @ 2023-08-25 18:18 UTC (permalink / raw) To: meta-virtualization, bruce.ashfield, christopher.w.clark; +Cc: mark.hatle Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> --- .../xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc index b2b76120..6d113c9a 100644 --- a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc +++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc @@ -36,3 +36,15 @@ XEN_CMDLINE_APPEND ?= "" # Specify the max number of vcpus for dom0 # Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4" DOM0_MAX_VCPUS ?= "1" + +# Add xen variables as addendum. +# Variable SCRIPT_SED_ADDENDUM id defined in meta-xilinx and set to null by +# default and enable only for xen builds. +SCRIPT_SED_ADDENDUM += "-e 's/@@XEN_IMAGE_NAME@@/${XEN_IMAGE_NAME}/' \ + -e 's/@@XEN_OFFSET@@/${XEN_OFFSET}/' \ + -e 's/@@XEN_LOAD_ADDRESS@@/${XEN_LOAD_ADDRESS}/' \ + -e 's/@@DOM0_MEM@@/${DOM0_MEM}/' \ + -e 's/@@DOM0_MAX_VCPUS@@/${DOM0_MAX_VCPUS}/' \ + -e 's:@@XEN_SERIAL_CONSOLES@@:${XEN_SERIAL_CONSOLES}:' \ + -e 's:@@XEN_CMDLINE_APPEND@@:${XEN_CMDLINE_APPEND}:' \ +" \ No newline at end of file -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum 2023-08-25 18:18 ` [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum Sandeep Gundlupet Raju @ 2023-08-27 13:23 ` Bruce Ashfield 2023-09-06 21:31 ` Gundlupet Raju, Sandeep 0 siblings, 1 reply; 6+ messages in thread From: Bruce Ashfield @ 2023-08-27 13:23 UTC (permalink / raw) To: Sandeep Gundlupet Raju Cc: meta-virtualization, christopher.w.clark, mark.hatle In message: [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum on 25/08/2023 Sandeep Gundlupet Raju wrote: > Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> > --- > .../xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc > index b2b76120..6d113c9a 100644 > --- a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc > +++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc > @@ -36,3 +36,15 @@ XEN_CMDLINE_APPEND ?= "" > # Specify the max number of vcpus for dom0 > # Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4" > DOM0_MAX_VCPUS ?= "1" > + > +# Add xen variables as addendum. > +# Variable SCRIPT_SED_ADDENDUM id defined in meta-xilinx and set to null by > +# default and enable only for xen builds. s/id/is/ This really entangles the meta-virt dynamic layer with the xilinx layers. You need to have an understanding of one, to really understand the other. If we are setting or appending to a variable, it really should be defined in meta-virtualization. Is there a way to move the functions that are using this variable into the main Xen meta-virt recipes, in such a way that this is a generic way to customize the boot ? Bruce > +SCRIPT_SED_ADDENDUM += "-e 's/@@XEN_IMAGE_NAME@@/${XEN_IMAGE_NAME}/' \ > + -e 's/@@XEN_OFFSET@@/${XEN_OFFSET}/' \ > + -e 's/@@XEN_LOAD_ADDRESS@@/${XEN_LOAD_ADDRESS}/' \ > + -e 's/@@DOM0_MEM@@/${DOM0_MEM}/' \ > + -e 's/@@DOM0_MAX_VCPUS@@/${DOM0_MAX_VCPUS}/' \ > + -e 's:@@XEN_SERIAL_CONSOLES@@:${XEN_SERIAL_CONSOLES}:' \ > + -e 's:@@XEN_CMDLINE_APPEND@@:${XEN_CMDLINE_APPEND}:' \ > +" > \ No newline at end of file > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum 2023-08-27 13:23 ` Bruce Ashfield @ 2023-09-06 21:31 ` Gundlupet Raju, Sandeep 2023-09-08 6:24 ` Christopher Clark 0 siblings, 1 reply; 6+ messages in thread From: Gundlupet Raju, Sandeep @ 2023-09-06 21:31 UTC (permalink / raw) To: Bruce Ashfield; +Cc: meta-virtualization, christopher.w.clark, mark.hatle Hi Bruce, Sorry I totally missed replying to this email. On 8/27/2023 7:23 AM, Bruce Ashfield wrote: > In message: [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum > on 25/08/2023 Sandeep Gundlupet Raju wrote: > >> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> >> --- >> .../xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc >> index b2b76120..6d113c9a 100644 >> --- a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc >> +++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc >> @@ -36,3 +36,15 @@ XEN_CMDLINE_APPEND ?= "" >> # Specify the max number of vcpus for dom0 >> # Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4" >> DOM0_MAX_VCPUS ?= "1" >> + >> +# Add xen variables as addendum. >> +# Variable SCRIPT_SED_ADDENDUM id defined in meta-xilinx and set to null by >> +# default and enable only for xen builds. > s/id/is/ > > This really entangles the meta-virt dynamic layer with the xilinx > layers. You need to have an understanding of one, to really understand > the other. [Sandeep]: I understand the problem is there is no standard way of doing this. > If we are setting or appending to a variable, it really should be > defined in meta-virtualization. > > Is there a way to move the functions that are using this variable > into the main Xen meta-virt recipes, in such a way that this is > a generic way to customize the boot ? [Sandeep]: We can move the xen specific variables(such as DOM0_MEM, XEN_CMDLINE_APPEND, DOM0_MAX_VCPUS etc...) to main xen meta-virt inclusion files. Then using SCRIPT_SED_ADDEDUM approach in dynamic layer we can append to existing soc vendor boot script recipe do_compile task or a separate xen boot script recipe similar to RPI. I will prepare a RFC patch and send it for review. I'm open if you have any better idea or way of handling this. We can also explore on image builder tool https://gitlab.com/ViryaOS/imagebuilder/-/tree/master, We can create a imagebuilder.bbclass and user can input the cfg and generate the right u-boot scripts. It's VERY unclear to me that this is useful for anyone? we need to better understand this component, how it's configured and it's general purpose usage. > Bruce > >> +SCRIPT_SED_ADDENDUM += "-e 's/@@XEN_IMAGE_NAME@@/${XEN_IMAGE_NAME}/' \ >> + -e 's/@@XEN_OFFSET@@/${XEN_OFFSET}/' \ >> + -e 's/@@XEN_LOAD_ADDRESS@@/${XEN_LOAD_ADDRESS}/' \ >> + -e 's/@@DOM0_MEM@@/${DOM0_MEM}/' \ >> + -e 's/@@DOM0_MAX_VCPUS@@/${DOM0_MAX_VCPUS}/' \ >> + -e 's:@@XEN_SERIAL_CONSOLES@@:${XEN_SERIAL_CONSOLES}:' \ >> + -e 's:@@XEN_CMDLINE_APPEND@@:${XEN_CMDLINE_APPEND}:' \ >> +" >> \ No newline at end of file >> -- >> 2.34.1 >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum 2023-09-06 21:31 ` Gundlupet Raju, Sandeep @ 2023-09-08 6:24 ` Christopher Clark 0 siblings, 0 replies; 6+ messages in thread From: Christopher Clark @ 2023-09-08 6:24 UTC (permalink / raw) To: Gundlupet Raju, Sandeep; +Cc: Bruce Ashfield, meta-virtualization, mark.hatle [-- Attachment #1: Type: text/plain, Size: 4939 bytes --] On Wed, Sep 6, 2023 at 2:31 PM Gundlupet Raju, Sandeep < sandeep.gundlupet-raju@amd.com> wrote: > Hi Bruce, > > Sorry I totally missed replying to this email. > > On 8/27/2023 7:23 AM, Bruce Ashfield wrote: > > In message: [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add > xen variable as addendum > > on 25/08/2023 Sandeep Gundlupet Raju wrote: > > > >> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> > >> --- > >> .../xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc | 12 ++++++++++++ > >> 1 file changed, 12 insertions(+) > >> > >> diff --git a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc > b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc > >> index b2b76120..6d113c9a 100644 > >> --- a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc > >> +++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc > >> @@ -36,3 +36,15 @@ XEN_CMDLINE_APPEND ?= "" > >> # Specify the max number of vcpus for dom0 > >> # Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4" > >> DOM0_MAX_VCPUS ?= "1" > >> + > >> +# Add xen variables as addendum. > >> +# Variable SCRIPT_SED_ADDENDUM id defined in meta-xilinx and set to > null by > >> +# default and enable only for xen builds. > > s/id/is/ > > > > This really entangles the meta-virt dynamic layer with the xilinx > > layers. You need to have an understanding of one, to really understand > > the other. > [Sandeep]: I understand the problem is there is no standard way of doing > this. > > If we are setting or appending to a variable, it really should be > > defined in meta-virtualization. > > > > Is there a way to move the functions that are using this variable > > into the main Xen meta-virt recipes, in such a way that this is > > a generic way to customize the boot ? > > [Sandeep]: We can move the xen specific variables(such as DOM0_MEM, > XEN_CMDLINE_APPEND, DOM0_MAX_VCPUS etc...) to main xen meta-virt > inclusion files. Then using SCRIPT_SED_ADDEDUM approach in dynamic layer > we can append to existing soc vendor boot script recipe do_compile task > or a separate xen boot script recipe similar to RPI. I will prepare a > RFC patch and send it for review. > > I'm open if you have any better idea or way of handling this. > Hi all, sorry for my slow response on this thread. I am interested in seeing if we can better incorporate board support for Xen into the main recipes and u-boot configuration, and wondering if it could be beneficial to see if we could have a single u-boot script for Xen to go into meta-virtualization/recipes-bsp/u-boot. As a starting point, it could be built from combining the two scripts are currently in meta-virt's dynamic layers: dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.xen dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/ boot.cmd.xen.in with refactoring to preserve the existing behaviour for each board. Both those files are already parameter driven -- ie. they do variable substitution on the input template to generate the deployed final script. If we do this, it should be a reasonable starting point for booting Xen on other Arm boards just by configuring variables in the BSP layer and we might be able to simplify meta-virtualization's dynamic layers a bit. Before getting to that though, one thing that wasn't clear to me is why the Xilinx dynamic layer Xen u-boot script is currently packaged via a bbappend, rather than a standalone recipe bb, as the raspberry pi one is. If you change to follow that raspberry pi example then you can switch your boot-Xen-or-not behaviour by setting the PREFERRED_PROVIDER_u-boot-default-script variable (to use either your meta-xilinx non-Xen u-boot script recipe, or your meta-virtualization Xen-enabled one) and avoid the need for the second patch that adds the new control variable in this series. Could that be a viable approach? Christopher > > We can also explore on image builder tool > https://gitlab.com/ViryaOS/imagebuilder/-/tree/master, We can create a > imagebuilder.bbclass and user can input the cfg and generate the right > u-boot scripts. It's VERY unclear to me that this is useful for anyone? > we need to better understand this component, how it's configured and > it's general purpose usage. > > > Bruce > > > >> +SCRIPT_SED_ADDENDUM += "-e 's/@@XEN_IMAGE_NAME@@/${XEN_IMAGE_NAME}/' \ > >> + -e 's/@@XEN_OFFSET@@/${XEN_OFFSET}/' \ > >> + -e 's/@@XEN_LOAD_ADDRESS@@/${XEN_LOAD_ADDRESS}/' \ > >> + -e 's/@@DOM0_MEM@@/${DOM0_MEM}/' \ > >> + -e 's/@@DOM0_MAX_VCPUS@@/${DOM0_MAX_VCPUS}/' \ > >> + -e 's:@@XEN_SERIAL_CONSOLES@@:${XEN_SERIAL_CONSOLES}:' \ > >> + -e 's:@@XEN_CMDLINE_APPEND@@:${XEN_CMDLINE_APPEND}:' \ > >> +" > >> \ No newline at end of file > >> -- > >> 2.34.1 > >> > [-- Attachment #2: Type: text/html, Size: 6308 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [meta-virtualization][master][PATCH 2/2] u-boot-xlnx-scr: Enable xen boot script using variable 2023-08-25 18:18 [meta-virtualization][master][PATCH 0/2] Enable xen boot script using variable Sandeep Gundlupet Raju 2023-08-25 18:18 ` [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum Sandeep Gundlupet Raju @ 2023-08-25 18:18 ` Sandeep Gundlupet Raju 1 sibling, 0 replies; 6+ messages in thread From: Sandeep Gundlupet Raju @ 2023-08-25 18:18 UTC (permalink / raw) To: meta-virtualization, bruce.ashfield, christopher.w.clark; +Cc: mark.hatle By default xen DISTRO_FEATURES are enabled for ZynqMP and Versal for non xen builds KERNEL and DEVICETREE boot script offset was override from meta-virtualization. Hence enable xen boot script using variable ENABLE_XEN_UBOOT_SCR from configuration file only for xen builds. Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> --- .../xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend b/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend index ae847cbc..07685117 100644 --- a/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend +++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend @@ -1,2 +1,4 @@ -# Include xen-boot-cmd.inc only if xen distro features is enabled. -include ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen-boot-cmd.inc', '', d)} +# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from configuration +# file. +ENABLE_XEN_UBOOT_SCR ?= "" +include ${@'xen-boot-cmd.inc' if d.getVar('ENABLE_XEN_UBOOT_SCR') == '1' else ''} -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-09-08 6:24 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-08-25 18:18 [meta-virtualization][master][PATCH 0/2] Enable xen boot script using variable Sandeep Gundlupet Raju 2023-08-25 18:18 ` [meta-virtualization][master][PATCH 1/2] xen-boot-cmd: Add xen variable as addendum Sandeep Gundlupet Raju 2023-08-27 13:23 ` Bruce Ashfield 2023-09-06 21:31 ` Gundlupet Raju, Sandeep 2023-09-08 6:24 ` Christopher Clark 2023-08-25 18:18 ` [meta-virtualization][master][PATCH 2/2] u-boot-xlnx-scr: Enable xen boot script using variable Sandeep Gundlupet Raju
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.