linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Is the linux-2.6.25.4 compatible with freescale lite5200b?
@ 2008-06-04  2:55 Henry Chen
  2008-06-04 16:42 ` Detlev Zundel
  2008-06-05 16:20 ` Mike Timmons
  0 siblings, 2 replies; 5+ messages in thread
From: Henry Chen @ 2008-06-04  2:55 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

Hi, all expert!

Thank you for your patience.

I want to use Linux as the OS of freescale lite5200b develop board. Then I
have tried two version of kernel, 2.6.25.4 and 2.4.25.
We succeed in 2.4.25, failed in 2.6.25.4. We use the default config file for
the board, lite5200_defconfig, which would be found both in
/arch/ppc/configs/. And we use the same ramdisk. The following info is about
the error of 2.6.15.4.

*=> bootm fe000000
fe200000
## Booting image at fe000000
...
   Image Name:
Linux-2.6.25
   Image Type:   PowerPC Linux Kernel Image (gzip
compressed)
   Data Size:    802989 Bytes = 784.2
kB
   Load Address:
00000000
   Entry Point:
00000000
   Uncompressing Kernel Image ...
OK
## Loading RAMDisk Image at fe200000
...
   Image Name:   rootfs in
flash
   Image Type:   PowerPC Linux RAMDisk Image (gzip
compressed)
   Data Size:    5055519 Bytes =  4.8
MB
   Load Address:
fe5a0000
   Entry Point:
fe5a0000
   Loading Ramdisk to 0fa7c000, end 0ff4e41f ...
OK
id mach():
done
MMU:enter

MMU:hw
init
MMU:mapin

MMU:setio
MMU:exit

setup_arch:
enter
setup_arch:
bootmem
arch: exit*

Would you please help us to solve it and explain the cause?

Best regards!

Sincerely yours,
Henry

