All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables
@ 2024-11-19  5:11 Sandeep Gundlupet Raju
  2024-11-19  5:11 ` [meta-virtualization][master][PATCH 1/6] xen-u-boot-scr: " Sandeep Gundlupet Raju
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Sandeep Gundlupet Raju @ 2024-11-19  5:11 UTC (permalink / raw)
  To: meta-virtualization, bruce.ashfield; +Cc: mark.hatle

1. Add xen-u-boot-scr.bbclass for generic xen boot script variables
   use by any soc devices.
2. Inherit xen-u-boot-scr.bbclass in xen-rpi-u-boot-scr.
3. Move xen variables to xen-boot-env.inc file in xilinx
   dynamic layers.
4. Include xen-boot-env if BOOTMODE = "xen" switch is enabled.
5. Add load address to boot.cmd.xen script echo messages.
6. Inherit xen-u-boot-scr bbclass in xen-boot-env.inc.
7. If user brings in their own boot.cmd.xxx file they can just
   inherit xen-u-boot-scr bbclass and use the generic xen boot
   script variables.

Sandeep Gundlupet Raju (6):
  xen-u-boot-scr: Add bbclass for xen boot script variables
  xen-rpi-u-boot-scr: Inherit xen-u-boot-scr bbclass
  xen-boot-env: Move xen variables to inc file
  u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
  boot.cmd.xen: Add load address to echo messages
  xen-boot-env.inc: Inherit xen-u-boot-scr bbclass

 classes-recipe/xen-u-boot-scr.bbclass         | 43 +++++++++++++++++++
 .../xen-rpi-u-boot-scr/files/boot.cmd.xen.in  | 10 ++---
 .../xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb  | 13 +++---
 .../u-boot/u-boot-xlnx-scr.bbappend           |  7 ++-
 .../u-boot/u-boot-xlnx-scr/boot.cmd.xen       |  8 ++--
 .../recipes-bsp/u-boot/xen-boot-cmd.inc       | 35 ---------------
 .../recipes-bsp/u-boot/xen-boot-env.inc       | 31 +++++++++++++
 7 files changed, 97 insertions(+), 50 deletions(-)
 create mode 100644 classes-recipe/xen-u-boot-scr.bbclass
 create mode 100644 dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc

-- 
2.34.1



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [meta-virtualization][master][PATCH 1/6]  xen-u-boot-scr: Add bbclass for xen boot script variables
  2024-11-19  5:11 [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Sandeep Gundlupet Raju
@ 2024-11-19  5:11 ` Sandeep Gundlupet Raju
  2024-11-21  4:40   ` Bruce Ashfield
  2024-11-19  5:11 ` [meta-virtualization][master][PATCH 2/6] xen-rpi-u-boot-scr: Inherit xen-u-boot-scr bbclass Sandeep Gundlupet Raju
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Sandeep Gundlupet Raju @ 2024-11-19  5:11 UTC (permalink / raw)
  To: meta-virtualization, bruce.ashfield; +Cc: mark.hatle

Add a new bbclass for xen boot script variables. This bbclass provides
common xen u-boot boot script variables which can be inherited by any
vendor specific u-boot boot script recipes. Also these variable are
configurable from recipes, global and machine configuration files.

Variable nomenclature is aligned with xen documentation.
https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html

Currently it supports Xen Dom0 boot and can be extended for DomU
or Dom0less boot.

Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
---
 classes-recipe/xen-u-boot-scr.bbclass | 43 +++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 classes-recipe/xen-u-boot-scr.bbclass

diff --git a/classes-recipe/xen-u-boot-scr.bbclass b/classes-recipe/xen-u-boot-scr.bbclass
new file mode 100644
index 00000000..df8287e1
--- /dev/null
+++ b/classes-recipe/xen-u-boot-scr.bbclass
@@ -0,0 +1,43 @@
+# Copyright (C) 2024, Advanced Micro Devices, Inc.  All rights reserved.
+#
+# SPDX-License-Identifier: MIT
+#
+# This bbclass defines u-boot script variables required for xen boot which can be
+# inherited u-boot boot scripts recipes and also allows to configure these variables
+# from recipes, global and machine configurations files.
+
+# Variable nomenclature is aligned with
+# https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
+
+# Image Load Address for Xen Dom0 boot
+KERNEL_LOAD_ADDRESS ??= "0x00400000"
+XEN_LOAD_ADDRESS ??= "0x00200000"
+DEVICETREE_LOAD_ADDRESS ??= "0xC000000"
+RAMDISK_LOAD_ADDRESS ??= "0x2600000"
+
+# Xen boot image types.
+# KERNEL_IMAGETYPE: Specifies DomU kernel image file to be loaded by u-boot.
+# XEN_IMAGETYPE: Specifies xen hypervisor binary to be loaded by u-boot.
+#                Example: xen or xen.efi or xen.gz
+# DOM0_RAMDISK_IMAGETYPE: Specifies DOM0 ramdisk to be used, Example: cpio.gz
+XEN_IMAGETYPE ??= "xen"
+DOM0_RAMDISK_IMAGETYPE ??= "rootfs.cpio.gz"
+
+# Set the amount of memory for dom0 depending on total available memory size(DDR).
+DOM0_MEM ??= "256M"
+
+# Specify which UART console Xen should use. You can sepecify the devicetree
+# alias or full path to a node in the devicetree
+# XEN_SERIAL_CONSOLES = "/soc/serial@7e215040" or
+# XEN_SERIAL_CONSOLES = "serial0" or
+# XEN_SERIAL_CONSOLES = "/axi/serial@ff000000"
+XEN_SERIAL_CONSOLES ??= "/soc/serial@7e215040"
+
+# Specify additional command line arguments used for Xen and this will be appended
+# to xen-bootargs cariable. This can also be used for passing debug cmd line arguments.
+# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all guest_loglvl=debug"
+XEN_CMDLINE_APPEND ??= "sync_console bootscrub=0"
+
+# Specify the max number of vcpus for dom0
+# Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4"
+DOM0_MAX_VCPUS ??= "1"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [meta-virtualization][master][PATCH 2/6]  xen-rpi-u-boot-scr: Inherit xen-u-boot-scr bbclass
  2024-11-19  5:11 [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Sandeep Gundlupet Raju
  2024-11-19  5:11 ` [meta-virtualization][master][PATCH 1/6] xen-u-boot-scr: " Sandeep Gundlupet Raju
@ 2024-11-19  5:11 ` Sandeep Gundlupet Raju
  2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 3/6] xen-boot-env: Move xen variables to inc file Sandeep Gundlupet Raju
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Sandeep Gundlupet Raju @ 2024-11-19  5:11 UTC (permalink / raw)
  To: meta-virtualization, bruce.ashfield; +Cc: mark.hatle

Inherit xen-u-boot-scr bbclass to use common xen u-boot boot script
variables for xen-rpi-u-boot-scr recipes.

Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
---
 .../xen-rpi-u-boot-scr/files/boot.cmd.xen.in        | 10 +++++-----
 .../xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb        | 13 ++++++++-----
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/boot.cmd.xen.in b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/boot.cmd.xen.in
index 98742200..b0ed0dc8 100644
--- a/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/boot.cmd.xen.in
+++ b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/boot.cmd.xen.in
@@ -5,13 +5,13 @@ fdt addr ${fdt_addr}
 fdt get value bootargs /chosen bootargs
 
 # Set module load addresses
-setenv xen_loadaddr     "0x00200000"
-setenv kernel_loadaddr  "0x00400000"
+setenv xen_loadaddr     "@@XEN_LOAD_ADDRESS@@"
+setenv kernel_loadaddr  "@@KERNEL_LOAD_ADDRESS@@"
 
 # Add some space to the fdt so we can edit it
 fdt resize 0x1000
 echo Add boot arguments for Xen
-fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=/soc/serial@7e215040 dom0_mem='@@RPI_DOM0_MEM@@' @@RPI_DEBUG_XEN_ARGS@@"
+fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=@@XEN_SERIAL_CONSOLES@@ dom0_mem=@@DOM0_MEM@@ @@XEN_CMDLINE_APPEND@@"
 
 echo Add a dom0 node to chosen to put Linux boot information in
 fdt mknode /chosen dom0
