Hello,
I am trying to boot xen on qemu arm. I was able to boot Linux kernel
with u-boot:
~/bin/qemu-3.1.0/arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine
virt -m 256M -bios u-boot.bin -device
loader,file=zImage,force-raw=on,addr=0x41000000 -nographic -no-reboot
-chardev
socket,id=qemu-monitor,host=localhost,port=7777,server,nowait,telnet
-mon qemu-monitor,mode=readline
Then, in u-boot:
setenv bootargs root=/dev/ram rw earlyprintk=serial,ttyAMA0 console=ttyAMA0
bootz 0x41000000 - 0x40000000
So, I use a device tree from this machine's default location - 0x40000000
After that, I produced an image:
mkimage -A arm -T kernel -a 0x46000000 -e 0x46000000 -C none -d
"xen/xen" xen-uImage
And tried to launch it:
~/bin/qemu-3.1.0/arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine
virt -m 512M -bios u-boot.bin -device
loader,file=xen-uImage,force-raw=on,addr=0x41000000 -device
loader,file=zImage,addr=0x45000000 -nographic -no-reboot -chardev
socket,id=qemu-monitor,host=localhost,port=7777,server,nowait,telnet
-mon qemu-monitor,mode=readline
So, I put xen image to 0x41000000 and Linux zImage to 0x45000000. I want
to use qemu's default device tree in 0x40000000.
In u-boot:
fdt addr 0x40000000
fdt resize
fdt set /chosen \#address-cells <1>
fdt set /chosen \#size-cells <1>
fdt set /chosen xen,xen-bootargs "console=dtuart dtuart="/pl011@9000000""
fdt mknod /chosen module@0
fdt set /chosen/module@0 compatible "xen,linux-zimage"
"xen,multiboot-module"
fdt set /chosen/module@0 reg <0x45000000 0x853200 >
fdt set /chosen/module@0 bootargs "earlyprintk=serial,ttyAMA0
console=ttyAMA0,115200n8 earlycon=xenboot"
bootm 0x41000000 - 0x40000000
And I get the output:
## Booting kernel from Legacy Image at 41000000 ...
Image Name:
Created: 2019-06-02 10:16:13 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 753672 Bytes = 736 KiB
Load Address: 46000000
Entry Point: 46000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 40000000
Booting using the fdt blob at 0x40000000
Loading Kernel Image ... OK
reserving fdt memory region: addr=40000000 size=2000
Using Device Tree in place at 40000000, end 40004fff
Starting kernel ...
And I have no output after that.
I don't understand several things:
Where should I put xen-uImage, kernel and fdt? I assume they are loaded
to ram to the specified addresses (ram is from 0x40000000). Can I use a
default QEMU device tree in 0x40000000 or should I load the one
generated by u-boot with the command:
~/bin/qemu-3.1.0/arm-softmmu/qemu-system-arm -machine virt,gic_version=3 -machine virtualization=true -cpu cortex-a15 -machine type=virt -m 512 -display none -machine dumpdtb=virt.dtb
Also, we have created a node /chosen/module@0. Where can I find its description? What is it?
--
Regards, Denis Obrezkov
I am trying to boot xen on qemu arm. I was able to boot Linux kernel
with u-boot:
~/bin/qemu-3.1.0/arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine
virt -m 256M -bios u-boot.bin -device
loader,file=zImage,force-raw=on,addr=0x41000000 -nographic -no-reboot
-chardev
socket,id=qemu-monitor,host=localhost,port=7777,server,nowait,telnet
-mon qemu-monitor,mode=readline
Then, in u-boot:
setenv bootargs root=/dev/ram rw earlyprintk=serial,ttyAMA0 console=ttyAMA0
bootz 0x41000000 - 0x40000000
So, I use a device tree from this machine's default location - 0x40000000
After that, I produced an image:
mkimage -A arm -T kernel -a 0x46000000 -e 0x46000000 -C none -d
"xen/xen" xen-uImage
And tried to launch it:
~/bin/qemu-3.1.0/arm-softmmu/qemu-system-arm -cpu cortex-a15 -machine
virt -m 512M -bios u-boot.bin -device
loader,file=xen-uImage,force-raw=on,addr=0x41000000 -device
loader,file=zImage,addr=0x45000000 -nographic -no-reboot -chardev
socket,id=qemu-monitor,host=localhost,port=7777,server,nowait,telnet
-mon qemu-monitor,mode=readline
So, I put xen image to 0x41000000 and Linux zImage to 0x45000000. I want
to use qemu's default device tree in 0x40000000.
In u-boot:
fdt addr 0x40000000
fdt resize
fdt set /chosen \#address-cells <1>
fdt set /chosen \#size-cells <1>
fdt set /chosen xen,xen-bootargs "console=dtuart dtuart="/pl011@9000000""
fdt mknod /chosen module@0
fdt set /chosen/module@0 compatible "xen,linux-zimage"
"xen,multiboot-module"
fdt set /chosen/module@0 reg <0x45000000 0x853200 >
fdt set /chosen/module@0 bootargs "earlyprintk=serial,ttyAMA0
console=ttyAMA0,115200n8 earlycon=xenboot"
bootm 0x41000000 - 0x40000000
And I get the output:
## Booting kernel from Legacy Image at 41000000 ...
Image Name:
Created: 2019-06-02 10:16:13 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 753672 Bytes = 736 KiB
Load Address: 46000000
Entry Point: 46000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 40000000
Booting using the fdt blob at 0x40000000
Loading Kernel Image ... OK
reserving fdt memory region: addr=40000000 size=2000
Using Device Tree in place at 40000000, end 40004fff
Starting kernel ...
And I have no output after that.
I don't understand several things:
Where should I put xen-uImage, kernel and fdt? I assume they are loaded
to ram to the specified addresses (ram is from 0x40000000). Can I use a
default QEMU device tree in 0x40000000 or should I load the one
generated by u-boot with the command:
~/bin/qemu-3.1.0/arm-softmmu/qemu-system-arm -machine virt,gic_version=3 -machine virtualization=true -cpu cortex-a15 -machine type=virt -m 512 -display none -machine dumpdtb=virt.dtb
Also, we have created a node /chosen/module@0. Where can I find its description? What is it?
--
Regards, Denis Obrezkov