[-- Attachment #2: Type: text/html, Size: 8910 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is the linux-2.6.25.4 compatible with freescale lite5200b?
  2008-06-04  2:55 Is the linux-2.6.25.4 compatible with freescale lite5200b? Henry Chen
@ 2008-06-04 16:42 ` Detlev Zundel
  2008-06-05 16:20 ` Mike Timmons
  1 sibling, 0 replies; 5+ messages in thread
From: Detlev Zundel @ 2008-06-04 16:42 UTC (permalink / raw)
  To: linuxppc-embedded

Hi Henry,

> I want to use Linux as the OS of freescale lite5200b develop board. Then I have
> tried two version of kernel, 2.6.25.4 and 2.4.25.
> We succeed in 2.4.25, failed in 2.6.25.4. We use the default config file for
> the board, lite5200_defconfig, which would be found both in /arch/ppc/configs/.

That's the problem.  The 5200 was never completely supported in
ARCH=ppc.  You will need to switch to ARCH=powerpc (including all that
new exciting flat device tree infrastructure) where the board should
work.

In short (using bootwrapper only for demonstration purposes, in the long
run you want to use fdt aware infrastructure):

export ARCH=powerpc
make mpc5200_defconfig
make zImage
ls -l arch/powerpc/boot/cuImage.lite5200b
-rw-rw-r-- 1 dzu dzu 1587892 Jun  4 18:40 arch/powerpc/boot/cuImage.lite5200b

Note that lite5200b does not have its own config any more but uses a
common config + an individual device tree
(arch/powerpc/boot/dts/lite5200b.dts). The zImage target above does all
the magic...

Cheers
  Detlev

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@denx.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Is the linux-2.6.25.4 compatible with freescale lite5200b?
  2008-06-04  2:55 Is the linux-2.6.25.4 compatible with freescale lite5200b? Henry Chen
  2008-06-04 16:42 ` Detlev Zundel
@ 2008-06-05 16:20 ` Mike Timmons
       [not found]   ` <dc1bef900806052346k4a9134bo3a995c4bf3f7b3bc@mail.gmail.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Mike Timmons @ 2008-06-05 16:20 UTC (permalink / raw)
  To: Henry Chen, linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 4771 bytes --]

Hi Henry. I recently migrated to ARCH=powerpc on 2.6.24 from ARCH=ppc on
2.6.16 (having obtained a distribution from the ltib project).

 

The ppc architecture is nearing end-of-life as far as development goes,
so I recommend jumping to powerpc now. In mey recent experience I
encountered better driver support, and I generally noticed that future
patching/development would support ARCH=powerpc. I think the old ppc
implied embedded (or non-mac) architectures, while the powerpc was
intended for mac desktops. I might be wrong, but it looks like the two
have merged.

 

This architecture issue doesn't speak directly to your question, but if
you could get 2.6.25 working with ARCH=powerpc on your lite5200b then
you and I would be working with basically the same set-up and I could
help you better. For now, here are a few questions:

 

1)      Have you successfully NFS mounted your rootfs and not woried
about the RAMdisk at this point?

2)      Maybe you are using ARCH=powerpc, but your comment in
/arch/ppc/configs/ has me confused. Did you mean in
/arch/powerpc/configs/ ?

 

Please clarify if you are using ARCH=powerpc and I think I can be of
more assistance. For example, on my 2.6.24 kernel I needed to...

1)      Halve the memory sive specified in lite5200b.dts. It specified
twice as much memory as is actually on my lite5200b, causing a strange,
long delay at boot time as page initialization attempted to operate on a
bunch of non-existent memory, near as I can tell. The symptom was around
30-45 seconds of delay between U-boot boot and any console output.
Weird, but I figured it had something to do with RAM initialization only
after getting my BDI2000 JTAG debugger going and breaking to see that
the kernel appears stuck on something related to initializing the RAM.
This drove me to discover the size spec is wrong in the dts file.

2)      If you need edge-sensitive interrupts you'll need a set
interrupt type callback. Mpc52xx_pic.c is missing this callback. Check
another powerpc architecture for set_interrupt_type. I would upload a
patch but it turns out I am fine with level-sensitive only so I didn't
go through the trouble of formalizing a fix for this.

3)      SPI driver for SPI peripheral (not PSC): this is missing but
there is a patch for it. Tell me if you need it and I'll direct you).

4)      IN GENERAL, THE DEVICE TREE CONCEPT IS COOL, BUT IT HAS A
LEARNING CURVE. I can help you. For example, just requesting an external
IRQ requires creating a "device" node so that you can associate a
specific IRQ number with said device for easy access from your module
driver code at run time. Basically, ALL register access is done by
run-time parsing of the device tree information, NOT by simply direct
register access, given a bunch of defined address constants in some
header file.

 

Sorry if none of this helps, but I just recently clawed my way up the
learning curve so some of the wounds are fresh. Hopefully I can provide
a bit of guidance on the easy concepts.

 

-Mike

 

 

________________________________

From: linuxppc-embedded-bounces+mike_timmons=trimble.com@ozlabs.org
[mailto:linuxppc-embedded-bounces+mike_timmons=trimble.com@ozlabs.org]
On Behalf Of Henry Chen
Sent: Tuesday, June 03, 2008 9:55 PM
To: linuxppc-embedded@ozlabs.org
Subject: Is the linux-2.6.25.4 compatible with freescale lite5200b?

 

Hi, all expert!

 

Thank you for your patience.

 

I want to use Linux as the OS of freescale lite5200b develop board. Then
I have tried two version of kernel, 2.6.25.4 and 2.4.25.

We succeed in 2.4.25, failed in 2.6.25.4. We use the default config file
for the board, lite5200_defconfig, which would be found both in
/arch/ppc/configs/. And we use the same ramdisk. The following info is
about the error of 2.6.15.4.

 

=> bootm fe000000 fe200000

## Booting image at fe000000 ...

   Image Name:   Linux-2.6.25

   Image Type:   PowerPC Linux Kernel Image (gzip compressed)

   Data Size:    802989 Bytes = 784.2 kB

   Load Address: 00000000

   Entry Point:  00000000

   Uncompressing Kernel Image ... OK

## Loading RAMDisk Image at fe200000 ...

   Image Name:   rootfs in flash

   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)

   Data Size:    5055519 Bytes =  4.8 MB

   Load Address: fe5a0000

   Entry Point:  fe5a0000

   Loading Ramdisk to 0fa7c000, end 0ff4e41f ... OK

id mach(): done

MMU:enter

MMU:hw init

MMU:mapin

MMU:setio

MMU:exit

setup_arch: enter

setup_arch: bootmem

arch: exit

 

Would you please help us to solve it and explain the cause?

 

Best regards!

 

Sincerely yours,

Henry


[-- Attachment #2: Type: text/html, Size: 25159 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Is the linux-2.6.25.4 compatible with freescale lite5200b?
       [not found]   ` <dc1bef900806052346k4a9134bo3a995c4bf3f7b3bc@mail.gmail.com>
@ 2008-06-06  8:27     ` Mike Timmons
  2008-06-07 11:03       ` Detlev Zundel
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Timmons @ 2008-06-06  8:27 UTC (permalink / raw)
  To: hong chen, linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 4240 bytes --]

Henry,

You are closer than you think with the ARCH=powerpc. You need to load
one more binary file into ram and specify one more address for bootm.
You need to load the device tree blob (DENX addresses this at
http://www.denx.de/wiki/view/DULG/LinuxFDTBlob). Thanks again DENX...

 

Following your ARCH=powerpc build you should see a NEW file in your
build output: rootfs/boot/lite5200b.dtb

 

Simply tftp that file to a RAM location on your target that WILL NOT
overlap the kernel image (for obvious reasons:-))

 

Then, alter your bootm command with a SECOND address indicating where
this BLOB was placed when it was tftp'd into your RAM. In my case, I
unpack (tftp) my kernel to 0x200000 and I tftp my dtb file to 400000 so
my bootm command from the u-boot prompt looks like the following. Yes,
you need that little dash there (If your U-boot doesn't like this
command then you probably have an old U-boot version and you will need
to upgrade your U-boot. I'm using U-boot 1.3.1 and it works for me)  

 

-> bootm 200000 - 400000

 

Rather than give you the dts file (it is the device tree that gets
"compiled" to create the dtb file when you build the kernel), let me
simply tell you one thing you need to change:

 

1)       edit arch/powerpc/boot/dts/lite5200b.dts

