[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] How to boot domU and dom0 from a device tree



On Mon, 10 Jun 2019, Denis Obrezkov wrote:
> Hello,
> 
> I  am trying to boot domU from a device tree. I want to use the same
> ramdisk and kernel image as for dom0. These are my u-boot commands:
> 
> fdt addr 0x44000000
> fdt resize
> fdt set /chosen \#address-cells <1>
> fdt set /chosen \#size-cells <1>
> fdt mknod /chosen module@0
> fdt set /chosen/module@0 compatible "xen,linux-zimage"
> "xen,multiboot-module"
> fdt set /chosen/module@0 reg <0x47000000 0x7cc561>
> fdt set /chosen/module@0 bootargs "rw root=/dev/ram rdinit=/sbin/init  
> earlyprintk=serial,ttyAMA0 console=hvc0 earlycon=xenboot"
> fdt mknod /chosen module@1
> fdt set /chosen/module@1 compatible "xen,linux-initrd"
> "xen,multiboot-module"
> fdt set /chosen/module@1 reg <0x42000000 0x11b680>
> 
> fdt mknod /chosen domU1
> fdt set /chosen/domU1 compatible "xen,domain"
> fdt set /chosen/domU1 \#address-cells <1>
> fdt set /chosen/domU1 \#size-cells <1>
> 
> fdt mknod /chosen/domU1 module@0
> fdt set /chosen/domU1/module@0 compatible "xen,linux-zimage"
> "xen,multiboot-module"
> fdt set /chosen/domU1/module@0 reg <0x47000000 0x7cc561>
> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram
> rdinit=/sbin/init console=hvc0 earlycon=xenboot"
> 
> fdt mknod /chosen/domU1 module@1
> fdt set /chosen/domU1/module@1 compatible "xen,linux-initrd"
> "xen,multiboot-module"
> fdt set /chosen/domU1/module@1 reg <0x42000000 0x11b680>

At least initially for debugging you want to also add a "vpl011" node
under /chosen/domU1 and pass console=ttyAMA0 in the DomU kernel command
line to have early output from the dom0less VMs. Make sure to enable the
pl011 uart driver in the kernel config for domU.

Also, make sure all the addresses are not overlapping. For instance:

0x42000000+0x11b680 => 0x4211b680 has to be less than 0x47000000

I don't see a problem here, but in general overlapping addresses is a
very common source of problems.


> booti 0x49000000 - 0x44000000
> 
> I got: 
> 
> ....
> 
> (XEN) *** LOADING DOMAIN 0 ***
> (XEN) Missing kernel boot module?
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) Could not set up DOM0 guest OS
> (XEN) ****************************************
> (XEN)
> (XEN) Reboot in five seconds...
> 
> I wasn't able to find instructions on how to run domU and dom0 images
> simultaneously.
> 
> -- 
> Regards, Denis Obrezkov
> 
> 
> 
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.