diff options
Diffstat (limited to 'dynamic-layers')
17 files changed, 535 insertions, 0 deletions
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 00000000..2d5a167c --- /dev/null +++ b/dynamic-layers/raspberrypi/conf/distro/include/xen-raspberrypi4-64.inc @@ -0,0 +1,25 @@ +# 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" + +PREFERRED_PROVIDER_u-boot-default-script ?= "xen-rpi-u-boot-scr" 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 new file mode 100644 index 00000000..98742200 --- /dev/null +++ b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/files/boot.cmd.xen.in @@ -0,0 +1,58 @@ +# Set the fdt address to what came from the GPU, so we can edit it +fdt addr ${fdt_addr} + +# Pull the bootargs that the GPU has edited +fdt get value bootargs /chosen bootargs + +# Set module load addresses +setenv xen_loadaddr "0x00200000" +setenv kernel_loadaddr "0x00400000" + +# 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@@" + +echo Add a dom0 node to chosen to put Linux boot information in +fdt mknode /chosen dom0 + +echo Set this for the Linux boot command +fdt set /chosen/dom0 compatible "multiboot,module" + +# Tell Xen where PCI is +fdt set /scb/pcie@7d500000 device_type "pci" +# Workaround to fix: +# "Unable to retrieve address 0 for /scb/pcie@7d500000/pci@1,0/usb@1,0" +fdt rm /scb/pcie@7d500000/pci@1,0/usb@1,0 + +echo Delay to allow the MMC card to be ready +sleep 1 + +# Retrieve PARTUUID for the rootfs partition of the sdcard +part uuid mmc 1:2 rootfs_partuuid + +echo Add boot arguments for dom0 +setenv dom0_bootargs "console=hvc0 earlycon=xenboot debug root=PARTUUID=${rootfs_partuuid} rootwait" +fdt set /chosen xen,dom0-bootargs \"${dom0_bootargs}\" + +echo Load Xen into memory +fatload mmc 1:1 ${xen_loadaddr} xen +echo Xen loaded, size: 0x$filesize + +echo Load Linux kernel into memory +fatload mmc 1:1 ${kernel_loadaddr} Image +setenv kernel_size 0x$filesize +echo Linux loaded, size: 0x$filesize + +echo Set the address and size for the Linux kernel so Xen can pick it up +fdt set /chosen/dom0 reg <${kernel_loadaddr} ${kernel_size}> + +# Define the size and address cells +fdt set /chosen '#size-cells' <1> +fdt set /chosen '#address-cells' <1> + +# Display the chosen fdt section - can be important for debugging +fdt print /chosen + +echo Boot Xen +booti ${xen_loadaddr} - ${fdt_addr} 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 new file mode 100644 index 00000000..87619d01 --- /dev/null +++ b/dynamic-layers/raspberrypi/recipes-bsp/xen-rpi-u-boot-scr/xen-rpi-u-boot-scr.bb @@ -0,0 +1,34 @@ +SUMMARY = "U-boot boot script for Xen on Raspberry Pi 4" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +COMPATIBLE_MACHINE = "^raspberrypi4-64$" + +DEPENDS = "u-boot-mkimage-native" + +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/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \ + -e 's/@@RPI_DOM0_MEM@@/${RPI_DOM0_MEM}/' \ + -e 's/@@RPI_DEBUG_XEN_ARGS@@/${RPI_DEBUG_XEN_ARGS}/' \ + "${WORKDIR}/boot.cmd.xen.in" > "${WORKDIR}/boot.cmd" + + mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr +} + +inherit kernel-arch deploy nopackages + +do_deploy() { + install -d ${DEPLOYDIR} + install -m 0644 boot.scr ${DEPLOYDIR} +} + +addtask do_deploy after do_compile before do_build + +PROVIDES += "u-boot-default-script" diff --git a/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-yocto_6.6.bbappend b/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-yocto_6.6.bbappend new file mode 100644 index 00000000..2e2f92b6 --- /dev/null +++ b/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-yocto_6.6.bbappend @@ -0,0 +1,6 @@ +# Enable use of the linux-yocto kernel for the Raspberry Pi 4 +KBRANCH:raspberrypi4-64 ?= "v6.6/standard/bcm-2xxx-rpi" +KMACHINE:raspberrypi4-64 ?= "bcm-2xxx-rpi4" +COMPATIBLE_MACHINE:raspberrypi4-64 = "(raspberrypi4-64)" + +require linux-yocto_xen-rpi.inc diff --git a/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-yocto_xen-rpi.inc b/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-yocto_xen-rpi.inc new file mode 100644 index 00000000..e8c120d4 --- /dev/null +++ b/dynamic-layers/raspberrypi/recipes-kernel/linux/linux-yocto_xen-rpi.inc @@ -0,0 +1,6 @@ +# For a Xen-enabled distro on the Raspberry Pi, override the contents of cmdline.txt +# with Xen-on-ARM-specific command line options + +DEFAULT_CMDLINE := "${CMDLINE}" +XEN_LINUX_CMDLINE ?= "console=hvc0 clk_ignore_unused earlycon=xenboot debug root=/dev/mmcblk0p2 rootwait" +CMDLINE = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${XEN_LINUX_CMDLINE}', '${DEFAULT_CMDLINE}', d)}" diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/device-tree.bbappend b/dynamic-layers/xilinx/recipes-bsp/device-tree/device-tree.bbappend new file mode 100644 index 00000000..e2358262 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/device-tree.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +ENABLE_XEN_DTSI ?= "" +ENABLE_XEN_QEMU_DTSI ?= "" + +XEN_EXTRA_OVERLAYS = "" +XEN_EXTRA_QEMU_OVERLAYS = "" + +XEN_EXTRA_OVERLAYS:zynqmp = "zynqmp-xen.dtsi" +XEN_EXTRA_QEMU_OVERLAYS:zynqmp = "zynqmp-xen.dtsi zynqmp-xen-qemu.dtsi" + +XEN_EXTRA_OVERLAYS:versal = "versal-xen.dtsi" +XEN_EXTRA_QEMU_OVERLAYS:versal = "versal-xen.dtsi versal-xen-qemu.dtsi" + +XEN_EXTRA_OVERLAYS:versal-net = "versal-net-xen.dtsi" +XEN_EXTRA_QEMU_OVERLAYS:versal-net = "versal-net-xen.dtsi versal-net-xen-qemu.dtsi" + +EXTRA_OVERLAYS:append = "${@' ${XEN_EXTRA_OVERLAYS}' if d.getVar('ENABLE_XEN_DTSI') == '1' else ''}" +EXTRA_OVERLAYS:append = "${@' ${XEN_EXTRA_QEMU_OVERLAYS}' if d.getVar('ENABLE_XEN_QEMU_DTSI') == '1' else ''}" diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen-qemu.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen-qemu.dtsi new file mode 100644 index 00000000..336d7a25 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen-qemu.dtsi @@ -0,0 +1,2 @@ +/ { +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen.dtsi new file mode 100644 index 00000000..7da1f9f1 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-net-xen.dtsi @@ -0,0 +1,67 @@ +&smmu { + status = "okay"; +}; + +&adma0 { + iommus = <&smmu 0x210>; +}; + +&adma1 { + iommus = <&smmu 0x212>; +}; + +&adma2 { + iommus = <&smmu 0x214>; +}; + +&adma3 { + iommus = <&smmu 0x216>; +}; + +&adma4 { + iommus = <&smmu 0x218>; +}; + +&adma5 { + iommus = <&smmu 0x21a>; +}; + +&adma6 { + iommus = <&smmu 0x21c>; +}; + +&adma7 { + iommus = <&smmu 0x21e>; +}; + +&dwc3_0 { + iommus = <&smmu 0x230>; +}; + +&dwc3_1 { + iommus = <&smmu 0x232>; +}; + +&gem0 { + iommus = <&smmu 0x234>; +}; + +&gem1 { + iommus = <&smmu 0x235>; +}; + +&sdhci0 { + iommus = <&smmu 0x242>; +}; + +&sdhci1 { + iommus = <&smmu 0x243>; +}; + +&qspi { + iommus = <&smmu 0x244>; +}; + +&ospi { + iommus = <&smmu 0x245>; +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen-qemu.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen-qemu.dtsi new file mode 100644 index 00000000..336d7a25 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen-qemu.dtsi @@ -0,0 +1,2 @@ +/ { +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen.dtsi new file mode 100644 index 00000000..6782e925 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/versal-xen.dtsi @@ -0,0 +1,59 @@ +&smmu { + status = "okay"; +}; + +&gem0 { + iommus = <&smmu 0x234>; +}; + +&gem1 { + iommus = <&smmu 0x235>; +}; + +&dwc3_0 { + iommus = <&smmu 0x230>; +}; + +&qspi { + iommus = <&smmu 0x244>; +}; + +&lpd_dma_chan0 { + iommus = <&smmu 0x210>; +}; + +&lpd_dma_chan1 { + iommus = <&smmu 0x212>; +}; + +&lpd_dma_chan2 { + iommus = <&smmu 0x214>; +}; + +&lpd_dma_chan3 { + iommus = <&smmu 0x216>; +}; + +&lpd_dma_chan4 { + iommus = <&smmu 0x218>; +}; + +&lpd_dma_chan5 { + iommus = <&smmu 0x21a>; +}; + +&lpd_dma_chan6 { + iommus = <&smmu 0x21c>; +}; + +&lpd_dma_chan7 { + iommus = <&smmu 0x21e>; +}; + +&sdhci0 { + iommus = <&smmu 0x242>; +}; + +&sdhci1 { + iommus = <&smmu 0x243>; +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen-qemu.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen-qemu.dtsi new file mode 100644 index 00000000..336d7a25 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen-qemu.dtsi @@ -0,0 +1,2 @@ +/ { +}; diff --git a/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen.dtsi b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen.dtsi new file mode 100644 index 00000000..3d75be65 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/device-tree/files/zynqmp-xen.dtsi @@ -0,0 +1,123 @@ +&smmu { + status = "okay"; +}; + +&gem0 { + iommus = <&smmu 0x874>; +}; + +&gem1 { + iommus = <&smmu 0x875>; +}; + +&gem2 { + iommus = <&smmu 0x876>; +}; + +&gem3 { + iommus = <&smmu 0x877>; +}; + +&dwc3_0 { + iommus = <&smmu 0x860>; +}; + +&dwc3_1 { + iommus = <&smmu 0x861>; +}; + +&qspi { + iommus = <&smmu 0x873>; +}; + +&lpd_dma_chan1 { + iommus = <&smmu 0x868>; +}; + +&lpd_dma_chan2 { + iommus = <&smmu 0x869>; +}; + +&lpd_dma_chan3 { + iommus = <&smmu 0x86a>; +}; + +&lpd_dma_chan4 { + iommus = <&smmu 0x86b>; +}; + +&lpd_dma_chan5 { + iommus = <&smmu 0x86c>; +}; + +&lpd_dma_chan6 { + iommus = <&smmu 0x86d>; +}; + +&lpd_dma_chan7 { + iommus = <&smmu 0x86e>; +}; + +&lpd_dma_chan8 { + iommus = <&smmu 0x86f>; +}; + +&fpd_dma_chan1 { + iommus = <&smmu 0x14e8>; +}; + +&fpd_dma_chan2 { + iommus = <&smmu 0x14e9>; +}; + +&fpd_dma_chan3 { + iommus = <&smmu 0x14ea>; +}; + +&fpd_dma_chan4 { + iommus = <&smmu 0x14eb>; +}; + +&fpd_dma_chan5 { + iommus = <&smmu 0x14ec>; +}; + +&fpd_dma_chan6 { + iommus = <&smmu 0x14ed>; +}; + +&fpd_dma_chan7 { + iommus = <&smmu 0x14ee>; +}; + +&fpd_dma_chan8 { + iommus = <&smmu 0x14ef>; +}; + +&sdhci0 { + iommus = <&smmu 0x870>; +}; + +&sdhci1 { + iommus = <&smmu 0x871>; +}; + +&nand0 { + iommus = <&smmu 0x872>; +}; + +&pcie { + iommus = <&smmu 0x4d0>; +}; + +&zynqmp_dpsub { + iommus = <&smmu 0xce3>; +}; + +&zynqmp_dpdma { + iommus = <&smmu 0xce4>; +}; + +&sata { + iommus = <&smmu 0x4c0>, <&smmu 0x4c1>, <&smmu 0x4c2>, <&smmu 0x4c3>; +}; 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 new file mode 100644 index 00000000..ae847cbc --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr.bbappend @@ -0,0 +1,2 @@ +# Include xen-boot-cmd.inc only if xen distro features is enabled. +include ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen-boot-cmd.inc', '', d)} 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 new file mode 100644 index 00000000..25e5842c --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.xen @@ -0,0 +1,80 @@ +# This is a boot script for U-Boot with Xen parameters used by yocto machine +# configuration file. +# Generate boot.scr: +# mkimage -c none -A arm -T script -d boot.cmd.xen boot.scr +# +################ +xen_name=@@XEN_IMAGE_NAME@@ +kernel_name=@@KERNEL_IMAGE@@ +rootfs_name=@@RAMDISK_IMAGE@@ +@@PRE_BOOTENV@@ + +for boot_target in ${boot_targets}; +do + echo "Trying to load boot images from ${boot_target}" + if test "${boot_target}" = "jtag" ; then + tftpboot @@KERNEL_LOAD_ADDRESS@@ ${kernel_name} + setenv kernel_size 0x$filesize; + tftpboot @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name} + setenv ramdisk_size 0x$filesize; + tftpboot @@XEN_LOAD_ADDRESS@@ ${xen_name} + tftpboot @@DEVICETREE_ADDRESS@@ system.dtb + fi + if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1" || test "${boot_target}" = "usb0" || test "${boot_target}" = "usb1"; then + if test "${boot_target}" = "mmc0" || test "${boot_target}" = "mmc1"; then + setenv bootdev mmcblk${devnum}p + fi + if test "${boot_target}" = "usb0" || test "${boot_target}" = "usb1"; then + setenv bootdev sda + fi + echo "Checking for /${xen_name}" + if test -e ${devtype} ${devnum}:${distro_bootpart} /${xen_name}; then + echo "Loading ${xen_name}"; + 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}"; + 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"; + 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}"; + fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; + setenv ramdisk_size 0x$filesize; + fi + fi + fdt addr @@DEVICETREE_ADDRESS@@ + fdt resize 0x1000 + fdt get value bootargs /chosen bootargs + fdt set /chosen \#address-cells <0x2> + fdt set /chosen \#size-cells <0x2> + setenv xen_bootargs "console=dtuart dtuart=@@XEN_SERIAL_CONSOLES@@ dom0_mem=@@DOM0_MEM@@ dom0_max_vcpus=@@DOM0_MAX_VCPUS@@ bootscrub=0 vwfi=native @@XEN_CMDLINE_APPEND@@" + fdt set /chosen xen,xen-bootargs \"${xen_bootargs}\" + + # Check that env $ramdisk_size is 0 or not. + if test -n ${ramdisk_size}; then + fdt mknod /chosen dom0-ramdisk + fdt set /chosen/dom0-ramdisk compatible "xen,linux-initrd" "xen,multiboot-module" "multiboot,module" + fdt set /chosen/dom0-ramdisk reg <0x0 @@RAMDISK_IMAGE_ADDRESS@@ 0x0 ${ramdisk_size}> + setenv rootfs_param @@KERNEL_ROOT_RAMDISK@@ + else + setenv rootfs_param @@KERNEL_ROOT_SD@@ + fi + + fdt mknod /chosen dom0 + fdt set /chosen/dom0 compatible "xen,linux-zimage" "xen,multiboot-module" "multiboot,module" + fdt set /chosen/dom0 reg <0x0 @@KERNEL_LOAD_ADDRESS@@ 0x0 ${kernel_size}> + setenv dom0_bootargs "console=hvc0 earlycon=xen earlyprintk=xen clk_ignore_unused ${rootfs_param}" + fdt set /chosen xen,dom0-bootargs \"${dom0_bootargs}\" + + setenv fdt_high 0xffffffffffffffff + + @@KERNEL_BOOTCMD@@ @@XEN_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ +done 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 new file mode 100644 index 00000000..7a4e41a6 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-bsp/u-boot/xen-boot-cmd.inc @@ -0,0 +1,38 @@ +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" diff --git a/dynamic-layers/xilinx/recipes-extended/xen/xen-xilinx.inc b/dynamic-layers/xilinx/recipes-extended/xen/xen-xilinx.inc new file mode 100644 index 00000000..18215572 --- /dev/null +++ b/dynamic-layers/xilinx/recipes-extended/xen/xen-xilinx.inc @@ -0,0 +1,11 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +DEPENDS += "u-boot-mkimage-native" +DEPENDS += "dtc-native" + +XENIMAGE_KERNEL_LOADADDRESS ?= "0x6000000" +do_deploy:append() { + if [ -f ${DEPLOYDIR}/xen-${MACHINE} ]; then + uboot-mkimage -A arm64 -T kernel -a ${XENIMAGE_KERNEL_LOADADDRESS} -e ${XENIMAGE_KERNEL_LOADADDRESS} -C none -d ${DEPLOYDIR}/xen-${MACHINE} ${DEPLOYDIR}/xen.ub + fi +} diff --git a/dynamic-layers/xilinx/recipes-extended/xen/xen_%.bbappend b/dynamic-layers/xilinx/recipes-extended/xen/xen_%.bbappend new file mode 100644 index 00000000..54edd1ba --- /dev/null +++ b/dynamic-layers/xilinx/recipes-extended/xen/xen_%.bbappend @@ -0,0 +1 @@ +include xen-xilinx.inc |