[okl4-developer] okl4 in qemu emulated gumstix environment (fixed!! but...)
Jean-Christophe DUBOIS
jcd at tribudubois.net
Thu Aug 28 20:16:58 EST 2008
Just a thought...
As it seems you are still running 2 instances of linux, I am wondering how
you configured your Linux kernels. For example is it possible that the 2
linux instances try to do the PCI enumeration (or something similar.
Basically probing the hardware and trying to attach a driver) ? In this
case I think you could end up with some trouble.
As long as you access the hardware through an OKL4 server (like ig_serial)
everything is nice and the hardware can be shared. But if several
partitions try to handle the same hardware ...
This is obviously an interesting subject: How to manage hardware and
permission to the hardware for the various partitions? How to forbid
hardware access for some partition ...
Do you have the last message printed on the console before it freezes?
JC
On Thu, 28 Aug 2008 05:28:14 -0400, "Ashish Bijlani"
<ashish.bijlani at gmail.com> wrote:
> i found the problem. linux kernel sys_opens /dev/console before
> calling init in file "init/main.c". but "/etc/init.d/rcS" in rootfs
> deletes /dev/console and creates a new /dev/console in an attempt to
> change permissions. this breaks the link to /dev/console's inode that
> was installed previsouly in init's PCB/FCB because FS will assign a
> new inode to this newly created "/dev/console" hence i couldn't see
> any messages on serial once init would start. i was using okl4-2.1. it
> seems latest release of okl4 viz okl4-2.1.1-patch9 fixes this issue
> and code to delete /dev/console has been removed from new init.d/rcS
>
> however, the console/shell freezes after sometime. any ideas why?
> could this be because of another instance of ig_serial asi'm running
> two instances of wombat? how can i debug this?
>
> -ashish
>
> On Wed, Aug 27, 2008 at 2:11 AM, Geoffrey Lee <glee at ok-labs.com> wrote:
>> On Wed, Aug 27, 2008 at 01:50:45AM -0400, Ashish Bijlani wrote:
>>> my keystrokes are reaching ig_serial :
>>>
>>> NET: Registered protocol family 1
>>> NET: Registered protocol family 17
>>> NET: Registered protocol family 15
>>> 802.1Q VLAN Support v1.8 Big_serial [ig_serial_open] :end
>>> en Greear <greearb at candelatech.com>
>>> All bugs added by David S. Miller <davem at redhat.com>
>>> VFS: Mounted root (ext2 filesystem) readonly.
>>> ig_serial [ig_serial_open] :start
>>> vserial: init done (handle: 0, owner: 18001, mask: 2)
>>> ig_serial [ig_serial_open] :end
>>> ig_serial [ig_serial_open] :start
>>> ig_serial [ig_serial_open] :end
>>> ig_serial [ig_serial_open] :start
>>> ig_serial [ig_serial_open] :end
>>> ig_serial [ig_serial_open] :start
>>> ig_serial [ig_serial_open] :end
>>> ig_serial [ig_serial_write] :start
>>> ig_serial [ig_serial_write] :start
>>> ig_serial [ig_serial_write] :start
>>> --- KD# User: breakin ---
>>> > showqueue
>>> Key: (X) blocked, <X> on CPU, {X} halted, !X! aborted
>>>
>>> [255]: (roottask)
>>> [240]: (vtimer) (vrtc)
>>> [200]: (event)
>>> [110]: <vserial>
>>> [100]: (L_timer) (L_timer)
>>> [ 99]: (L_syscal) (L_syscal)
>>> [ 98]: (L_1) L_1 (L_52)
>>> idle : idle_thread
>>>
>>> > go
>>> ig_serial [ig_serial_interrupt] :start
>>> ig_serial [ig_serial_interrupt] :start
>>>
>>> what could be wrong now? should i pass console=ttyS0,115200n8 as
>>> kernel command line arguments? where would /dev/console point to
>>> without these args?
>>
>> Maybe your character is somehow not being passed down to the Linux
>> tty layer. The console= argument is not meaningful in this case,
>> the driver is in vserial and ig_serial is only a client
>> of vserial.
>>
>>>
>>> i tested qemu gumstix serial emulation with pflash and linux. it seems
>>> to be working fine.
>>
>> This is not sufficient, as it could still indicate an issue
>> with qemu emulation. The pxa serial driver used by vserial
>> is written from scratch and is different to the driver
>> used in native Linux.
>>
>>
>> -gl
>>
>>
>>>
>>> -ashish
>>>
>>> On Wed, Aug 27, 2008 at 12:14 AM, Ashish Bijlani
>>> <ashish.bijlani at gmail.com> wrote:
>>> > serial works fine on skyeye but network doesn't work because skyeye
> is
>>> > missing smc9x card emulation which is used by gumstix...i'll debug
>>> > serial handling in qemu...thanks geoff.
>>> >
>>> > -ashish
>>> >
>>> > On Wed, Aug 27, 2008 at 12:07 AM, Geoffrey Lee <glee at ok-labs.com>
> wrote:
>>> >> On Tue, Aug 26, 2008 at 11:52:10PM -0400, Ashish Bijlani wrote:
>>> >>> no i'm using the in-built ramdisk....i've not made any changes
>>> >>>
>>> >>
>>> >> We do testing on both skyeye and hardware, so ig_serial should
>>> >> be known to work. Is it possible for you to either do your
>>> >> work on skyeye or hardware? I am guessing there might
>>> >> be a possible issue with qemu's handling of the serial.
>>> >>
>>> >>
>>> >> -gl
>>> >>
>>> >>> On Tue, Aug 26, 2008 at 11:45 PM, Geoffrey Lee <glee at ok-labs.com>
> wrote:
>>> >>> > On Tue, Aug 26, 2008 at 11:20:36PM -0400, Ashish Bijlani wrote:
>>> >>> >> ig_serial fails to register in qemu emulated gumstix environemt.
> thats
>>> >>> >> why i don't get console over ttyS0. I get the following message:
>>> >>> >>
>>> >>> >> kobject_add failed for ttyS0 with -EEXIST
>>> >>> >
>>> >>> > I doubt that's the cause of your error, we see this message
>>> >>> > printed but the serial is fine for us.
>>> >>> >
>>> >>> >>
>>> >>> >> i'm running okl4-2.1.1 with "ttyS0::askfirst:-/bin/sh" in
>>> >>> >> /etc/inittab. any ideas why this error.
>>> >>> >
>>> >>> > Are you using the supplied ramdisk or are you using your own?
>>> >>> >
>>> >>> > -gl
>>> >>> >
>>> >>> >>
>>> >>> >> thanks,
>>> >>> >> ashish
>>> >>> >>
>>> >>> >> On Tue, Aug 26, 2008 at 8:17 PM, Geoffrey Lee <glee at ok-labs.com>
> wrote:
>>> >>> >> > On Tue, Aug 26, 2008 at 07:51:20AM -0400, Ashish Bijlani
> wrote:
>>> >>> >> >> thanks for the suggestion geoff. btw, how do you emulate net
> when
>>> >>> >> >> running on skyeye?
>>> >>> >> >
>>> >>> >> > I have not personally used the emulated networking support on
>>> >>> >> > skyeye before, so I am not sure what's the best way to go
> about it.
>>> >>> >> > They seem to have some README in the source tarball which
> documents
>>> >>> >> > this however.
>>> >>> >> >
>>> >>> >> >> -ashish
>>> >>> >> >
>>> >>> >> > -gl
>>> >>> >> >
>>> >>> >> >>
>>> >>> >> >> On Tue, Aug 26, 2008 at 7:43 AM, Geoffrey Lee
> <glee at ok-labs.com> wrote:
>>> >>> >> >> > On Tue, Aug 26, 2008 at 06:05:28AM -0400, Ashish Bijlani
> wrote:
>>> >>> >> >> >> The latest code doesn't have networking for gumstix.
> CONFIG_SMC is
>>> >>> >> >> >> missing in
> "linux/kernel-2.6.23-v2/l4linux_config_gumstix". Simply
>>> >>> >> >> >> adding CONFIG_SMC doesn't work in the latest code base.
>>> >>> >> >> >
>>> >>> >> >> >
>>> >>> >> >> > Generally to avoid missing dependencies and other things it
> is
>>> >>> >> >> > best to edit the configuration file with menuconfig or
> similar
>>> >>> >> >> > to modify the Linux configuration.
>>> >>> >> >> >
>>> >>> >> >> > My feeling is you may find it easier to forward port the
> bits required
>>> >>> >> >> > to make the SMC driver work than deal with the limitations
>>> >>> >> >> > of using an older OKL4 release.
>>> >>> >> >> >
>>> >>> >> >> > -gl
>>> >>> >> >> >
>>> >>> >> >> >>
>>> >>> >> >> >> -Ashish
>>> >>> >> >> >>
>>> >>> >> >> >> On Tue, Aug 26, 2008 at 6:02 AM, Geoffrey Lee
> <glee at ok-labs.com> wrote:
>>> >>> >> >> >> > On Tue, Aug 26, 2008 at 05:55:28AM -0400, Ashish Bijlani
> wrote:
>>> >>> >> >> >> >> I'm using okl4-1.4.1.1 and it doesn't seem to be having
> ig_serial
>>> >>> >> >> >> >> under "linux/kernel/arch/l4/drivers", however it has
> "l4e_console". Is
>>> >>> >> >> >> >> this normal? How do I enter KDB before executing
> /etc/init.d/rc?
>>> >>> >> >> >> >
>>> >>> >> >> >> > The serial driver in 1.4.1.1 is quite different to
> what's in the
>>> >>> >> >> >> > current release, hence it is normal not to find
> ig_serial.c. Best
>>> >>> >> >> >> > thing you can do is trace the execution path inside your
> driver.
>>> >>> >> >> >> >
>>> >>> >> >> >> > You can manually call L4_KDB_Enter() to enter the
> debugger.
>>> >>> >> >> >> >
>>> >>> >> >> >> > By the way is there any reason you cannot use a newer
> version of
>>> >>> >> >> >> > OKL4?
>>> >>> >> >> >> >
>>> >>> >> >> >> >
>>> >>> >> >> >> > -gl
>>> >>> >> >> >> >
>>> >>> >> >> >> >>
>>> >>> >> >> >> >> Thanks,
>>> >>> >> >> >> >> Ashish
>>> >>> >> >> >> >>
>>> >>> >> >> >> >> On Tue, Aug 26, 2008 at 5:49 AM, Geoffrey Lee
> <glee at ok-labs.com> wrote:
>>> >>> >> >> >> >> > On Tue, Aug 26, 2008 at 05:43:51AM -0400, Ashish
> Bijlani wrote:
>>> >>> >> >> >> >> >> Thanks for your quick reply. However, I'm using
> okl4-1.4 and I didn't
>>> >>> >> >> >> >> >> change anything in it. I get shell using skyeye but
> no network as
>>> >>> >> >> >> >> >> skyeye does not emulate smc91x network card. I don't
> get shell in
>>> >>> >> >> >> >> >> qemu. The face that it runs fine on skyeye,
> indicates that ig_serial
>>> >>> >> >> >> >> >> has been configured properly, isn't it?
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> > Not necessarily, the simulator may sometimes behave
> differently
>>> >>> >> >> >> >> > to how the hardware really behaves. Please have a
> look around
>>> >>> >> >> >> >> > the system to see if there are any clues of
> misbehavior, for
>>> >>> >> >> >> >> > example, are you actually receiving any interrupts at
> all when
>>> >>> >> >> >> >> > you hit a key on the serial? Is the serial driver
> initialized
>>> >>> >> >> >> >> > properly, or if vserial is present on the system at
> all? Is there
>>> >>> >> >> >> >> > any interaction between the vserial and OK Linux?
> The KDB should be
>>> >>> >> >> >> >> > quite helpful here.
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> > -gl
>>> >>> >> >> >> >> >>
>>> >>> >> >> >> >> >> -Ashish
>>> >>> >> >> >> >> >>
>>> >>> >> >> >> >> >> On Tue, Aug 26, 2008 at 5:39 AM, Geoffrey Lee
> <glee at ok-labs.com> wrote:
>>> >>> >> >> >> >> >> > On Tue, Aug 26, 2008 at 05:04:57AM -0400, Ashish
> Bijlani wrote:
>>> >>> >> >> >> >> >> >> Hi,
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >> I'm able to boot OKL4 in QEMU emulated gumstix
> environment. However,
>>> >>> >> >> >> >> >> >> I'm not able to get "Linux user startup!" and
> following messages on
>>> >>> >> >> >> >> >> >> the qemu serial console. Any ideas why?
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >> This is what I did:
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >> cp build/image.boot /tftpboot/.
>>> >>> >> >> >> >> >> >> ../qemu-gumstix/arm-softmmu/qemu-system-arm -M
> gumstix -hda
>>> >>> >> >> >> >> >> >> ../connex-gumstix/flash -net nic -net
> tap,ifname=qtap0 -m 256
>>> >>> >> >> >> >> >> >> -monitor null -serial stdio -m 289 -nographic
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >> GUM>
>>> >>> >> >> >> >> >> >> GUM> setenv ipaddr 10.0.0.231
>>> >>> >> >> >> >> >> >> GUM> setenv serverip 10.0.0.29
>>> >>> >> >> >> >> >> >> GUM> tftpboot a2000000 image.boot
>>> >>> >> >> >> >> >> >> GUM> bootelf a2000000
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >> The OKL4 kernel, wombat, iguana everything is
> loaded and booted
>>> >>> >> >> >> >> >> >> properly. However, I don't see any messages after
> :
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >> NET: Registered protocol family 15
>>> >>> >> >> >> >> >> >> VFS: Mounted root (ext2 filesystem) readonly.
>>> >>> >> >> >> >> >> >
>>> >>> >> >> >> >> >> > This probably means ig_serial.c or the user-level
> serial driver
>>> >>> >> >> >> >> >> > in drivers/ is misconfigured. The kernel bootup
> messages get
>>> >>> >> >> >> >> >> > shown via the KDB console, which gets routed to
> the driver
>>> >>> >> >> >> >> >> > in the OKL4 kernel. Once you get to Linux user
> startup
>>> >>> >> >> >> >> >> > output gets routed through /dev/ttyS0, which is
> backed by
>>> >>> >> >> >> >> >> > ig_serial.
>>> >>> >> >> >> >> >> >
>>> >>> >> >> >> >> >> > -gl
>>> >>> >> >> >> >> >> >
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >> Am I missing something?
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >> Thanks,
>>> >>> >> >> >> >> >> >> Ashish
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >> _______________________________________________
>>> >>> >> >> >> >> >> >> Developer mailing list
>>> >>> >> >> >> >> >> >> Developer at okl4.org
>>> >>> >> >> >> >> >> >> https://lists.okl4.org/mailman/listinfo/developer
>>> >>> >> >> >> >> >> >>
>>> >>> >> >> >> >> >> >
>>> >>> >> >> >> >> >> > --
>>> >>> >> >> >> >> >> >
>>> >>> >> >> >> >> >> >
>>> >>> >> >> >> >> >>
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> > --
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >> >
>>> >>> >> >> >> >>
>>> >>> >> >> >> >
>>> >>> >> >> >> > --
>>> >>> >> >> >> >
>>> >>> >> >> >> >
>>> >>> >> >> >>
>>> >>> >> >> >
>>> >>> >> >> > --
>>> >>> >> >> >
>>> >>> >> >> >
>>> >>> >> >>
>>> >>> >> >
>>> >>> >> > --
>>> >>> >> >
>>> >>> >> >
>>> >>> >>
>>> >>> >
>>> >>> > --
>>> >>> >
>>> >>> >
>>> >>>
>>> >>
>>> >> --
>>> >>
>>> >>
>>> >
>>>
>>
>> --
>>
>>
>
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
More information about the Developer
mailing list