linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Fabio Tosetto" <tosettofabio83@libero.it>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: MPC5200b MMC over SPI into PSC6
Date: Thu, 8 May 2008 09:32:39 -0600	[thread overview]
Message-ID: <fa686aa40805080832l2492c46l400986472e985d9a@mail.gmail.com> (raw)
In-Reply-To: <482317E2.7000308@libero.it>

On Thu, May 8, 2008 at 9:10 AM, Fabio Tosetto <tosettofabio83@libero.it> wrote:
> Ok, maybe it's better to start from the beginning.
>  Now I'm using a Lite5200b board, just to avoid problems with my hardware,
> and I'm trying to have a bootable kernel.
>
>  With kernel version 2.6.24.6 I do the following commands
>
>  $ make ARCH=powerpc lite5200_defconfig
>  $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- uImage
>
>  then I copy the arch/powerpc/boot/uImage and a rootfs.uimage on the board,
> but uBoot stops at the beginning:

Right; some concepts need to be explained now...  There is a major
difference between arch/ppc and arch/powerpc.  In arch/ppc, the kernel
is hard coded with the list of devices in the system.  In
arch/powerpc, the list of devices is captured in a data structure
called the Flattened Device Tree (FDT).  fdt data structures are
generated from the .dts (device tree source) files in
arch/powerpc/boot/dts/.

When you build a uImage with arch/ppc, you get a hard coded kernel
that works with u-boot:  "bootm <kernel_addr> <ramdisk_addr>"

When you build a uImage with arch/powerpc, you get a dynamic kernel
that needs to be passed the device tree blob on boot.  Newer u-boot
supports dts booting: "bootm <kernel_addr> <ramdisk_addr> <dt_addr>"
or "bootm <kernel_addr> - <dt_addr>" if you're not using a ramdisk.

However, if you've got an older u-boot version installed on your
board, you need to create an image that binds the device tree into the
kernel image.  This is called a "cuImage".  So, instead of doing "make
ARCH=powerpc uImage", you should do "make ARCH=powerpc
cuImage.<boardname>".  This 'wraps' the kernel with a boot wrapper
that includes the device tree blob but maintains compatibility with
the old style uImage format.

For example, use "make ARCH=powerpc cuImage.lite5200b" to build an
image for the lite5200b board.  The build scripts will use the
lite5200b.dts file in the dts directory for building the image.  If
you add "fabios-fantastic-board.dts" to arch/powerpc/boot/dts, then
you can build "cuImage.fabios-fantastic-board".  :-)

>  The only way I was able to get something working, even though it sounds a
> little strange to me, is loading the config from powerpc folder but
> compiling in ppc
>
>  $ make ARCH=powerpc lite5200_defconfig
>  $ make ARCH=ppc CROSS_COMPILE=powerpc-linux-gnu- uImage

ARCH=ppc and ARCH=powerpc are completely different beasts.  Forget
that you even know about ARCH=ppc for this entire exercise.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2008-05-08 15:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05 18:12 MPC5200b MMC over SPI into PSC6 Fabio Tosetto
2008-05-06 15:36 ` Grant Likely
2008-05-07 12:49   ` Fabio Tosetto
2008-05-07 16:34     ` Grant Likely
2008-05-08 15:10       ` Fabio Tosetto
2008-05-08 15:32         ` Grant Likely [this message]
2008-05-09 13:40           ` Fabri
2008-05-09 13:51             ` Fabri
2008-05-09 14:06               ` Grant Likely
2008-05-09 15:02                 ` Fabri
2008-05-09 15:20                   ` Grant Likely
2008-05-09 20:01                     ` Fabri
2008-05-12  8:51                     ` Fabio Tosetto
2008-05-22 14:28                     ` Fabri
  -- strict thread matches above, loose matches on Subject: below --
2008-04-16 11:26 MPC5200B " tosettofabio83

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=fa686aa40805080832l2492c46l400986472e985d9a@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=tosettofabio83@libero.it \
    /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).