I have a bit of troubles with ramdisk.
I tried to build busybox and to load it, and it worked.
But when I try to boot it this way:
qemu-system-aarch64 -machine virt,gic_version=3 -machine
virtualization=true -cpu cortex-a57 -machine type=virt -m 4096 -smp 4 -bios
u-boot.bin -device loader,file=xen,force-raw=on,addr=0x49000000 -device
loader,file=Image.gz,addr=0x47000000 -device
loader,file=virt-gicv3.dtb,addr=0x44000000 -device
loader,file=rootfs.img.gz,addr=0x42000000 -nographic -no-reboot -chardev
socket,id=qemu-monitor,host=localhost,port=7777,server,nowait,telnet -mon
qemu-monitor,mode=readline
and pass:
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 0x7F31CE>
fdt set /chosen/module@0 bootargs "rw root=/dev/ram rdinit=/sbin/init
earlyprintk=serial,ttyAMA0 console=ttyAMA0,115200n8 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 0x121e65>
booti 0x49000000 - 0x44000000
I can see that it successfully boots till the very end but the input prompt
doesn't appear. The last lines are:
[ 3.415854] No soundcards found.
[ 3.417458] Warning: unable to open an initial console.
[ 3.496941] Freeing unused kernel memory: 1344K
[ 3.505723] Run /sbin/init as init process
What should I pass as a parameter to the kernel?
??, 6 ???. 2019 ?. ? 12:29, Julien Grall <julien.grall@arm.com>:
> Hi Denis,
>
> On 06/06/2019 11:04, Denis Obrezkov wrote:
> > You are right, I again forgot to change the size of the image in the
> device tree
> > and used the size of a Image.gz.
> > When I changed it to the Image's size it started to work.
> > I think I want to automate it and pass the script to u-boot with
> automatically
> > calculated size.
> If you are interested, I wrote a U-boot script for the Foundation Model
> [1]. I
> think it could be easily adapted for QEMU.
>
> IIRC, in your configuration, files are already loaded in memory. So you
> would
> not be able to find out the size easily from U-boot. However, you could
> generate
> the u-boot script everytime before booting QEMU. So the size match your
> Image.
>
> Alternatively, you can use tftp to download your images (this may be your
> preferred way for the BB-X15). When you do that, U-boot will store the
> size of
> the file download in hex in $filesize. I vaguely remember some issue with
> this
> variable because, depending on your U-boot configuration, the variable
> value or
> may not start 0x.
>
> >
> > Could you propose what I should do next? I get to the point when Dom0
> crashes
> > when trying to mount rootfs because I don't provide it.
> > Should I investigate how other interrupt controllers are supported in
> xen?
>
> This would be a good start. Feel free to ask any question if you have any
> doubt
> on the code.
>
> I would recommend to use the branch staging for all the investigations.
>
> Cheers,
>
> [1] https://pastebin.com/fJwapFbY
>
> --
> Julien Grall
>