@@ -36,11 +36,11 @@ setenv dom0_bootargs "console=hvc0 earlycon=xenboot debug root=PARTUUID=${rootfs
 fdt set /chosen xen,dom0-bootargs \"${dom0_bootargs}\"
 
 echo Load Xen into memory
-fatload mmc 1:1 ${xen_loadaddr} xen
+fatload mmc 1:1 ${xen_loadaddr} @@XEN_IMAGETYPE@@
 echo Xen loaded, size: 0x$filesize
 
 echo Load Linux kernel into memory
-fatload mmc 1:1 ${kernel_loadaddr} Image
+fatload mmc 1:1 ${kernel_loadaddr} @@KERNEL_IMAGETYPE@@
 setenv kernel_size 0x$filesize
 echo Linux loaded, size: 0x$filesize
 
diff --git a/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb
index 3f83c7f8..8893b42c 100644
--- a/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb
+++ b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb
@@ -5,18 +5,21 @@ COMPATIBLE_MACHINE = "^raspberrypi4-64$"
 
 DEPENDS = "u-boot-mkimage-native"
 
+inherit xen-u-boot-scr
+
 INHIBIT_DEFAULT_DEPS = "1"
 
 SRC_URI = "file://boot.cmd.xen.in"
 
-RPI_DOM0_MEM ??= "256M"
-RPI_DEBUG_XEN_ARGS ??= "sync_console bootscrub=0"
-
 do_compile() {
     sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
+        -e 's/@@XEN_IMAGETYPE@@/${XEN_IMAGETYPE}/' \
         -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \
-        -e 's/@@RPI_DOM0_MEM@@/${RPI_DOM0_MEM}/' \
-        -e 's/@@RPI_DEBUG_XEN_ARGS@@/${RPI_DEBUG_XEN_ARGS}/' \
+        -e 's/@@DOM0_MEM@@/${DOM0_MEM}/' \
+        -e 's/@@KERNEL_LOAD_ADDRESS@@/${KERNEL_LOAD_ADDRESS}/' \
+        -e 's/@@XEN_LOAD_ADDRESS@@/${XEN_LOAD_ADDRESS}/' \
+        -e 's:@@XEN_CMDLINE_APPEND@@:${XEN_CMDLINE_APPEND}:' \
+        -e 's:@@XEN_SERIAL_CONSOLES@@:${XEN_SERIAL_CONSOLES}:' \
         "${UNPACKDIR}/boot.cmd.xen.in" > "${WORKDIR}/boot.cmd"
 
     mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [meta-virtualization][master][scarthgap][styhead][PATCH 3/6]  xen-boot-env: Move xen variables to inc file
  2024-11-19  5:11 [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Sandeep Gundlupet Raju
  2024-11-19  5:11 ` [meta-virtualization][master][PATCH 1/6] xen-u-boot-scr: " Sandeep Gundlupet Raju
  2024-11-19  5:11 ` [meta-virtualization][master][PATCH 2/6] xen-rpi-u-boot-scr: Inherit xen-u-boot-scr bbclass Sandeep Gundlupet Raju
@ 2024-11-19  5:12 ` Sandeep Gundlupet Raju
  2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen Sandeep Gundlupet Raju
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Sandeep Gundlupet Raju @ 2024-11-19  5:12 UTC (permalink / raw)
  To: meta-virtualization, bruce.ashfield; +Cc: mark.hatle

Move xen u-boot boot script variables to new xen-boot-env.inc file.
This allows users to include this inclusion file for their custom
boot scripts.

Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
---
 .../recipes-bsp/u-boot/xen-boot-env.inc       | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc

diff --git a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc
new file mode 100644
index 00000000..9b9962a4
--- /dev/null
+++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc
@@ -0,0 +1,29 @@
+# Adjust the variables for xen boot
+
+# Image offsets for Xen boot.
+KERNEL_OFFSET ?= "0xE00000"
+DEVICETREE_OFFSET ?= "0xC000000"
+RAMDISK_OFFSET ?= "0x2600000"
+XEN_OFFSET ?= "0xBA00000"
+XEN_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('XEN_OFFSET'))}"
+
+# If dom0-ramdisk is used for Xen boot then set RAMDISK image to cpio.gz
+XEN_IMAGE_NAME ?= "xen"
+RAMDISK_IMAGE ?= "rootfs.cpio.gz"
+
+# Set the amount of memory for dom0 depending on total available memory size(DDR).
+DOM0_MEM ?= "1500M"
+
+# Specify which UART console Xen should use. You can sepecify the devicetree
+# alias or full path to a node in the devicetree
+# XEN_SERIAL_CONSOLES ?= "serial0" or XEN_SERIAL_CONSOLES ?= "/axi/serial@ff000000"
+XEN_SERIAL_CONSOLES ?= "serial0"
+
+# Specify additional Xen paramaters which will be appended to xen-bootargs
+# This can alos be used for debugging purposes.
+# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all guest_loglvl=debug"
+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"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [meta-virtualization][master][scarthgap][styhead][PATCH 4/6]  u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
  2024-11-19  5:11 [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Sandeep Gundlupet Raju
                   ` (2 preceding siblings ...)
  2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 3/6] xen-boot-env: Move xen variables to inc file Sandeep Gundlupet Raju
@ 2024-11-19  5:12 ` Sandeep Gundlupet Raju
  2024-11-21  4:42   ` Bruce Ashfield
  2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 5/6] boot.cmd.xen: Add load address to echo messages Sandeep Gundlupet Raju
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Sandeep Gundlupet Raju @ 2024-11-19  5:12 UTC (permalink / raw)
  To: meta-virtualization, bruce.ashfield; +Cc: mark.hatle

Include xen-boot-env.inc file if BOOTMODE="xen" and also remove xen
u-boot boot script variables from xen-boot-cmd.inc.

Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
---
 .../u-boot/u-boot-xlnx-scr.bbappend           |  7 +++-
 .../recipes-bsp/u-boot/xen-boot-cmd.inc       | 35 -------------------
 2 files changed, 6 insertions(+), 36 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 ec64d246..4e39c316 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,4 +1,9 @@
-# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from configuration
+# Include xen-boot-cmd.inc only if BOOTMODE = "xen" is set from configuration
 # file and xen enabled in DISTRO_FEATURES.
+include ${@'xen-boot-env.inc' if d.getVar('BOOTMODE') == 'xen' and bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''}
+
+# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from configuration
+# file and xen enabled in DISTRO_FEATURES. xen-boot-cmd.inc is supports multiple
+# boot modes such as JTAG and SD(ext4 and ramdisk).
 ENABLE_XEN_UBOOT_SCR ?= ""
 include ${@'xen-boot-cmd.inc' if d.getVar('ENABLE_XEN_UBOOT_SCR') == '1' and bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''}
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 7a4e41a6..6fccc7b4 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
@@ -1,38 +1,3 @@
 FILESEXTRAPATHS:append := ":${THISDIR}/u-boot-xlnx-scr"
 
 SRC_URI += "file://boot.cmd.xen"