a.       change line 45 to:        reg = <00000000 8000000>   // change
to 128M from 256M.

 

Do these two things and I think you will happily boot your 2.6.25 kernel
as ARCH=powerpc.

 

Once you are this far you will need to get familiar with the
lite5200b.dts "device tree" if you are porting this to a custom board
and/or adding HW or wanting to use external IRQs. Let's save for later.

 

On the subject of your wireless card, you can look for driver or write
your own PCI driver. Now that you are running the latest kernel (2.6.25)
I recommend you study the following books:

 

BOOK

Essential Linux Device Drivers <http://safari.oreilly.com/9780132396554>


By 

Sreekrishnan Venkateswaran
<http://www.informit.com/authors/author_bio.aspx?ISBN=9780132396554> 

 

BOOK

Linux Device Drivers, 3rd Edition <http://safari.oreilly.com/0596005903>


By 

Jonathan Corbet
<http://www.oreillynet.com/cs/catalog/view/au/592?x-t=book.view> ; Greg
Kroah-Hartman
<http://www.oreillynet.com/cs/catalog/view/au/2077?x-t=book.view> ;
Alessandro Rubini
<http://www.oreillynet.com/cs/catalog/view/au/461?x-t=book.view> 

 

A $20 per-month subscription to safari.oreilly.com will get you access
to these and MANY MORE titles (you might even be able to try it for
free).

 

 

-Mike

 

________________________________

From: hong chen [mailto:ghenrychen@gmail.com] 
Sent: Friday, June 06, 2008 1:46 AM
To: Mike Timmons
Subject: Re: Is the linux-2.6.25.4 compatible with freescale lite5200b?

 

Hi, Mike. I greatly appreciate your guidance. I am a green hand at
embedded linux.

 

I clarify that I used ARCH=ppc. And I indeed used the config file in
/arch/ppc/configs/. Furthermore, I ought to have successfully NFS
mounted my rootfs, considering that I succeeded in running the
linux-2.4.25 and NFS mounting my rootfs. (Does the different kernel
influence the NFS rootfs?)

 

Today, I have tested ARCH=powerpc, just to obtaind the following result:

 

=> bootm fe000000
## Booting image at fe000000 ...
   Image Name:   Linux-2.6.26-rc4-01178-g1f01800-
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1339544 Bytes =  1.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Uncompressing Kernel Image ... OK

<------The U-boot stopped here. I seems to be worse than ever.

 

Then I have another question: how to set the $CROSS_COMPILE? ppc_6xx- or
powerpc-linux-?

I set CROSS_COMPILE=/opt/eldk/usr/bin/ppc_6xx- in the top Makefile. My
toolchain is ELDK 4.2.

 

Mike, would you please send me lite5200b.dts and other patch about
lite5200b? I want to compare and do some patch. I think they are useful
for me. I want to make some wireless application based on this board
next. I have an 802.11n wireless card. And I want to plug it into PCI
port.

 

-Henry

 


[-- Attachment #2: Type: text/html, Size: 18172 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is the linux-2.6.25.4 compatible with freescale lite5200b?
  2008-06-06  8:27     ` Mike Timmons
@ 2008-06-07 11:03       ` Detlev Zundel
  0 siblings, 0 replies; 5+ messages in thread
From: Detlev Zundel @ 2008-06-07 11:03 UTC (permalink / raw)
  To: linuxppc-embedded

Hi Mike,

> You are closer than you think with the ARCH=powerpc. You need to load one more
> binary file into ram and specify one more address for bootm. You need to load
> the device tree blob (DENX addresses this at http://www.denx.de/wiki/view/DULG/
> LinuxFDTBlob). Thanks again DENX?

As you may have noticed, this is a wiki, so many people participated in
writing up the documentation...

> Following your ARCH=powerpc build you should see a NEW file in your build
> output: rootfs/boot/lite5200b.dtb

Just as a reminder, as U-Boot needs to fill in at least the "chosen"
node in the fdt passed to the kernel, we have to reserve some space in
the .dtb file.  This can easily be done during the "normal" kernel
compilation by

export DTS_FLAGS="-R4 -S0x3000"

before the compilation.

> 1)       edit arch/powerpc/boot/dts/lite5200b.dts
>
> a.       change line 45 to:        reg = <00000000 8000000>   // change to 128M
> from 256M.

Someone needs to look into this, because usually the amount of RAM
should be passed correctly to the Linux kernel after dynamically finding
the correct amount.

Cheers
  Detlev

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@denx.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-07 11:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-04  2:55 Is the linux-2.6.25.4 compatible with freescale lite5200b? Henry Chen
2008-06-04 16:42 ` Detlev Zundel
2008-06-05 16:20 ` Mike Timmons
     [not found]   ` <dc1bef900806052346k4a9134bo3a995c4bf3f7b3bc@mail.gmail.com>
2008-06-06  8:27     ` Mike Timmons
2008-06-07 11:03       ` Detlev Zundel

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).