All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Alex Nikitenko <alexzoidbergnikitenko@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] "How to Adapt ARM I-pipe patch to S3C6410" - still not solved
Date: Tue, 31 Jan 2012 18:44:29 +0100	[thread overview]
Message-ID: <4F28287D.7090804@domain.hid> (raw)
In-Reply-To: <CAJp2OCMk4tp5b5KKxBn7a2akAhbjpOamnx0StaNsohpp5c3wkQ@mail.gmail.com>

On 01/31/2012 05:49 PM, Alex Nikitenko wrote:
> Sorry for that mess.
> 
> I'm trying to adapt adeos-ipipe-2.6.35.9-arm-1.18-03.patch to a S3C6410
> (Tiny6410 board) with kernel ver. 2.6.36 in order to run xenomai on this
> board.
> 
> The problem is that the boot process hangs not entering the
> start_kernel() function.
> I used printascii at arch/arm/kernel/head.S to trace the execution. It
> hangs just before calling start_kernel(). But ONLY with CONFIG_IPIPE
> enabled.
> If I disable this config everything boots just fine.
> 
> I also used printk("some string") at the very begining of start_kernel().
> If CONFIG_IPIPE not set - string is printed out and kernel boots.
> If CONFIG_IPIPE  - hang after calling start_kernel.
> So, printascii works well on mz hardware.

If you are indeed using printk and not printascii this does not prove
that printascii works, and that you have successfully enabled the
earlyprintk mechanism.

When linux boots on arm, when the serial console is enabled, the
backlog, everything which has been printed before with printk, is
printed. If the kernel fails before enabling the console, nothing is
printed, but it does not mean that the kernel did not go farther than
your first printk.

The cure is to use printascii. I am not sure printascii works in head.S,
I believe it does, but you can:
- use printascii for some traces you would like to add (for instance in
ipipe_mach_acktimer to see if the timer is ticking)
- add a call to printascii in printk.c right after the call to
vscnprintf. If you do this, when the console is enabled, everything is
printed twice.
- enable CONFIG_EARLY_PRINTK in addition to CONFIG_DEBUG_LL, and pass
"earlyprintk" on the kernel command line. This will cause the printks
before console is enabled to use printascii, and then switch to the real
console.

You should make sure that printascii indeed works for your platform
without CONFIG_IPIPE before trying to use it with CONFIG_IPIPE, by
testing it separately from printk.

-- 
					    Gilles.


      parent reply	other threads:[~2012-01-31 17:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 16:04 [Xenomai-help] "How to Adapt ARM I-pipe patch to S3C6410" - still not solved Alex Nikitenko
2012-01-31 16:20 ` Gilles Chanteperdrix
     [not found]   ` <CAJp2OCMk4tp5b5KKxBn7a2akAhbjpOamnx0StaNsohpp5c3wkQ@mail.gmail.com>
2012-01-31 17:44     ` Gilles Chanteperdrix [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F28287D.7090804@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=alexzoidbergnikitenko@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.