From 3780f67696f4b95efda0a2c3d8405ba85128632c Mon Sep 17 00:00:00 2001 From: Ayan Kumar Halder Date: Thu, 20 Jan 2022 11:11:42 +0000 Subject: Specify the memory and virtual cpu count for DOM0 Introduced the new config options :- DOM0_MEM - To specify the amount of memory (in MB) that is assigned to Dom0. DOM0_VCPUS - To specify the count of virtual CPUs for Dom0. These options are used to set XEN_CMD. Signed-off-by: Ayan Kumar Halder Reviewed-by: Stefano Stabellini Signed-off-by: Stefano Stabellini --- scripts/uboot-script-gen | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'scripts/uboot-script-gen') diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen index 71669a9..84faf6c 100755 --- a/scripts/uboot-script-gen +++ b/scripts/uboot-script-gen @@ -313,7 +313,23 @@ function xen_config() { if [ -z "$XEN_CMD" ] then - XEN_CMD="console=dtuart dtuart=serial0 dom0_mem=1G dom0_max_vcpus=1 bootscrub=0 vwfi=native sched=null" + if [ -z "$DOM0_MEM" ] + then + DOM0_MEM="1024" + fi + + if [ -z "$DOM0_VCPUS" ] + then + DOM0_VCPUS="1" + fi + + XEN_CMD="console=dtuart dtuart=serial0 dom0_mem=${DOM0_MEM}M dom0_max_vcpus=${DOM0_VCPUS} bootscrub=0 vwfi=native sched=null" + else + if [ "$DOM0_MEM" ] || [ "$DOM0_VCPUS" ] + then + echo "One can specify either XEN_CMD or (DOM0_MEM and/or DOM0_VCPUS)" + exit + fi fi if [ -z "$DOM0_CMD" ] -- cgit v1.2.3