aboutsummaryrefslogtreecommitdiff
path: root/scripts/uboot-script-gen
diff options
context:
space:
mode:
authorStefano Stabellini2020-10-30 15:55:23 -0700
committerStefano Stabellini2020-11-04 13:44:48 -0800
commit04f503477ced16176f7db24f363e6378c2ac528b (patch)
treed9018c8db8b46188be7dbd47c3dde023309c367f /scripts/uboot-script-gen
parent6e1ece2b59a0b8037f4244a3df2b50534eae2942 (diff)
Add DOMU_MEM and DOMU_VCPUS
Add two new config file parameters to configure the amount of memory and the number of vcpus of dom0less VMs. 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-gen18
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index f176e1a..ef26da1 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -86,8 +86,8 @@ function device_tree_editing()
echo "fdt set /chosen/domU$i compatible \"xen,domain\"" >> $UBOOT_SOURCE
echo "fdt set /chosen/domU$i \#address-cells <0x2>" >> $UBOOT_SOURCE
echo "fdt set /chosen/domU$i \#size-cells <0x2>" >> $UBOOT_SOURCE
- echo "fdt set /chosen/domU$i memory <0x0 0x40000>" >> $UBOOT_SOURCE
- echo "fdt set /chosen/domU$i cpus <0x1>" >> $UBOOT_SOURCE
+ echo "fdt set /chosen/domU$i memory <0x0 "${DOMU_MEM[$i]}">" >> $UBOOT_SOURCE
+ echo "fdt set /chosen/domU$i cpus <"${DOMU_VCPUS[$i]}">" >> $UBOOT_SOURCE
echo "fdt set /chosen/domU$i vpl011 <0x1>" >> $UBOOT_SOURCE
add_device_tree_kernel "/chosen/domU$i" ${domU_kernel_addr[$i]} ${domU_kernel_size[$i]}
if test "${domU_ramdisk_addr[$i]}"
@@ -279,6 +279,20 @@ then
DOM0_CMD="$DOM0_CMD root=/dev/sda2"
fi
fi
+i=0
+while test $i -lt $NUM_DOMUS
+do
+ if test -z "${DOMU_MEM[$i]}"
+ then
+ DOMU_MEM[$i]=512
+ fi
+ DOMU_MEM[$i]=$((${DOMU_MEM[$i]} * 1024))
+ if test -z "${DOMU_VCPUS[$i]}"
+ then
+ DOMU_VCPUS[$i]=1
+ fi
+ i=$(( $i + 1 ))
+done
# the cd is needed so that the relative paths will match once we use
# tftp or move the files to a partition