From 95ba62e9aeff32a7e00a4e7888b88ffa71fdd9d3 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Fri, 16 Apr 2021 11:49:44 -0700 Subject: uboot-script-gen: skip DomUs with rootfs instead of exiting Also introduce a new DOMU_NOBOOT option to force a domU not to be started automatically at boot as dom0less guest. Signed-off-by: Stefano Stabellini Reviewed-by: Brian Woods --- scripts/uboot-script-gen | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'scripts/uboot-script-gen') diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen index d878bf6..57cce22 100755 --- a/scripts/uboot-script-gen +++ b/scripts/uboot-script-gen @@ -82,6 +82,11 @@ function device_tree_editing() i=0 while test $i -lt $NUM_DOMUS do + if test "${DOMU_ROOTFS[$i]}" || test "${DOMU_NOBOOT[$i]}" + then + i=$(( $i + 1 )) + continue + fi echo "fdt mknod /chosen domU$i" >> $UBOOT_SOURCE echo "fdt set /chosen/domU$i compatible \"xen,domain\"" >> $UBOOT_SOURCE echo "fdt set /chosen/domU$i \#address-cells <0x2>" >> $UBOOT_SOURCE @@ -323,12 +328,6 @@ do then DOMU_VCPUS[$i]=1 fi - if test "${DOMU_ROOTFS[$i]}" - then - echo "Cannot handle non-ramdisk rootfses for dom0less VMs." - echo "DomUs with rootfses on disk need to be created from dom0 using xl." - exit 1 - fi i=$(( $i + 1 )) done @@ -371,6 +370,15 @@ fi i=0 while test $i -lt $NUM_DOMUS do + if test "${DOMU_ROOTFS[$i]}" || test "${DOMU_NOBOOT[$i]}" + then + if test -z "${DOMU_NOBOOT[$i]}" + then + echo "Skipping DomU[$i]: cannot handle non-ramdisk rootfs for dom0less VMs." + fi + i=$(( $i + 1 )) + continue + fi check_compressed_file_type ${DOMU_KERNEL[$i]} "executable" domU_kernel_addr[$i]=$memaddr load_file ${DOMU_KERNEL[$i]} -- cgit v1.2.3