- 
-# Image offsets for Xen boot
-KERNEL_OFFSET:zynqmp ?= "0xE00000"
-KERNEL_OFFSET:versal ?= "0xE00000"
-
-DEVICETREE_OFFSET:zynqmp ?= "0xC000000"
-DEVICETREE_OFFSET:versal ?= "0xC000000"
-
-RAMDISK_OFFSET:zynqmp ?= "0x2600000"
-RAMDISK_OFFSET:versal ?= "0x2600000"
-
-XEN_OFFSET:zynqmp ?= "0xBA00000"
-XEN_OFFSET:versal ?= "0xBA00000"
-XEN_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('XEN_OFFSET'))}"
-
-# If dom0-ramdisk is used for Xen boot then set RAMDISK image to cpio.gz
-XEN_IMAGE_NAME ?= "xen"
-RAMDISK_IMAGE ?= "rootfs.cpio.gz"
-
-# Set the amount of memory for dom0 depending on total available memory size(DDR).
-DOM0_MEM ?= "1500M"
-
-# Specify which UART console Xen should use. You can sepecify the devicetree
-# alias or full path to a node in the devicetree
-# XEN_SERIAL_CONSOLES ?= "serial0" or XEN_SERIAL_CONSOLES ?= "/axi/serial@ff000000"
-XEN_SERIAL_CONSOLES ?= "serial0"
-
-# Specify additional Xen paramaters which will be appended to xen-bootargs
-# This can alos be used for debugging purposes.
-# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all guest_loglvl=debug"
-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"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [meta-virtualization][master][scarthgap][styhead][PATCH 5/6]  boot.cmd.xen: Add load address to echo messages
  2024-11-19  5:11 [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Sandeep Gundlupet Raju
                   ` (3 preceding siblings ...)
  2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen Sandeep Gundlupet Raju
@ 2024-11-19  5:12 ` Sandeep Gundlupet Raju
  2024-11-19  5:12 ` [meta-virtualization][master][PATCH 6/6] xen-boot-env.inc: Inherit xen-u-boot-scr bbclass Sandeep Gundlupet Raju
  2024-11-21  4:44 ` [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Bruce Ashfield
  6 siblings, 0 replies; 16+ messages in thread
From: Sandeep Gundlupet Raju @ 2024-11-19  5:12 UTC (permalink / raw)
  To: meta-virtualization, bruce.ashfield; +Cc: mark.hatle

Add load address to echo messages to boot.cmd.xen u-boot boot script.
This provides more detailed print messages during boot so user can do
self debug if images overlaps resulting in boot failures.

Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
---
 .../recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.xen       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.xen b/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.xen
index 25e5842c..929f66f1 100644
--- a/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.xen
+++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.xen
@@ -29,23 +29,23 @@ do
 		fi
 		echo "Checking for /${xen_name}"
 		if test -e ${devtype} ${devnum}:${distro_bootpart} /${xen_name}; then
-			echo "Loading ${xen_name}";
+			echo "Loading ${xen_name} at @@XEN_LOAD_ADDRESS@@";
 			fatload ${devtype} ${devnum}:${distro_bootpart} @@XEN_LOAD_ADDRESS@@ ${xen_name};
 		fi
 		echo "Checking for /${kernel_name}"
 		if test -e ${devtype} ${devnum}:${distro_bootpart} /${kernel_name}; then
-			echo "Loading ${kernel_name}";
+			echo "Loading ${kernel_name} at @@KERNEL_LOAD_ADDRESS@@";
 			fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name};
 			setenv kernel_size 0x$filesize;
 		fi
 		echo "Checking for /system.dtb"
 		if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then
-			echo "Loading system.dtb";
+			echo "Loading system.dtb at @@DEVICETREE_ADDRESS@@";
 			fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb;
 		fi
 		echo "Checking for /${rootfs_name}"
 		if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then
-			echo "Loading ${rootfs_name}";
+			echo "Loading ${rootfs_name} at @@RAMDISK_IMAGE_ADDRESS@@";
 			fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name};
 			setenv ramdisk_size 0x$filesize;
 		fi
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [meta-virtualization][master][PATCH 6/6]  xen-boot-env.inc: Inherit xen-u-boot-scr bbclass
  2024-11-19  5:11 [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Sandeep Gundlupet Raju
                   ` (4 preceding siblings ...)
  2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 5/6] boot.cmd.xen: Add load address to echo messages Sandeep Gundlupet Raju
@ 2024-11-19  5:12 ` Sandeep Gundlupet Raju
  2024-11-21  4:44 ` [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Bruce Ashfield
  6 siblings, 0 replies; 16+ messages in thread
From: Sandeep Gundlupet Raju @ 2024-11-19  5:12 UTC (permalink / raw)
  To: meta-virtualization, bruce.ashfield; +Cc: mark.hatle

Inherit xen-u-boot-scr bbclass to use xen common u-boot env variables.

Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
---
 dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc
index 9b9962a4..da615f0b 100644
--- a/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc
+++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc
@@ -1,5 +1,7 @@
 # Adjust the variables for xen boot
 
+inherit xen-u-boot-scr
+
 # Image offsets for Xen boot.
 KERNEL_OFFSET ?= "0xE00000"
 DEVICETREE_OFFSET ?= "0xC000000"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [meta-virtualization][master][PATCH 1/6]  xen-u-boot-scr: Add bbclass for xen boot script variables
  2024-11-19  5:11 ` [meta-virtualization][master][PATCH 1/6] xen-u-boot-scr: " Sandeep Gundlupet Raju
@ 2024-11-21  4:40   ` Bruce Ashfield
  2024-11-21 16:30     ` Gundlupet Raju, Sandeep
       [not found]     ` <180A08C7C2D5332A.23999@lists.yoctoproject.org>
  0 siblings, 2 replies; 16+ messages in thread
From: Bruce Ashfield @ 2024-11-21  4:40 UTC (permalink / raw)
  To: Sandeep Gundlupet Raju; +Cc: meta-virtualization, mark.hatle

In message: [meta-virtualization][master][PATCH 1/6]  xen-u-boot-scr: Add bbclass for xen boot script variables
on 18/11/2024 Sandeep Gundlupet Raju wrote:

> Add a new bbclass for xen boot script variables. This bbclass provides
> common xen u-boot boot script variables which can be inherited by any
> vendor specific u-boot boot script recipes. Also these variable are
> configurable from recipes, global and machine configuration files.

This is this just for configuration, I'd prefer if the
class was called: xen-uboot-scr-variables or xen-uboot-scr-configuration

That way when I see it inherited from the recipes is it very clear
what it will be providing.

Bruce

> 
> Variable nomenclature is aligned with xen documentation.
> https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
> 
> Currently it supports Xen Dom0 boot and can be extended for DomU
> or Dom0less boot.
> 
> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
> ---
>  classes-recipe/xen-u-boot-scr.bbclass | 43 +++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
>  create mode 100644 classes-recipe/xen-u-boot-scr.bbclass
> 
> diff --git a/classes-recipe/xen-u-boot-scr.bbclass b/classes-recipe/xen-u-boot-scr.bbclass
> new file mode 100644
> index 00000000..df8287e1
> --- /dev/null
> +++ b/classes-recipe/xen-u-boot-scr.bbclass
> @@ -0,0 +1,43 @@
> +# Copyright (C) 2024, Advanced Micro Devices, Inc.  All rights reserved.
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +# This bbclass defines u-boot script variables required for xen boot which can be
> +# inherited u-boot boot scripts recipes and also allows to configure these variables
> +# from recipes, global and machine configurations files.
> +
> +# Variable nomenclature is aligned with
> +# https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
> +
> +# Image Load Address for Xen Dom0 boot
> +KERNEL_LOAD_ADDRESS ??= "0x00400000"
> +XEN_LOAD_ADDRESS ??= "0x00200000"
> +DEVICETREE_LOAD_ADDRESS ??= "0xC000000"
> +RAMDISK_LOAD_ADDRESS ??= "0x2600000"
> +
> +# Xen boot image types.
> +# KERNEL_IMAGETYPE: Specifies DomU kernel image file to be loaded by u-boot.
> +# XEN_IMAGETYPE: Specifies xen hypervisor binary to be loaded by u-boot.
> +#                Example: xen or xen.efi or xen.gz
> +# DOM0_RAMDISK_IMAGETYPE: Specifies DOM0 ramdisk to be used, Example: cpio.gz
> +XEN_IMAGETYPE ??= "xen"
> +DOM0_RAMDISK_IMAGETYPE ??= "rootfs.cpio.gz"
> +
> +# Set the amount of memory for dom0 depending on total available memory size(DDR).
> +DOM0_MEM ??= "256M"
> +
> +# Specify which UART console Xen should use. You can sepecify the devicetree
> +# alias or full path to a node in the devicetree
> +# XEN_SERIAL_CONSOLES = "/soc/serial@7e215040" or
> +# XEN_SERIAL_CONSOLES = "serial0" or
> +# XEN_SERIAL_CONSOLES = "/axi/serial@ff000000"
> +XEN_SERIAL_CONSOLES ??= "/soc/serial@7e215040"
> +
> +# Specify additional command line arguments used for Xen and this will be appended
> +# to xen-bootargs cariable. This can also be used for passing debug cmd line arguments.
> +# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all guest_loglvl=debug"
> +XEN_CMDLINE_APPEND ??= "sync_console bootscrub=0"
> +
> +# Specify the max number of vcpus for dom0
> +# Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4"
> +DOM0_MAX_VCPUS ??= "1"
> -- 
> 2.34.1
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
  2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen Sandeep Gundlupet Raju
@ 2024-11-21  4:42   ` Bruce Ashfield
  2024-11-21 16:28     ` Gundlupet Raju, Sandeep
  0 siblings, 1 reply; 16+ messages in thread
From: Bruce Ashfield @ 2024-11-21  4:42 UTC (permalink / raw)
  To: Sandeep Gundlupet Raju; +Cc: meta-virtualization, mark.hatle

In message: [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
on 18/11/2024 Sandeep Gundlupet Raju wrote:

> Include xen-boot-env.inc file if BOOTMODE="xen" and also remove xen
> u-boot boot script variables from xen-boot-cmd.inc.

Is the BOOMODE variable documented somewhere ? In the main
uboot recipes ?

Bruce

> 
> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
> ---
>  .../u-boot/u-boot-xlnx-scr.bbappend           |  7 +++-
>  .../recipes-bsp/u-boot/xen-boot-cmd.inc       | 35 -------------------
>  2 files changed, 6 insertions(+), 36 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 ec64d246..4e39c316 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,4 +1,9 @@
> -# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from configuration
> +# Include xen-boot-cmd.inc only if BOOTMODE = "xen" is set from configuration
>  # file and xen enabled in DISTRO_FEATURES.
> +include ${@'xen-boot-env.inc' if d.getVar('BOOTMODE') == 'xen' and bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''}
> +
> +# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from configuration
> +# file and xen enabled in DISTRO_FEATURES. xen-boot-cmd.inc is supports multiple
> +# boot modes such as JTAG and SD(ext4 and ramdisk).
>  ENABLE_XEN_UBOOT_SCR ?= ""
>  include ${@'xen-boot-cmd.inc' if d.getVar('ENABLE_XEN_UBOOT_SCR') == '1' and bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''}
> 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 7a4e41a6..6fccc7b4 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
> @@ -1,38 +1,3 @@
>  FILESEXTRAPATHS:append := ":${THISDIR}/u-boot-xlnx-scr"
>  
>  SRC_URI += "file://boot.cmd.xen"
> - 
> -# Image offsets for Xen boot
> -KERNEL_OFFSET:zynqmp ?= "0xE00000"
> -KERNEL_OFFSET:versal ?= "0xE00000"
> -
> -DEVICETREE_OFFSET:zynqmp ?= "0xC000000"
> -DEVICETREE_OFFSET:versal ?= "0xC000000"
> -
> -RAMDISK_OFFSET:zynqmp ?= "0x2600000"
> -RAMDISK_OFFSET:versal ?= "0x2600000"
> -
> -XEN_OFFSET:zynqmp ?= "0xBA00000"
> -XEN_OFFSET:versal ?= "0xBA00000"
> -XEN_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('XEN_OFFSET'))}"
> -
> -# If dom0-ramdisk is used for Xen boot then set RAMDISK image to cpio.gz
> -XEN_IMAGE_NAME ?= "xen"
> -RAMDISK_IMAGE ?= "rootfs.cpio.gz"
> -
> -# Set the amount of memory for dom0 depending on total available memory size(DDR).
> -DOM0_MEM ?= "1500M"
> -
> -# Specify which UART console Xen should use. You can sepecify the devicetree
> -# alias or full path to a node in the devicetree
> -# XEN_SERIAL_CONSOLES ?= "serial0" or XEN_SERIAL_CONSOLES ?= "/axi/serial@ff000000"
> -XEN_SERIAL_CONSOLES ?= "serial0"
> -
> -# Specify additional Xen paramaters which will be appended to xen-bootargs
> -# This can alos be used for debugging purposes.
> -# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all guest_loglvl=debug"
> -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"
> -- 
> 2.34.1
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables
  2024-11-19  5:11 [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Sandeep Gundlupet Raju
                   ` (5 preceding siblings ...)
  2024-11-19  5:12 ` [meta-virtualization][master][PATCH 6/6] xen-boot-env.inc: Inherit xen-u-boot-scr bbclass Sandeep Gundlupet Raju
@ 2024-11-21  4:44 ` Bruce Ashfield
  6 siblings, 0 replies; 16+ messages in thread
From: Bruce Ashfield @ 2024-11-21  4:44 UTC (permalink / raw)
  To: Sandeep Gundlupet Raju; +Cc: meta-virtualization, mark.hatle

In message: [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables
on 18/11/2024 Sandeep Gundlupet Raju wrote:

> 1. Add xen-u-boot-scr.bbclass for generic xen boot script variables
>    use by any soc devices.
> 2. Inherit xen-u-boot-scr.bbclass in xen-rpi-u-boot-scr.
> 3. Move xen variables to xen-boot-env.inc file in xilinx
>    dynamic layers.
> 4. Include xen-boot-env if BOOTMODE = "xen" switch is enabled.
> 5. Add load address to boot.cmd.xen script echo messages.
> 6. Inherit xen-u-boot-scr bbclass in xen-boot-env.inc.
> 7. If user brings in their own boot.cmd.xxx file they can just
>    inherit xen-u-boot-scr bbclass and use the generic xen boot
>    script variables.

Just one request for a slightly different bbclass name
and a question about BOOTMODE.

A quick v2, and I don't have any concerns about merging
the series.

Bruce

> 
> Sandeep Gundlupet Raju (6):
>   xen-u-boot-scr: Add bbclass for xen boot script variables
>   xen-rpi-u-boot-scr: Inherit xen-u-boot-scr bbclass
>   xen-boot-env: Move xen variables to inc file
>   u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
>   boot.cmd.xen: Add load address to echo messages
>   xen-boot-env.inc: Inherit xen-u-boot-scr bbclass
> 
>  classes-recipe/xen-u-boot-scr.bbclass         | 43 +++++++++++++++++++
>  .../xen-rpi-u-boot-scr/files/boot.cmd.xen.in  | 10 ++---
>  .../xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb  | 13 +++---
>  .../u-boot/u-boot-xlnx-scr.bbappend           |  7 ++-
>  .../u-boot/u-boot-xlnx-scr/boot.cmd.xen       |  8 ++--
>  .../recipes-bsp/u-boot/xen-boot-cmd.inc       | 35 ---------------
>  .../recipes-bsp/u-boot/xen-boot-env.inc       | 31 +++++++++++++
>  7 files changed, 97 insertions(+), 50 deletions(-)
>  create mode 100644 classes-recipe/xen-u-boot-scr.bbclass
>  create mode 100644 dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-env.inc
> 
> -- 
> 2.34.1
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
  2024-11-21  4:42   ` Bruce Ashfield
@ 2024-11-21 16:28     ` Gundlupet Raju, Sandeep
  2024-11-21 16:46       ` Bruce Ashfield
  0 siblings, 1 reply; 16+ messages in thread
From: Gundlupet Raju, Sandeep @ 2024-11-21 16:28 UTC (permalink / raw)
  To: meta-virtualization


On 11/20/2024 9:42 PM, Bruce Ashfield via lists.yoctoproject.org wrote:
> In message: [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
> on 18/11/2024 Sandeep Gundlupet Raju wrote:
>
>> Include xen-boot-env.inc file if BOOTMODE="xen" and also remove xen
>> u-boot boot script variables from xen-boot-cmd.inc.
> Is the BOOMODE variable documented somewhere ? In the main
> uboot recipes ?
[Sandeep]: Bruce, Variable is defined in 
https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb#L32-L33 
to support multiple u-boot boot target 
https://github.com/Xilinx/u-boot-xlnx/blob/master/include/configs/xilinx_versal.h#L124-L132 
for u-boot distro boot. I don't think we have a documentation defining 
all the variables.
>
> Bruce
>
>> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
>> ---
>>   .../u-boot/u-boot-xlnx-scr.bbappend           |  7 +++-
>>   .../recipes-bsp/u-boot/xen-boot-cmd.inc       | 35 -------------------
>>   2 files changed, 6 insertions(+), 36 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 ec64d246..4e39c316 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,4 +1,9 @@
>> -# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from configuration
>> +# Include xen-boot-cmd.inc only if BOOTMODE = "xen" is set from configuration
>>   # file and xen enabled in DISTRO_FEATURES.
>> +include ${@'xen-boot-env.inc' if d.getVar('BOOTMODE') == 'xen' and bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''}
>> +
>> +# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from configuration
>> +# file and xen enabled in DISTRO_FEATURES. xen-boot-cmd.inc is supports multiple
>> +# boot modes such as JTAG and SD(ext4 and ramdisk).
>>   ENABLE_XEN_UBOOT_SCR ?= ""
>>   include ${@'xen-boot-cmd.inc' if d.getVar('ENABLE_XEN_UBOOT_SCR') == '1' and bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''}
>> 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 7a4e41a6..6fccc7b4 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
>> @@ -1,38 +1,3 @@
>>   FILESEXTRAPATHS:append := ":${THISDIR}/u-boot-xlnx-scr"
>>   
>>   SRC_URI += "file://boot.cmd.xen"
>> -
>> -# Image offsets for Xen boot
>> -KERNEL_OFFSET:zynqmp ?= "0xE00000"
>> -KERNEL_OFFSET:versal ?= "0xE00000"
>> -
>> -DEVICETREE_OFFSET:zynqmp ?= "0xC000000"
>> -DEVICETREE_OFFSET:versal ?= "0xC000000"
>> -
>> -RAMDISK_OFFSET:zynqmp ?= "0x2600000"
>> -RAMDISK_OFFSET:versal ?= "0x2600000"
>> -
>> -XEN_OFFSET:zynqmp ?= "0xBA00000"
>> -XEN_OFFSET:versal ?= "0xBA00000"
>> -XEN_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('XEN_OFFSET'))}"
>> -
>> -# If dom0-ramdisk is used for Xen boot then set RAMDISK image to cpio.gz
>> -XEN_IMAGE_NAME ?= "xen"
>> -RAMDISK_IMAGE ?= "rootfs.cpio.gz"
>> -
>> -# Set the amount of memory for dom0 depending on total available memory size(DDR).
>> -DOM0_MEM ?= "1500M"
>> -
>> -# Specify which UART console Xen should use. You can sepecify the devicetree
>> -# alias or full path to a node in the devicetree
>> -# XEN_SERIAL_CONSOLES ?= "serial0" or XEN_SERIAL_CONSOLES ?= "/axi/serial@ff000000"
>> -XEN_SERIAL_CONSOLES ?= "serial0"
>> -
>> -# Specify additional Xen paramaters which will be appended to xen-bootargs
>> -# This can alos be used for debugging purposes.
>> -# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all guest_loglvl=debug"
>> -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"
>> -- 
>> 2.34.1
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#8992): https://lists.yoctoproject.org/g/meta-virtualization/message/8992
>> Mute This Topic: https://lists.yoctoproject.org/mt/109660021/8188369
>> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
>> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [santraju@amd.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-virtualization][master][PATCH 1/6] xen-u-boot-scr: Add bbclass for xen boot script variables
  2024-11-21  4:40   ` Bruce Ashfield
@ 2024-11-21 16:30     ` Gundlupet Raju, Sandeep
       [not found]     ` <180A08C7C2D5332A.23999@lists.yoctoproject.org>
  1 sibling, 0 replies; 16+ messages in thread
From: Gundlupet Raju, Sandeep @ 2024-11-21 16:30 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization, mark.hatle


On 11/20/2024 9:40 PM, Bruce Ashfield wrote:
> In message: [meta-virtualization][master][PATCH 1/6]  xen-u-boot-scr: Add bbclass for xen boot script variables
> on 18/11/2024 Sandeep Gundlupet Raju wrote:
>
>> Add a new bbclass for xen boot script variables. This bbclass provides
>> common xen u-boot boot script variables which can be inherited by any
>> vendor specific u-boot boot script recipes. Also these variable are
>> configurable from recipes, global and machine configuration files.
> This is this just for configuration, I'd prefer if the
> class was called: xen-uboot-scr-variables or xen-uboot-scr-configuration
>
> That way when I see it inherited from the recipes is it very clear
> what it will be providing.
[Sandeep]: Sounds good I will send a v2 patch with bbclass rename.
>
> Bruce
>
>> Variable nomenclature is aligned with xen documentation.
>> https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
>>
>> Currently it supports Xen Dom0 boot and can be extended for DomU
>> or Dom0less boot.
>>
>> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
>> ---
>>   classes-recipe/xen-u-boot-scr.bbclass | 43 +++++++++++++++++++++++++++
>>   1 file changed, 43 insertions(+)
>>   create mode 100644 classes-recipe/xen-u-boot-scr.bbclass
>>
>> diff --git a/classes-recipe/xen-u-boot-scr.bbclass b/classes-recipe/xen-u-boot-scr.bbclass
>> new file mode 100644
>> index 00000000..df8287e1
>> --- /dev/null
>> +++ b/classes-recipe/xen-u-boot-scr.bbclass
>> @@ -0,0 +1,43 @@
>> +# Copyright (C) 2024, Advanced Micro Devices, Inc.  All rights reserved.
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +# This bbclass defines u-boot script variables required for xen boot which can be
>> +# inherited u-boot boot scripts recipes and also allows to configure these variables
>> +# from recipes, global and machine configurations files.
>> +
>> +# Variable nomenclature is aligned with
>> +# https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
>> +
>> +# Image Load Address for Xen Dom0 boot
>> +KERNEL_LOAD_ADDRESS ??= "0x00400000"
>> +XEN_LOAD_ADDRESS ??= "0x00200000"
>> +DEVICETREE_LOAD_ADDRESS ??= "0xC000000"
>> +RAMDISK_LOAD_ADDRESS ??= "0x2600000"
>> +
>> +# Xen boot image types.
>> +# KERNEL_IMAGETYPE: Specifies DomU kernel image file to be loaded by u-boot.
>> +# XEN_IMAGETYPE: Specifies xen hypervisor binary to be loaded by u-boot.
>> +#                Example: xen or xen.efi or xen.gz
>> +# DOM0_RAMDISK_IMAGETYPE: Specifies DOM0 ramdisk to be used, Example: cpio.gz
>> +XEN_IMAGETYPE ??= "xen"
>> +DOM0_RAMDISK_IMAGETYPE ??= "rootfs.cpio.gz"
>> +
>> +# Set the amount of memory for dom0 depending on total available memory size(DDR).
>> +DOM0_MEM ??= "256M"
>> +
>> +# Specify which UART console Xen should use. You can sepecify the devicetree
>> +# alias or full path to a node in the devicetree
>> +# XEN_SERIAL_CONSOLES = "/soc/serial@7e215040" or
>> +# XEN_SERIAL_CONSOLES = "serial0" or
>> +# XEN_SERIAL_CONSOLES = "/axi/serial@ff000000"
>> +XEN_SERIAL_CONSOLES ??= "/soc/serial@7e215040"
>> +
>> +# Specify additional command line arguments used for Xen and this will be appended
>> +# to xen-bootargs cariable. This can also be used for passing debug cmd line arguments.
>> +# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all guest_loglvl=debug"
>> +XEN_CMDLINE_APPEND ??= "sync_console bootscrub=0"
>> +
>> +# Specify the max number of vcpus for dom0
>> +# Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4"
>> +DOM0_MAX_VCPUS ??= "1"
>> -- 
>> 2.34.1
>>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
  2024-11-21 16:28     ` Gundlupet Raju, Sandeep
@ 2024-11-21 16:46       ` Bruce Ashfield
  2024-11-21 17:44         ` Gundlupet Raju, Sandeep
  0 siblings, 1 reply; 16+ messages in thread
From: Bruce Ashfield @ 2024-11-21 16:46 UTC (permalink / raw)
  To: sandeep.gundlupet-raju; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 5280 bytes --]

On Thu, Nov 21, 2024 at 11:28 AM Sandeep Gundlupet Raju via
lists.yoctoproject.org <sandeep.gundlupet-raju=
amd.com@lists.yoctoproject.org> wrote:

>
> On 11/20/2024 9:42 PM, Bruce Ashfield via lists.yoctoproject.org wrote:
> > In message: [meta-virtualization][master][scarthgap][styhead][PATCH 4/6]
> u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
> > on 18/11/2024 Sandeep Gundlupet Raju wrote:
> >
> >> Include xen-boot-env.inc file if BOOTMODE="xen" and also remove xen
> >> u-boot boot script variables from xen-boot-cmd.inc.
> > Is the BOOMODE variable documented somewhere ? In the main
> > uboot recipes ?
> [Sandeep]: Bruce, Variable is defined in
>
> https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb#L32-L33
> to support multiple u-boot boot target
>
> https://github.com/Xilinx/u-boot-xlnx/blob/master/include/configs/xilinx_versal.h#L124-L132
> for u-boot distro boot. I don't think we have a documentation defining
> all the variables.
>

Can we just put a comment above the line in the file ? so someone can
lookup the definition if they are wondering.

Bruce



> >
> > Bruce
> >
> >> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
> >> ---
> >>   .../u-boot/u-boot-xlnx-scr.bbappend           |  7 +++-
> >>   .../recipes-bsp/u-boot/xen-boot-cmd.inc       | 35 -------------------
> >>   2 files changed, 6 insertions(+), 36 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 ec64d246..4e39c316 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,4 +1,9 @@
> >> -# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from
> configuration
> >> +# Include xen-boot-cmd.inc only if BOOTMODE = "xen" is set from
> configuration
> >>   # file and xen enabled in DISTRO_FEATURES.
> >> +include ${@'xen-boot-env.inc' if d.getVar('BOOTMODE') == 'xen' and
> bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''}
> >> +
> >> +# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set from
> configuration
> >> +# file and xen enabled in DISTRO_FEATURES. xen-boot-cmd.inc is
> supports multiple
> >> +# boot modes such as JTAG and SD(ext4 and ramdisk).
> >>   ENABLE_XEN_UBOOT_SCR ?= ""
> >>   include ${@'xen-boot-cmd.inc' if d.getVar('ENABLE_XEN_UBOOT_SCR') ==
> '1' and bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''}
> >> 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 7a4e41a6..6fccc7b4 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
> >> @@ -1,38 +1,3 @@
> >>   FILESEXTRAPATHS:append := ":${THISDIR}/u-boot-xlnx-scr"
> >>
> >>   SRC_URI += "file://boot.cmd.xen"
> >> -
> >> -# Image offsets for Xen boot
> >> -KERNEL_OFFSET:zynqmp ?= "0xE00000"
> >> -KERNEL_OFFSET:versal ?= "0xE00000"
> >> -
> >> -DEVICETREE_OFFSET:zynqmp ?= "0xC000000"
> >> -DEVICETREE_OFFSET:versal ?= "0xC000000"
> >> -
> >> -RAMDISK_OFFSET:zynqmp ?= "0x2600000"
> >> -RAMDISK_OFFSET:versal ?= "0x2600000"
> >> -
> >> -XEN_OFFSET:zynqmp ?= "0xBA00000"
> >> -XEN_OFFSET:versal ?= "0xBA00000"
> >> -XEN_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('XEN_OFFSET'))}"
> >> -
> >> -# If dom0-ramdisk is used for Xen boot then set RAMDISK image to
> cpio.gz
> >> -XEN_IMAGE_NAME ?= "xen"
> >> -RAMDISK_IMAGE ?= "rootfs.cpio.gz"
> >> -
> >> -# Set the amount of memory for dom0 depending on total available
> memory size(DDR).
> >> -DOM0_MEM ?= "1500M"
> >> -
> >> -# Specify which UART console Xen should use. You can sepecify the
> devicetree
> >> -# alias or full path to a node in the devicetree
> >> -# XEN_SERIAL_CONSOLES ?= "serial0" or XEN_SERIAL_CONSOLES ?=
> "/axi/serial@ff000000"
> >> -XEN_SERIAL_CONSOLES ?= "serial0"
> >> -
> >> -# Specify additional Xen paramaters which will be appended to
> xen-bootargs
> >> -# This can alos be used for debugging purposes.
> >> -# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all
> guest_loglvl=debug"
> >> -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"
> >> --
> >> 2.34.1
> >>
> >>
> >>
> >>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8996):
> https://lists.yoctoproject.org/g/meta-virtualization/message/8996
> Mute This Topic: https://lists.yoctoproject.org/mt/109660021/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [
> bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II

[-- Attachment #2: Type: text/html, Size: 8079 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-virtualization][master][PATCH 1/6] xen-u-boot-scr: Add bbclass for xen boot script variables
       [not found]     ` <180A08C7C2D5332A.23999@lists.yoctoproject.org>
@ 2024-11-21 17:40       ` Gundlupet Raju, Sandeep
  2024-11-21 18:24         ` Bruce Ashfield
  0 siblings, 1 reply; 16+ messages in thread
From: Gundlupet Raju, Sandeep @ 2024-11-21 17:40 UTC (permalink / raw)
  To: meta-virtualization, bruce.ashfield@gmail.com
  Cc: mark.hatle@kernel.crashing.org


On 11/21/2024 9:30 AM, Sandeep Gundlupet Raju via lists.yoctoproject.org 
wrote:
>
> On 11/20/2024 9:40 PM, Bruce Ashfield wrote:
>> In message: [meta-virtualization][master][PATCH 1/6]  xen-u-boot-scr: 
>> Add bbclass for xen boot script variables
>> on 18/11/2024 Sandeep Gundlupet Raju wrote:
>>
>>> Add a new bbclass for xen boot script variables. This bbclass provides
>>> common xen u-boot boot script variables which can be inherited by any
>>> vendor specific u-boot boot script recipes. Also these variable are
>>> configurable from recipes, global and machine configuration files.
>> This is this just for configuration, I'd prefer if the
>> class was called: xen-uboot-scr-variables or xen-uboot-scr-configuration
>>
>> That way when I see it inherited from the recipes is it very clear
>> what it will be providing.
> [Sandeep]: Sounds good I will send a v2 patch with bbclass rename.
[Sandeep]: Bruce, One more clarification we do recommend 
xen-uboot-scr-configuration or xen-u-boot-scr-configuration? Most of the 
Yocto u-boot recipes/bbclass has u-boot nomenclature and not uboot(no dash).
>>
>> Bruce
>>
>>> Variable nomenclature is aligned with xen documentation.
>>> https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
>>>
>>> Currently it supports Xen Dom0 boot and can be extended for DomU
>>> or Dom0less boot.
>>>
>>> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
>>> ---
>>>   classes-recipe/xen-u-boot-scr.bbclass | 43 
>>> +++++++++++++++++++++++++++
>>>   1 file changed, 43 insertions(+)
>>>   create mode 100644 classes-recipe/xen-u-boot-scr.bbclass
>>>
>>> diff --git a/classes-recipe/xen-u-boot-scr.bbclass 
>>> b/classes-recipe/xen-u-boot-scr.bbclass
>>> new file mode 100644
>>> index 00000000..df8287e1
>>> --- /dev/null
>>> +++ b/classes-recipe/xen-u-boot-scr.bbclass
>>> @@ -0,0 +1,43 @@
>>> +# Copyright (C) 2024, Advanced Micro Devices, Inc.  All rights 
>>> reserved.
>>> +#
>>> +# SPDX-License-Identifier: MIT
>>> +#
>>> +# This bbclass defines u-boot script variables required for xen 
>>> boot which can be
>>> +# inherited u-boot boot scripts recipes and also allows to 
>>> configure these variables
>>> +# from recipes, global and machine configurations files.
>>> +
>>> +# Variable nomenclature is aligned with
>>> +# https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
>>> +
>>> +# Image Load Address for Xen Dom0 boot
>>> +KERNEL_LOAD_ADDRESS ??= "0x00400000"
>>> +XEN_LOAD_ADDRESS ??= "0x00200000"
>>> +DEVICETREE_LOAD_ADDRESS ??= "0xC000000"
>>> +RAMDISK_LOAD_ADDRESS ??= "0x2600000"
>>> +
>>> +# Xen boot image types.
>>> +# KERNEL_IMAGETYPE: Specifies DomU kernel image file to be loaded 
>>> by u-boot.
>>> +# XEN_IMAGETYPE: Specifies xen hypervisor binary to be loaded by 
>>> u-boot.
>>> +#                Example: xen or xen.efi or xen.gz
>>> +# DOM0_RAMDISK_IMAGETYPE: Specifies DOM0 ramdisk to be used, 
>>> Example: cpio.gz
>>> +XEN_IMAGETYPE ??= "xen"
>>> +DOM0_RAMDISK_IMAGETYPE ??= "rootfs.cpio.gz"
>>> +
>>> +# Set the amount of memory for dom0 depending on total available 
>>> memory size(DDR).
>>> +DOM0_MEM ??= "256M"
>>> +
>>> +# Specify which UART console Xen should use. You can sepecify the 
>>> devicetree
>>> +# alias or full path to a node in the devicetree
>>> +# XEN_SERIAL_CONSOLES = "/soc/serial@7e215040" or
>>> +# XEN_SERIAL_CONSOLES = "serial0" or
>>> +# XEN_SERIAL_CONSOLES = "/axi/serial@ff000000"
>>> +XEN_SERIAL_CONSOLES ??= "/soc/serial@7e215040"
>>> +
>>> +# Specify additional command line arguments used for Xen and this 
>>> will be appended
>>> +# to xen-bootargs cariable. This can also be used for passing debug 
>>> cmd line arguments.
>>> +# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all 
>>> guest_loglvl=debug"
>>> +XEN_CMDLINE_APPEND ??= "sync_console bootscrub=0"
>>> +
>>> +# Specify the max number of vcpus for dom0
>>> +# Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4"
>>> +DOM0_MAX_VCPUS ??= "1"
>>> -- 
>>> 2.34.1
>>>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8997): https://lists.yoctoproject.org/g/meta-virtualization/message/8997
> Mute This Topic: https://lists.yoctoproject.org/mt/109660017/3619217
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [sandeep.gundlupet-raju@amd.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
  2024-11-21 16:46       ` Bruce Ashfield
@ 2024-11-21 17:44         ` Gundlupet Raju, Sandeep
  0 siblings, 0 replies; 16+ messages in thread
From: Gundlupet Raju, Sandeep @ 2024-11-21 17:44 UTC (permalink / raw)
  To: bruce.ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 5829 bytes --]


On 11/21/2024 9:46 AM, Bruce Ashfield via lists.yoctoproject.org wrote:
>
>
> On Thu, Nov 21, 2024 at 11:28 AM Sandeep Gundlupet Raju via 
> lists.yoctoproject.org <http://lists.yoctoproject.org> 
> <sandeep.gundlupet-raju=amd.com@lists.yoctoproject.org> wrote:
>
>
>     On 11/20/2024 9:42 PM, Bruce Ashfield via lists.yoctoproject.org
>     <http://lists.yoctoproject.org> wrote:
>     > In message:
>     [meta-virtualization][master][scarthgap][styhead][PATCH 4/6]
>     u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen
>     > on 18/11/2024 Sandeep Gundlupet Raju wrote:
>     >
>     >> Include xen-boot-env.inc file if BOOTMODE="xen" and also remove xen
>     >> u-boot boot script variables from xen-boot-cmd.inc.
>     > Is the BOOMODE variable documented somewhere ? In the main
>     > uboot recipes ?
>     [Sandeep]: Bruce, Variable is defined in
>     https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb#L32-L33
>
>     to support multiple u-boot boot target
>     https://github.com/Xilinx/u-boot-xlnx/blob/master/include/configs/xilinx_versal.h#L124-L132
>
>     for u-boot distro boot. I don't think we have a documentation
>     defining
>     all the variables.
>
>
> Can we just put a comment above the line in the file ? so someone can 
> lookup the definition if they are wondering.
[Sandeep]: Sure will do.
>
> Bruce
>
>     >
>     > Bruce
>     >
>     >> Signed-off-by: Sandeep Gundlupet Raju
>     <sandeep.gundlupet-raju@amd.com>
>     >> ---
>     >>   .../u-boot/u-boot-xlnx-scr.bbappend           | 7 +++-
>     >>   .../recipes-bsp/u-boot/xen-boot-cmd.inc       | 35
>     -------------------
>     >>   2 files changed, 6 insertions(+), 36 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 ec64d246..4e39c316 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,4 +1,9 @@
>     >> -# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set
>     from configuration
>     >> +# Include xen-boot-cmd.inc only if BOOTMODE = "xen" is set
>     from configuration
>     >>   # file and xen enabled in DISTRO_FEATURES.
>     >> +include ${@'xen-boot-env.inc' if d.getVar('BOOTMODE') == 'xen'
>     and bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d)
>     else ''}
>     >> +
>     >> +# Include xen-boot-cmd.inc only if ENABLE_XEN_UBOOT_SCR is set
>     from configuration
>     >> +# file and xen enabled in DISTRO_FEATURES. xen-boot-cmd.inc is
>     supports multiple
>     >> +# boot modes such as JTAG and SD(ext4 and ramdisk).
>     >>   ENABLE_XEN_UBOOT_SCR ?= ""
>     >>   include ${@'xen-boot-cmd.inc' if
>     d.getVar('ENABLE_XEN_UBOOT_SCR') == '1' and
>     bb.utils.contains('DISTRO_FEATURES', 'xen', True, False, d) else ''}
>     >> 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 7a4e41a6..6fccc7b4 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
>     >> @@ -1,38 +1,3 @@
>     >>   FILESEXTRAPATHS:append := ":${THISDIR}/u-boot-xlnx-scr"
>     >>
>     >>   SRC_URI += "file://boot.cmd.xen"
>     >> -
>     >> -# Image offsets for Xen boot
>     >> -KERNEL_OFFSET:zynqmp ?= "0xE00000"
>     >> -KERNEL_OFFSET:versal ?= "0xE00000"
>     >> -
>     >> -DEVICETREE_OFFSET:zynqmp ?= "0xC000000"
>     >> -DEVICETREE_OFFSET:versal ?= "0xC000000"
>     >> -
>     >> -RAMDISK_OFFSET:zynqmp ?= "0x2600000"
>     >> -RAMDISK_OFFSET:versal ?= "0x2600000"
>     >> -
>     >> -XEN_OFFSET:zynqmp ?= "0xBA00000"
>     >> -XEN_OFFSET:versal ?= "0xBA00000"
>     >> -XEN_LOAD_ADDRESS ?=
>     "${@append_baseaddr(d,d.getVar('XEN_OFFSET'))}"
>     >> -
>     >> -# If dom0-ramdisk is used for Xen boot then set RAMDISK image
>     to cpio.gz
>     >> -XEN_IMAGE_NAME ?= "xen"
>     >> -RAMDISK_IMAGE ?= "rootfs.cpio.gz"
>     >> -
>     >> -# Set the amount of memory for dom0 depending on total
>     available memory size(DDR).
>     >> -DOM0_MEM ?= "1500M"
>     >> -
>     >> -# Specify which UART console Xen should use. You can sepecify
>     the devicetree
>     >> -# alias or full path to a node in the devicetree
>     >> -# XEN_SERIAL_CONSOLES ?= "serial0" or XEN_SERIAL_CONSOLES ?=
>     "/axi/serial@ff000000"
>     >> -XEN_SERIAL_CONSOLES ?= "serial0"
>     >> -
>     >> -# Specify additional Xen paramaters which will be appended to
>     xen-bootargs
>     >> -# This can alos be used for debugging purposes.
>     >> -# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all
>     guest_loglvl=debug"
>     >> -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"
>     >> --
>     >> 2.34.1
>     >>
>     >>
>     >>
>     >>
>
>
>
>
>
> -- 
> - Thou shalt not follow the NULL pointer, for chaos and madness await 
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8998):https://lists.yoctoproject.org/g/meta-virtualization/message/8998
> Mute This Topic:https://lists.yoctoproject.org/mt/109660021/8188369
> Group Owner:meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe:https://lists.yoctoproject.org/g/meta-virtualization/unsub [santraju@amd.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

