aboutsummaryrefslogtreecommitdiff
path: root/scripts/uboot-script-gen
diff options
context:
space:
mode:
authorStefano Stabellini2021-04-16 11:49:44 -0700
committerStefano Stabellini2021-05-17 14:50:59 -0700
commit95ba62e9aeff32a7e00a4e7888b88ffa71fdd9d3 (patch)
tree136c48cf91b17d151e4f7c2e4f37a9eb8123eaa6 /scripts/uboot-script-gen
parenta2f45232345c4e111651e3f809a3da8fd95f05bf (diff)
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 <stefano.stabellini@xilinx.com> Reviewed-by: Brian Woods <brian.woods@xilinx.com>
Diffstat (limited to 'scripts/uboot-script-gen')
-rwxr-xr-xscripts/uboot-script-gen20
1 files changed, 14 insertions, 6 deletions
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]}