[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-users
Subject:    Re: [Xen-users] How to build Mini-OS for ARM
From:       Denis Obrezkov <denisobrezkov () gmail ! com>
Date:       2019-06-07 15:16:52
Message-ID: CAGPpAzVd8pviyv8r7DTXoEa-ORkhv9pRvQfL1rBEpAyO=zPfkw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


пт, 7 июн. 2019 г. в 17:09, <iain@hunterembedded.co.uk>:

> Denis,
> In your ramdisk do you have /sbin/init present? It is normally a symlink
> to systemd executable or is itself the executable that manages start up.
> Iain
>
> Yes, in my case it is a symlink to the busybox binary. Julien suggested to
use console=hvc0 and it worked.

> -----Original Message-----
> From: Julien Grall <julien.grall@arm.com>
> Sent: 07 June 2019 16:06
> To: Denis Obrezkov <denisobrezkov@gmail.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>; Iain Hunter <
> iain@hunterembedded.co.uk>; Hunyue Yau <hy-gsoc@hy-research.com>;
> julien.grall@foss.arm.com; xen-users@lists.xenproject.org
> Subject: Re: How to build Mini-OS for ARM
>
> Hi Denis,
>
> On 07/06/2019 15:58, Denis Obrezkov wrote:
> > I have a bit of troubles with ramdisk.
> >
> > I tried to build busybox and to load it, and it worked.
>
> Do you mean using Linux baremetal?
>
> >
> > 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"
>
> The UART is owned by Xen and cannot be used by Dom0. Instead we provide a
> para-virtualized console. So console=ttyAMA0,115200n8 should be replaced by
> console=hvc0.
>
> > 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.
>
> The lack of console=hvc0 might explain this warning and potentially the
> fact you can't access the shell.
>
> > [    3.496941] Freeing unused kernel memory: 1344K [    3.505723] Run
> > /sbin/init as init process
>
> Cheers,
>
> --
> Julien Grall
>
>

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">пт, 7 \
июн. 2019 г. в 17:09, &lt;<a \
href="mailto:iain@hunterembedded.co.uk">iain@hunterembedded.co.uk</a>&gt;:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">Denis,<br> In your ramdisk do you have /sbin/init \
present? It is normally a symlink to systemd executable or is itself the executable \
that manages start up.<br> Iain<br>
<br></blockquote><div>Yes, in my case it is a symlink to the busybox binary. Julien \
suggested to use console=hvc0 and it worked. <br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
                rgb(204,204,204);padding-left:1ex">
-----Original Message-----<br>
From: Julien Grall &lt;<a href="mailto:julien.grall@arm.com" \
                target="_blank">julien.grall@arm.com</a>&gt; <br>
Sent: 07 June 2019 16:06<br>
To: Denis Obrezkov &lt;<a href="mailto:denisobrezkov@gmail.com" \
                target="_blank">denisobrezkov@gmail.com</a>&gt;<br>
Cc: Stefano Stabellini &lt;<a href="mailto:sstabellini@kernel.org" \
target="_blank">sstabellini@kernel.org</a>&gt;; Iain Hunter &lt;<a \
href="mailto:iain@hunterembedded.co.uk" \
target="_blank">iain@hunterembedded.co.uk</a>&gt;; Hunyue Yau &lt;<a \
href="mailto:hy-gsoc@hy-research.com" \
target="_blank">hy-gsoc@hy-research.com</a>&gt;; <a \
href="mailto:julien.grall@foss.arm.com" \
target="_blank">julien.grall@foss.arm.com</a>; <a \
href="mailto:xen-users@lists.xenproject.org" \
                target="_blank">xen-users@lists.xenproject.org</a><br>
Subject: Re: How to build Mini-OS for ARM<br>
<br>
Hi Denis,<br>
<br>
On 07/06/2019 15:58, Denis Obrezkov wrote:<br>
&gt; I have a bit of troubles with ramdisk.<br>
&gt; <br>
&gt; I tried to build busybox and to load it, and it worked.<br>
<br>
Do you mean using Linux baremetal?<br>
<br>
&gt; <br>
&gt; But when I try to boot it this way:<br>
&gt; qemu-system-aarch64   -machine virt,gic_version=3 -machine <br>
&gt; virtualization=true -cpu cortex-a57 -machine type=virt -m 4096 -smp 4 <br>
&gt; -bios u-boot.bin -device<br>
&gt; loader,file=xen,force-raw=on,addr=0x49000000 -device<br>
&gt; loader,file=Image.gz,addr=0x47000000 -device<br>
&gt; loader,file=virt-gicv3.dtb,addr=0x44000000 -device<br>
&gt; loader,file=rootfs.img.gz,addr=0x42000000 -nographic -no-reboot <br>
&gt; -chardev <br>
&gt; socket,id=qemu-monitor,host=localhost,port=7777,server,nowait,telnet <br>
&gt; -mon qemu-monitor,mode=readline<br>
&gt; <br>
&gt; and pass:<br>
&gt; <br>
&gt; fdt addr 0x44000000<br>
&gt; fdt resize<br>
&gt; <br>
&gt; fdt set /chosen \#address-cells &lt;1&gt;<br>
&gt; fdt set /chosen \#size-cells &lt;1&gt;<br>
&gt; <br>
&gt; <br>
&gt; fdt mknod /chosen module@0<br>
&gt; fdt set /chosen/module@0 compatible &quot;xen,linux-zimage&quot; \
&quot;xen,multiboot-module&quot;<br> &gt; fdt set /chosen/module@0 reg &lt;0x47000000 \
0x7F31CE&gt;<br> &gt; fdt set /chosen/module@0 bootargs &quot;rw root=/dev/ram \
rdinit=/sbin/init     <br> &gt; earlyprintk=serial,ttyAMA0 console=ttyAMA0,115200n8 \
earlycon=xenboot&quot;<br> <br>
The UART is owned by Xen and cannot be used by Dom0. Instead we provide a \
para-virtualized console. So console=ttyAMA0,115200n8 should be replaced by \
console=hvc0.<br> <br>
&gt; fdt mknod /chosen module@1<br>
&gt; fdt set /chosen/module@1 compatible &quot;xen,linux-initrd&quot; \
&quot;xen,multiboot-module&quot;<br> &gt; fdt set /chosen/module@1 reg &lt;0x42000000 \
0x121e65&gt;<br> &gt; <br>
&gt; booti 0x49000000 - 0x44000000<br>
&gt; <br>
&gt; I can see that it successfully boots till the very end but the input <br>
&gt; prompt doesn&#39;t appear. The last lines are:<br>
&gt; [      3.415854]     No soundcards found.<br>
&gt; [      3.417458] Warning: unable to open an initial console.<br>
<br>
The lack of console=hvc0 might explain this warning and potentially the fact you \
can&#39;t access the shell.<br> <br>
&gt; [      3.496941] Freeing unused kernel memory: 1344K [      3.505723] Run <br>
&gt; /sbin/init as init process<br>
<br>
Cheers,<br>
<br>
--<br>
Julien Grall<br>
<br>
</blockquote></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic