|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Viryaos-discuss] [ImageBuilder] [PATCH 1/2] uboot-script-gen: Skip dom0 instead of exiting if DOM0_KERNEL is not set
On 6/23/22 13:01, Ayan Kumar Halder wrote: (Resending mail, as the previous delivery failed) On 21/06/2022 11:57, Ayan Kumar Halder wrote:1. In README.md, please mention in 'DOM0_KERNEL' description that it is an optional parameter. When user does not provide this, it generates a dom0less configuration. Sure. This patch has been already merged upstream so I will do with a follow-on patch. 2. In uboot-script-gen, please provide a check like this :- if test -z "$DOM0_KERNEL" thenif test "DOM0_MEM" || "DOM0_VCPUS" || "DOM0_COLORS" || "DOM0_CMD" || "DOM0_RAMDISK" || "DOM0_ROOTFS"thenecho "For Domoless configuration, "DOM0_MEM" || "DOM0_VCPUS" || "DOM0_COLORS" || "DOM0_CMD" || "DOM0_RAMDISK" || "DOM0_ROOTFS" should not be definedexit 1 fi fiThe reason is that user should not be allowed to provide with an incorrect configuration. Sure. I will do with a follow-on patch. 3. Please test the patch for both dom0 and dom0less. The reason being such a change might break something. :)- Ayan On 19/06/2022 13:43, Xenia Ragiadakou wrote:When the parameter DOM0_KERNEL is not specified and NUM_DOMUS is not 0, instead of failing the script, just skip any dom0 specific setup. This way the script can be used to boot XEN in dom0less mode. Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx> ---scripts/uboot-script-gen | 60 ++++++++++++++++++++++++++++------------1 file changed, 43 insertions(+), 17 deletions(-) diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen index 455b4c0..bdc8a6b 100755 --- a/scripts/uboot-script-gen +++ b/scripts/uboot-script-gen @@ -168,10 +168,15 @@ function xen_device_tree_editing() dt_set "/chosen" "#address-cells" "hex" "0x2" dt_set "/chosen" "#size-cells" "hex" "0x2" dt_set "/chosen" "xen,xen-bootargs" "str" "$XEN_CMD" - dt_mknode "/chosen" "dom0"- dt_set "/chosen/dom0" "compatible" "str_a" "xen,linux-zimage xen,multiboot-module multiboot,module" - dt_set "/chosen/dom0" "reg" "hex" "0x0 $dom0_kernel_addr 0x0 $(printf "0x%x" $dom0_kernel_size)"- dt_set "/chosen" "xen,dom0-bootargs" "str" "$DOM0_CMD" + + if test "$DOM0_KERNEL" + then + dt_mknode "/chosen" "dom0"+ dt_set "/chosen/dom0" "compatible" "str_a" "xen,linux-zimage xen,multiboot-module multiboot,module" + dt_set "/chosen/dom0" "reg" "hex" "0x0 $dom0_kernel_addr 0x0 $(printf "0x%x" $dom0_kernel_size)"+ dt_set "/chosen" "xen,dom0-bootargs" "str" "$DOM0_CMD" + fi + if test "$DOM0_RAMDISK" && test $ramdisk_addr != "-" then dt_mknode "/chosen" "dom0-ramdisk" @@ -203,7 +208,10 @@ function xen_device_tree_editing()add_device_tree_static_mem "/chosen/domU$i" "${DOMU_STATIC_MEM[$i]}"
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |