Hello All, After a few months of hiatus, we have resumed working on mips port of Xen. We are at the point of booting dom0 userland (init process and its children). The init process gets spawned and in turn forks off processes to run commands in /etc/rc.d/init.d/rcS. However, the getty process does not seem to run subsequently and hence the login prompt is not displayed. Dom 0 does not use the uart and uses the hvc0 driver. I searched the web for hints and there were suggestions to add directives such as 1:2345:respawn:/sbin/getty 38400 hvc0 to /etc/inittab file. But that does not seem to help. Could you please give any pointers to get getty talk to the console driver correctly ? Screenshot of the tail ------------------------------- 0:<6>console [hvc0] enabled, bootconsole disabled 0:<6>console [hvc0] enabled, bootconsole disabled 0:Delay calibration in progress: 0:<6>Calibrating delay using timer specific routine.. 0:<c>3211.14 BogoMIPS (lpj=1605570) 0:<6>Security Framework initialized 0:Mount-cache hash table entries: 4096 0:Checking for the daddi bug... 0:no. 0:<6>NET: Registered protocol family 16 Booting paravirtualized kernel on Xen 0:<6>Xen version: 3.4.0 (dom0) ... init started: BusyBox v1.14.0 (2009-05-01 15:38:41 PDT) Mounting all Filesystems... ... mounting done <at this point cpu_idle() gets called and the processor waits indefinitely in a wait state> thank you, Prasad. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, 2011-10-06 at 01:05 +0100, Prasad B wrote:> Hello All, > > After a few months of hiatus, we have resumed working on mips port of > Xen. We are at the point of booting dom0 userland (init process and > its children).That sounds awesome! Are you close to having any initial patches for submission?> The init process gets spawned and in turn forks off processes to run > commands in /etc/rc.d/init.d/rcS. However, the getty process does not > seem to run subsequently and hence the login prompt is not displayed. > Dom 0 does not use the uart and uses the hvc0 driver. > > I searched the web for hints and there were suggestions to add > directives such as > > 1:2345:respawn:/sbin/getty 38400 hvc0 > > to /etc/inittab file. But that does not seem to help. > > Could you please give any pointers to get getty talk to the console > driver correctly ?Do you have something which is creating the actual /dev/hvc0 node? You can probably boot with init=/bin/sh in order to get a shell to poke around and check this with, run the getty by hand etc. I had a vague recollection that the busybox inittab syntax was a little different to standard sysvinit but google threw up various things which suggest that what you''ve got is OK. Are you maybe in runlevel 1? You could try changing the 2345->12345 to be sure. You probably want this getty in single user mode anyway. Alternatively lots of example busybox configurations I see on google seems to omit the runlevels, which I guess means "all"? Ian.> > Screenshot of the tail > ------------------------------- > > 0:<6>console [hvc0] enabled, bootconsole disabled > 0:<6>console [hvc0] enabled, bootconsole disabled > 0:Delay calibration in progress: > 0:<6>Calibrating delay using timer specific routine.. 0:<c>3211.14 > BogoMIPS (lpj=1605570) > 0:<6>Security Framework initialized > 0:Mount-cache hash table entries: 4096 > 0:Checking for the daddi bug... 0:no. > 0:<6>NET: Registered protocol family 16 > Booting paravirtualized kernel on Xen 0:<6>Xen version: 3.4.0 (dom0) > > ... > > init started: BusyBox v1.14.0 (2009-05-01 15:38:41 PDT) > Mounting all Filesystems... > ... mounting done > > <at this point cpu_idle() gets called and the processor waits > indefinitely in a wait state> > > thank you, > Prasad._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Oct 5, 2011 at 11:54 PM, Ian Campbell <Ian.Campbell@citrix.com>wrote:> > After a few months of hiatus, we have resumed working on mips port of > > Xen. We are at the point of booting dom0 userland (init process and > > its children). > > That sounds awesome! Are you close to having any initial patches for > submission? >We are working with 3.4.0 which is really old. So, we would like to run a few heavyweight applications on Linux, forward port our MIPS changes to 4.1.0 and then submit the patches along with our PV Linux. We are using 2.6.34 Linux kernel and have not been working with pvops interface. So, there might have to be some collective effort to move our MIPS Linux changes into the pvops framework.> > The init process gets spawned and in turn forks off processes to run > > commands in /etc/rc.d/init.d/rcS. However, the getty process does not > > seem to run subsequently and hence the login prompt is not displayed. > > Dom 0 does not use the uart and uses the hvc0 driver. > > > > I searched the web for hints and there were suggestions to add > > directives such as > > > > 1:2345:respawn:/sbin/getty 38400 hvc0 > > > > to /etc/inittab file. But that does not seem to help. > > > > Could you please give any pointers to get getty talk to the console > > driver correctly ? > > Do you have something which is creating the actual /dev/hvc0 node? You > can probably boot with init=/bin/sh in order to get a shell to poke > around and check this with, run the getty by hand etc. >replacing /sbin/init with /bin/sh displays the following output: "BusyBox v1.14.0 (2009-05-01 15:38:41 PDT) built-in shell (ash) Enter ''help'' for a list of built-in commands. /bin/sh: can''t access tty; job control turned of" and input/commands could not be fed to the shell. I had a vague recollection that the busybox inittab syntax was a little> different to standard sysvinit but google threw up various things which > suggest that what you''ve got is OK. Are you maybe in runlevel 1? You > could try changing the 2345->12345 to be sure. You probably want this > getty in single user mode anyway. Alternatively lots of example busybox > configurations I see on google seems to omit the runlevels, which I > guess means "all"? >created an hvc device in /dev and played with different runlevels. But getty process is either dormant or dead and the cpu_idle() function kicks in. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Sat, 2011-10-08 at 03:22 +0100, Prasad B wrote:> On Wed, Oct 5, 2011 at 11:54 PM, Ian Campbell > <Ian.Campbell@citrix.com> wrote: > > After a few months of hiatus, we have resumed working on > mips port of > > Xen. We are at the point of booting dom0 userland (init > process and > > its children). > > > That sounds awesome! Are you close to having any initial > patches for > submission? > > We are working with 3.4.0 which is really old. So, we would like to > run a few heavyweight applications on Linux, forward port our MIPS > changes to 4.1.0 and then submit the patches along with our PV Linux. > We are using 2.6.34 Linux kernel and have not been working with pvops > interface. So, there might have to be some collective effort to move > our MIPS Linux changes into the pvops framework. > > > > > The init process gets spawned and in turn forks off > processes to run > > commands in /etc/rc.d/init.d/rcS. However, the getty process > does not > > seem to run subsequently and hence the login prompt is not > displayed. > > Dom 0 does not use the uart and uses the hvc0 driver. > > > > I searched the web for hints and there were suggestions to > add > > directives such as > > > > 1:2345:respawn:/sbin/getty 38400 hvc0 > > > > to /etc/inittab file. But that does not seem to help. > > > > Could you please give any pointers to get getty talk to the > console > > driver correctly ? > > > Do you have something which is creating the actual /dev/hvc0 > node? You > can probably boot with init=/bin/sh in order to get a shell to > poke > around and check this with, run the getty by hand etc. > > replacing /sbin/init with /bin/sh displays the following output: > > "BusyBox v1.14.0 (2009-05-01 15:38:41 PDT) built-in shell (ash) > Enter ''help'' for a list of built-in commands. > > /bin/sh: can''t access tty; job control turned of" > > and input/commands could not be fed to the shell. > > > I had a vague recollection that the busybox inittab syntax was > a little > different to standard sysvinit but google threw up various > things which > suggest that what you''ve got is OK. Are you maybe in runlevel > 1? You > could try changing the 2345->12345 to be sure. You probably > want this > getty in single user mode anyway. Alternatively lots of > example busybox > configurations I see on google seems to omit the runlevels, > which I > guess means "all"? > > created an hvc device in /dev and played with different runlevels. But > getty process is either dormant or dead and the cpu_idle() function > kicks in.I''m afraid I''ve not got any real ideas. Do you think that event channels are working correctly? In particular you will need to be able to receive VIRQ_CONSOLE. Hopefully the stuff in drivers/tty/hvc/hvc_xen.c:xen_hvc_init is taking the correct xen_initial_domain paths and not the domU ones. I think this must be correct, or you wouldn''t get any output at all, but adding a printk or two to confirm might be handy. I''m not 100% sure but it looks like passing xen_irq == -1 to hvc_alloc might force things into a polled mode? That might be a useful debugging step. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2011-11-16 at 00:59 +0000, Prasad B wrote:> One question as we work on domU. What is the console infrastructure > used to connect to domU ? To login into domU and see domU''s output. > From what I gather, "xl" itself is capable of attaching to a domain''s > console and used for IO. So, "xl" is all is needed to talk to domU ?xl just execs /usr/lib/xen/bin/xenconsole to talk to the console. xenconsole is just a client for xenconsoled which is the daemon which actually consumes guest consoles. The source for both is in tools/console. My memory is fuzzy but IIRC the toolstack writes the keys /local/domain/<DOMID>/console/{ring-ref,port} to xenstore which xenconsoled picks up in order to communicate with the domain. The guest gets its end of things from the startinfo. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Nov 16, 2011 at 8:08 AM, Ian Campbell <Ian.Campbell@citrix.com>wrote:> xl just execs /usr/lib/xen/bin/xenconsole to talk to the console. > > xenconsole is just a client for xenconsoled which is the daemon which > actually consumes guest consoles. The source for both is in > tools/console. > > My memory is fuzzy but IIRC the toolstack writes the > keys /local/domain/<DOMID>/console/{ring-ref,port} to xenstore which > xenconsoled picks up in order to communicate with the domain. The guest > gets its end of things from the startinfo. >Thanks Ian. We currently have both dom0 and domU versions of MIPS Linux up and running. However, we are in the process of connecting to domU through xenconsole. In the interim, domU too uses dom0 console functions and so the bootup process of domU could be seen. When domU''s console functions are switched to write to the domU console page, domU output (after early printk usage) could not be read through "xl console <domId>" command. The sequence of commands are xenstored -D xenconsoled xl create domU.config xl console 1 It was ensured that domU console page and its event channel descriptor were allocated correctly in domU. Is there anything else that needs to be plumb the connection between dom0 and domU ? Could any other controlled test be run to ensure that all the required steps are done ? thank you, Prasad. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2011-11-30 at 01:34 +0000, Prasad B wrote:> On Wed, Nov 16, 2011 at 8:08 AM, Ian Campbell > <Ian.Campbell@citrix.com> wrote: > > xl just execs /usr/lib/xen/bin/xenconsole to talk to the > console. > > xenconsole is just a client for xenconsoled which is the > daemon which > actually consumes guest consoles. The source for both is in > tools/console. > > My memory is fuzzy but IIRC the toolstack writes the > keys /local/domain/<DOMID>/console/{ring-ref,port} to xenstore > which > xenconsoled picks up in order to communicate with the domain. > The guest > gets its end of things from the startinfo. > > Thanks Ian. We currently have both dom0 and domU versions of MIPS > Linux up and running. However, we are in the process of connecting to > domU through xenconsole. In the interim, domU too uses dom0 console > functions and so the bootup process of domU could be seen. When domU''s > console functions are switched to write to the domU console page, domU > output (after early printk usage) could not be read through "xl > console <domId>" command. The sequence of commands are > > xenstored -D > xenconsoled > xl create domU.config > xl console 1 > > It was ensured that domU console page and its event channel descriptor > were allocated correctly in domU.By allocated do you mean picked up out of the start info? The console mfn and evtchn for a pv guest are allocated by the builder and put into the start info rather than the guest making them up/allocating them itself. You should also see mention of them in /local/domain/<domid>/console, esp port == evtchn and ring-ref == mfn (I think) those should match what you pickup within the guest. What does "xenstore-ls -fp" show?> Is there anything else that needs to be plumb the connection between > dom0 and domU ? Could any other controlled test be run to ensure that > all the required steps are done ?You might be able to adapt tools/misc/xen-ringwatch or write your own simple dom0 utility using libxc to dump the content of the shared ring, to check if data is making it in there. Running strace on xencoosled ought to show it polling on /dev/xen/evtch, waking and doing a read to receive the evtchn notifications but to be sure you could also instrument drivers/xen/xen-evtchn.c in dom0 to check if anything was being received/delivered to userspace. Ian.
Seemingly Similar Threads
- Xen 4.0 - No console prompt after booting domU but functional SSH
- xenconsole: Could not read tty from store: No such file or directory
- Problems with booting Debian DomU
- what''s wrong with my pv domU console? INIT: Id "1" respawning too fast: disabled for 5 minutes
- /dev/hvc0: No such file or directory