[-- Attachment #2: Type: text/html, Size: 11155 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [meta-virtualization][master][PATCH 1/6] xen-u-boot-scr: Add bbclass for xen boot script variables
  2024-11-21 17:40       ` Gundlupet Raju, Sandeep
@ 2024-11-21 18:24         ` Bruce Ashfield
  0 siblings, 0 replies; 16+ messages in thread
From: Bruce Ashfield @ 2024-11-21 18:24 UTC (permalink / raw)
  To: Gundlupet Raju, Sandeep
  Cc: meta-virtualization, mark.hatle@kernel.crashing.org

[-- Attachment #1: Type: text/plain, Size: 5334 bytes --]

On Thu, Nov 21, 2024 at 12:40 PM Gundlupet Raju, Sandeep <
sandeep.gundlupet-raju@amd.com> wrote:

>
> On 11/21/2024 9:30 AM, Sandeep Gundlupet Raju via lists.yoctoproject.org
> wrote:
> >
> > On 11/20/2024 9:40 PM, Bruce Ashfield wrote:
> >> In message: [meta-virtualization][master][PATCH 1/6]  xen-u-boot-scr:
> >> Add bbclass for xen boot script variables
> >> on 18/11/2024 Sandeep Gundlupet Raju wrote:
> >>
> >>> Add a new bbclass for xen boot script variables. This bbclass provides
> >>> common xen u-boot boot script variables which can be inherited by any
> >>> vendor specific u-boot boot script recipes. Also these variable are
> >>> configurable from recipes, global and machine configuration files.
> >> This is this just for configuration, I'd prefer if the
> >> class was called: xen-uboot-scr-variables or xen-uboot-scr-configuration
> >>
> >> That way when I see it inherited from the recipes is it very clear
> >> what it will be providing.
> > [Sandeep]: Sounds good I will send a v2 patch with bbclass rename.
> [Sandeep]: Bruce, One more clarification we do recommend
> xen-uboot-scr-configuration or xen-u-boot-scr-configuration? Most of the
> Yocto u-boot recipes/bbclass has u-boot nomenclature and not uboot(no
> dash).
>

Either is ok with me. I find it reads better without the dash, and the
other similar classes in core have no dash:

./classes-recipe/uboot-config.bbclass
./classes-recipe/uboot-sign.bbclass

but u-boot itself uses the dash! So keep it with the dash if you like, I
won't fuss about it.

Bruce


> >>
> >> Bruce
> >>
> >>> Variable nomenclature is aligned with xen documentation.
> >>> https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
> >>>
> >>> Currently it supports Xen Dom0 boot and can be extended for DomU
> >>> or Dom0less boot.
> >>>
> >>> Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
> >>> ---
> >>>   classes-recipe/xen-u-boot-scr.bbclass | 43
> >>> +++++++++++++++++++++++++++
> >>>   1 file changed, 43 insertions(+)
> >>>   create mode 100644 classes-recipe/xen-u-boot-scr.bbclass
> >>>
> >>> diff --git a/classes-recipe/xen-u-boot-scr.bbclass
> >>> b/classes-recipe/xen-u-boot-scr.bbclass
> >>> new file mode 100644
> >>> index 00000000..df8287e1
> >>> --- /dev/null
> >>> +++ b/classes-recipe/xen-u-boot-scr.bbclass
> >>> @@ -0,0 +1,43 @@
> >>> +# Copyright (C) 2024, Advanced Micro Devices, Inc.  All rights
> >>> reserved.
> >>> +#
> >>> +# SPDX-License-Identifier: MIT
> >>> +#
> >>> +# This bbclass defines u-boot script variables required for xen
> >>> boot which can be
> >>> +# inherited u-boot boot scripts recipes and also allows to
> >>> configure these variables
> >>> +# from recipes, global and machine configurations files.
> >>> +
> >>> +# Variable nomenclature is aligned with
> >>> +# https://xenbits.xen.org/docs/unstable/misc/xen-command-line.html
> >>> +
> >>> +# Image Load Address for Xen Dom0 boot
> >>> +KERNEL_LOAD_ADDRESS ??= "0x00400000"
> >>> +XEN_LOAD_ADDRESS ??= "0x00200000"
> >>> +DEVICETREE_LOAD_ADDRESS ??= "0xC000000"
> >>> +RAMDISK_LOAD_ADDRESS ??= "0x2600000"
> >>> +
> >>> +# Xen boot image types.
> >>> +# KERNEL_IMAGETYPE: Specifies DomU kernel image file to be loaded
> >>> by u-boot.
> >>> +# XEN_IMAGETYPE: Specifies xen hypervisor binary to be loaded by
> >>> u-boot.
> >>> +#                Example: xen or xen.efi or xen.gz
> >>> +# DOM0_RAMDISK_IMAGETYPE: Specifies DOM0 ramdisk to be used,
> >>> Example: cpio.gz
> >>> +XEN_IMAGETYPE ??= "xen"
> >>> +DOM0_RAMDISK_IMAGETYPE ??= "rootfs.cpio.gz"
> >>> +
> >>> +# Set the amount of memory for dom0 depending on total available
> >>> memory size(DDR).
> >>> +DOM0_MEM ??= "256M"
> >>> +
> >>> +# Specify which UART console Xen should use. You can sepecify the
> >>> devicetree
> >>> +# alias or full path to a node in the devicetree
> >>> +# XEN_SERIAL_CONSOLES = "/soc/serial@7e215040" or
> >>> +# XEN_SERIAL_CONSOLES = "serial0" or
> >>> +# XEN_SERIAL_CONSOLES = "/axi/serial@ff000000"
> >>> +XEN_SERIAL_CONSOLES ??= "/soc/serial@7e215040"
> >>> +
> >>> +# Specify additional command line arguments used for Xen and this
> >>> will be appended
> >>> +# to xen-bootargs cariable. This can also be used for passing debug
> >>> cmd line arguments.
> >>> +# Examples: XEN_CMDLINE_APPEND ?= "sched=credit loglvl=all
> >>> guest_loglvl=debug"
> >>> +XEN_CMDLINE_APPEND ??= "sync_console bootscrub=0"
> >>> +
> >>> +# Specify the max number of vcpus for dom0
> >>> +# Example usage: DOM0_MAX_VCPUS = "2" or DOM0_MAX_VCPUS = "2-4"
> >>> +DOM0_MAX_VCPUS ??= "1"
> >>> --
> >>> 2.34.1
> >>>
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#8997):
> https://lists.yoctoproject.org/g/meta-virtualization/message/8997
> > Mute This Topic: https://lists.yoctoproject.org/mt/109660017/3619217
> > Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> > Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub
> [sandeep.gundlupet-raju@amd.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II

[-- Attachment #2: Type: text/html, Size: 8575 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-11-21 18:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19  5:11 [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Sandeep Gundlupet Raju
2024-11-19  5:11 ` [meta-virtualization][master][PATCH 1/6] xen-u-boot-scr: " Sandeep Gundlupet Raju
2024-11-21  4:40   ` Bruce Ashfield
2024-11-21 16:30     ` Gundlupet Raju, Sandeep
     [not found]     ` <180A08C7C2D5332A.23999@lists.yoctoproject.org>
2024-11-21 17:40       ` Gundlupet Raju, Sandeep
2024-11-21 18:24         ` Bruce Ashfield
2024-11-19  5:11 ` [meta-virtualization][master][PATCH 2/6] xen-rpi-u-boot-scr: Inherit xen-u-boot-scr bbclass Sandeep Gundlupet Raju
2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 3/6] xen-boot-env: Move xen variables to inc file Sandeep Gundlupet Raju
2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 4/6] u-boot-xlnx-scr: Include xen-boot-env if BOOTMODE is xen Sandeep Gundlupet Raju
2024-11-21  4:42   ` Bruce Ashfield
2024-11-21 16:28     ` Gundlupet Raju, Sandeep
2024-11-21 16:46       ` Bruce Ashfield
2024-11-21 17:44         ` Gundlupet Raju, Sandeep
2024-11-19  5:12 ` [meta-virtualization][master][scarthgap][styhead][PATCH 5/6] boot.cmd.xen: Add load address to echo messages Sandeep Gundlupet Raju
2024-11-19  5:12 ` [meta-virtualization][master][PATCH 6/6] xen-boot-env.inc: Inherit xen-u-boot-scr bbclass Sandeep Gundlupet Raju
2024-11-21  4:44 ` [meta-virtualization][master][scarthgap][styhead][PATCH 0/6] Add bbclass for xen boot script variables Bruce Ashfield

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.