All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher Clark" <christopher.w.clark@gmail.com>
To: meta-virtualization@lists.yoctoproject.org
Cc: cardoe@gentoo.org, bruce.ashfield@gmail.com, bertrand.marquis@arm.com
Subject: [meta-virtualization][PATCH 7/8] xen, rpi4: move rpi4-machine+xen-distro cfg into dynamic layer
Date: Sat, 24 Apr 2021 01:31:02 -0700	[thread overview]
Message-ID: <20210424083103.202107-8-christopher.w.clark@gmail.com> (raw)
In-Reply-To: <20210424083103.202107-1-christopher.w.clark@gmail.com>

Improve meta-virt-xen.inc by moving all the Raspberry Pi 4 config
settings to a new xen-raspberrypi4-64.inc file in the raspberrypi
dynamic layer.

The new .inc file is included only for the raspberrypi4-64 MACHINE,
so the config settings no longer need to be applied using overrides.

Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com>
---
 conf/distro/include/meta-virt-xen.inc         | 22 ++++--------------
 .../distro/include/xen-raspberrypi4-64.inc    | 23 +++++++++++++++++++
 2 files changed, 28 insertions(+), 17 deletions(-)
 create mode 100644 dynamic-layers/raspberrypi/conf/distro/include/xen-raspberrypi4-64.inc

diff --git a/conf/distro/include/meta-virt-xen.inc b/conf/distro/include/meta-virt-xen.inc
index 584cd6e..02a7810 100644
--- a/conf/distro/include/meta-virt-xen.inc
+++ b/conf/distro/include/meta-virt-xen.inc
@@ -5,20 +5,8 @@ PACKAGECONFIG_append_pn-qemu = " xen"
 PACKAGECONFIG_append_pn-qemu_arm = " fdt"
 PACKAGECONFIG_append_pn-qemu_aarch64 = " fdt"
 
-# Raspberry Pi settings
-# Xen uses u-boot for configuration and uses the uart
-RPI_USE_U_BOOT_raspberrypi4-64 = "1"
-ENABLE_UART_raspberrypi4-64 = "1"
-# Build the bootable SD card image
-IMAGE_CLASSES_append_raspberrypi4-64 = " sdcard_image-rpi"
-IMAGE_FSTYPES_append_raspberrypi4-64 = " rpi-sdimg"
-# Add Xen to the bootable SD card image
-RPI_SDIMG_EXTRA_DEPENDS_append_raspberrypi4-64 = " xen:do_deploy"
-DEPLOYPAYLOAD_raspberrypi4-64 = "xen-${MACHINE}:xen"
-# We need the GIC enabled for Xen to work
-RPI_EXTRA_CONFIG_append_raspberrypi4-64  = "\nenable_gic=1"
-# Increase boot partition for space for kernel and Xen
-BOOT_SPACE_raspberrypi4-64 = "61440"
-# Override the meta-raspberrypi default kernel preference
-PREFERRED_PROVIDER_virtual/kernel_raspberrypi4-64 ?= "linux-yocto"
-KERNEL_DEVICETREE_raspberrypi4-64 ?= "broadcom/bcm2711-rpi-4-b.dtb"
+# Xen on Raspberry Pi 4 64-bit support
+XEN_RPI4_64_CONFIG_PATH ??= \
+    'dynamic-layers/raspberrypi/conf/distro/include/xen-raspberrypi4-64.inc'
+include ${@bb.utils.contains('MACHINE', 'raspberrypi4-64', \
+    '${XEN_RPI4_64_CONFIG_PATH}', '', d)}
diff --git a/dynamic-layers/raspberrypi/conf/distro/include/xen-raspberrypi4-64.inc b/dynamic-layers/raspberrypi/conf/distro/include/xen-raspberrypi4-64.inc
new file mode 100644
index 0000000..9c36255
--- /dev/null
+++ b/dynamic-layers/raspberrypi/conf/distro/include/xen-raspberrypi4-64.inc
@@ -0,0 +1,23 @@
+# Xen on Raspberry Pi 4 settings
+
+# Xen uses u-boot for configuration and uses the uart
+RPI_USE_U_BOOT = "1"
+ENABLE_UART = "1"
+
+# Build the bootable SD card image
+IMAGE_CLASSES_append = " sdcard_image-rpi"
+IMAGE_FSTYPES_append = " rpi-sdimg"
+
+# Add Xen to the bootable SD card image
+RPI_SDIMG_EXTRA_DEPENDS_append = " xen:do_deploy"
+DEPLOYPAYLOAD = "xen-${MACHINE}:xen"
+
+# We need the GIC enabled for Xen to work
+RPI_EXTRA_CONFIG_append  = "\nenable_gic=1"
+
+# Increase boot partition for space for kernel and Xen
+BOOT_SPACE = "61440"
+
+# Override the meta-raspberrypi default kernel preference
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
+KERNEL_DEVICETREE ?= "broadcom/bcm2711-rpi-4-b.dtb"
-- 
2.25.1


  parent reply	other threads:[~2021-04-24  8:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24  8:30 [meta-virtualization][PATCH 0/8] Xen and Yocto Linux on Raspberry Pi 4 Christopher Clark
2021-04-24  8:30 ` [meta-virtualization][PATCH 1/8] xen, rpi4: use the preferred generic multiboot,module compatible string Christopher Clark
2021-04-24  8:30 ` [meta-virtualization][PATCH 2/8] xen, rpi4: drop the raspberrypi4-64 defconfig, xen_git.bbappend Christopher Clark
2021-04-24  8:30 ` [meta-virtualization][PATCH 3/8] xen, rpi4, linux-yocto: enable linux-yocto 5.10 for RPi4 Christopher Clark
2021-04-24  8:30 ` [meta-virtualization][PATCH 4/8] xen, rpi4: switch Xen-on-Rpi4 kernel preference to linux-yocto Christopher Clark
2021-04-24  8:31 ` [meta-virtualization][PATCH 5/8] xen, rpi4: fix u-boot script to load binaries from boot partition Christopher Clark
2021-04-24  8:31 ` [meta-virtualization][PATCH 6/8] xen, rpi4: apply workaround to fix crash on boot with Xen 4.14 Christopher Clark
2021-04-24  8:31 ` Christopher Clark [this message]
2021-04-24  8:31 ` [meta-virtualization][PATCH 8/8] xen, rpi4: add xen-rpi-u-boot-scr recipe for default u-boot script Christopher Clark
2021-04-28  2:54 ` [meta-virtualization][PATCH 0/8] Xen and Yocto Linux on Raspberry Pi 4 Bruce Ashfield
2021-04-28  8:34   ` Bertrand Marquis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210424083103.202107-8-christopher.w.clark@gmail.com \
    --to=christopher.w.clark@gmail.com \
    --cc=bertrand.marquis@arm.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=cardoe@gentoo.org \
    --cc=meta-virtualization@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.