linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "tiejun.chen" <tiejun.chen@windriver.com>
To: Guillaume Dargaud <dargaud@lpsc.in2p3.fr>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: Generating elf kernel ?
Date: Thu, 16 Sep 2010 15:51:20 +0800	[thread overview]
Message-ID: <4C91CC78.2020802@windriver.com> (raw)
In-Reply-To: <201009160925.50082.dargaud@lpsc.in2p3.fr>

Guillaume Dargaud wrote:
>>>> Please use simpleImage.<your target dts name>.elf.
>>> Great, that seems to be it...
>>> Except that nothing happens when I jump to 0x40000, no message from the
>> 0x40000? I recalled the entry point should be 0x400000 for
>> simepleImage.*.elf. So you have to change this on the file,
>> arch/powerpc/boot/wrapper.
> 
> Correct, I skipped a zero, the address is indeed 0x400000
> 
>> And also you should confirm if the upstream kernel support your board.
> 
> Our board is a custom derivative from a ML405.

Understood.

So I recommend you use the kernel tree from xilinx. You can refer to the
following website:

http://xilinx.wikidot.com/powerpc-linux

I hope you can skip many issues to accelerate your progress based on the xilinx
kernel.

> My previous project uses ARCH=PPC and has been working fine for 2 years.
> I'm currently trying to go to ARCH=PowerPC and understand dts files in order to 
> boot my first kernel.
> I assume I shouldn't have to change anything in my bootloader.
> After I jump to the kernel address, I don't even get the usual:
> loaded at:     00400000 004F559C
> board data at: 004F3520 004F359C
> relocated to:  0040505C 004050D8
> zimage at:     00405E48 004F211C
> avail ram:     004F6000 08000000
> Linux/PPC load: console=ttyUL0,115200 rw root=/dev/nfs ip=bootp
> Uncompressing Linux...done.
> Now booting the kernel
> 
> Something wrong with my serial console ?

You have to check if you go the correct PC address. Note please check the real
pc address according to the previous comments.

If yes you can check where your kernel stop. Certainly if you have some tools,
such as JTAG debug tools it's convenient to track this. But if no it will be
difficult to go no next.

But you still have ways to do, such as display LED, early printk, and dump
__log_buf.

> 
>> Additionally let's assume your bootloader create the map between the
>> virtual address and the physical address as 1:1. If so you want to execute
>> from 0x40000. But the actual PC address should be the loader address +
>> offset. You can get this by readelf. Here if your loader address is zero,
>> the offset will be pc address, not 0x40000. You can dump your memory to
>> check this.
> 
> The bootloader has no concept of virtual address, right ?

This should be depend on the given PPC core. For example, we cannot disable MMU
on e500. Bur for ML405 we can disable MMU to run real mode on 405.

Cheers
Tiejun

> 

  reply	other threads:[~2010-09-16  7:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14  8:53 Generating elf kernel ? Guillaume Dargaud
2010-09-14 10:08 ` tiejun.chen
2010-09-14 11:27   ` Guillaume Dargaud
2010-09-14 12:57 ` Baurzhan Ismagulov
2010-09-15  8:07   ` Guillaume Dargaud
2010-09-15  8:27     ` tiejun.chen
2010-09-15 14:51       ` Guillaume Dargaud
2010-09-16  3:02         ` tiejun.chen
2010-09-16  7:25           ` Guillaume Dargaud
2010-09-16  7:51             ` tiejun.chen [this message]
2010-09-17  9:27               ` Initial kernel command string (Was: Generating elf kernel ?) Guillaume Dargaud
2010-09-17  9:46                 ` tiejun.chen
2010-09-20  7:21                   ` Guillaume Dargaud
2010-09-20  8:10                     ` tiejun.chen
2010-09-15 16:49       ` Generating elf kernel ? Scott Wood
2010-09-16  2:37         ` tiejun.chen
2010-09-16 17:09           ` Scott Wood
2010-09-17  1:58             ` tiejun.chen
2010-09-17 17:44               ` Scott Wood
2010-09-19  1:40                 ` tiejun.chen
2010-09-20 15:43                   ` Scott Wood
2010-09-21  1:00                     ` Chen, Tiejun
2010-09-21 17:00                       ` Scott Wood
2010-09-21 23:35                         ` Chen, Tiejun

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=4C91CC78.2020802@windriver.com \
    --to=tiejun.chen@windriver.com \
    --cc=dargaud@lpsc.in2p3.fr \
    --cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).