From c5bee8411533dbc5866c3cbe0c7cfd66d249dc15 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Mon, 4 Nov 2024 15:19:24 -0600 Subject: [PATCH] xen-boot-cmd: Add xen variable as addendum For xen boot the u-boot script environment variables needs to be complied as part of u-boot-xlnx-scr recipe. In order to duplicate the variables definition for xen and non-xen boot make xen variables as addendum to u-boot-xlnx-scr recipe. Upstream-Status: Submitted [https://lists.yoctoproject.org/g/meta-virtualization/message/8233] Signed-off-by: Sandeep Gundlupet Raju Signed-off-by: Mark Hatle Transfer from 2024.2 fork of meta-virtualization, as this won't be in meta-virtualization scarthgap. Signed-off-by: Mark Hatle --- .../recipes-bsp/u-boot/mxv-xen-boot-cmd.inc | 11 +++++++++++ .../recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend | 5 +++++ 2 files changed, 16 insertions(+) create mode 100644 meta-xilinx-virtualization/recipes-bsp/u-boot/mxv-xen-boot-cmd.inc create mode 100644 meta-xilinx-virtualization/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend diff --git a/meta-xilinx-virtualization/recipes-bsp/u-boot/mxv-xen-boot-cmd.inc b/meta-xilinx-virtualization/recipes-bsp/u-boot/mxv-xen-boot-cmd.inc new file mode 100644 index 000000000..81f9c5f25 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-bsp/u-boot/mxv-xen-boot-cmd.inc @@ -0,0 +1,11 @@ +# 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}:' \ +" diff --git a/meta-xilinx-virtualization/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend b/meta-xilinx-virtualization/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend new file mode 100644 index 000000000..c8a21b3b3 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend @@ -0,0 +1,5 @@ +# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from configuration +# file and xen enabled in DISTRO_FEATURES. +ENABLE_XEN_UBOOT_SCR ?= "" +include ${@'mxv-xen-boot-cmd.inc' if d.getVar('ENABLE_XEN_UBOOT_SCR') == '1' and bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''} +