help needed for porting linux-2.5 to a ppc custom board

9 messages, 4 authors, 2002-11-15 · open the first message on its own page

help needed for porting linux-2.5 to a ppc custom board

From: Atm account <hidden>
Date: 2002-09-14 07:34:28

Hello,

  We want to run linux on a custom board having ppc603ev.
We have identified the following tasks :-
processor-specific tuning,
board related changes (io_block_mapping, pic etc.)
serial driver for uart device.
pci,timer initialisations.

  There is 4mb flash on the board (for storing vmlinux.gz)
No hard disk.

 Since, there is only 1 uart port, how can we use it for
console-login and dumping printk messages?

 How should we start identifying changes to be done in
kernel source (mostly arch/ppc)? Is there any resource
available on internet for porting linux to a powerpc/any
board ?


Regards & Thanks
Piyush

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: help needed for porting linux-2.5 to a ppc custom board

From: Ricardo Scop <hidden>
Date: 2002-09-16 18:16:19

Atm :-),

A good starting point is
http://penguinppc.org/embedded/howto/PowerPC-Embedded-HOWTO.html.

IMHO, porting a good bootloader/monitor to your board, like PPCBoot,
is half the way to go.

I hope that helps...

Ricardo Scop                            mailto:scop@plugin.com.br

------------------------------------------------------------------
It might look like I'm doing nothing, but at the cellular level I'm
really quite busy.

Saturday, September 14, 2002, 4:34:28 AM, you wrote:

Aa>   We want to run linux on a custom board having ppc603ev.
Aa> We have identified the following tasks :-
Aa> processor-specific tuning,
Aa> board related changes (io_block_mapping, pic etc.)
Aa> serial driver for uart device.
Aa> pci,timer initialisations.

Aa>   There is 4mb flash on the board (for storing vmlinux.gz)
Aa> No hard disk.

Aa>  Since, there is only 1 uart port, how can we use it for
Aa> console-login and dumping printk messages?

Aa>  How should we start identifying changes to be done in
Aa> kernel source (mostly arch/ppc)? Is there any resource
Aa> available on internet for porting linux to a powerpc/any
Aa> board ?

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: help needed for porting linux-2.5 to a ppc custom board

From: Ricardo Scop <hidden>
Date: 2002-09-16 18:21:56

Atm,

Saturday, September 14, 2002, 4:34:28 AM, you wrote:


Aa> Hello,
<snip>
Aa>   There is 4mb flash on the board (for storing vmlinux.gz)
Aa> No hard disk.
that ok, although 4mb may prove to tight for userland applications,
dependeing on  what you wanna do with your board.

Aa>  Since, there is only 1 uart port, how can we use it for
Aa> console-login and dumping printk messages?
This is not a problem. arch/ppc already has support for this.

Have fun.

Scop.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Problem in booting PPC with kernel 2.5.44

From: Atm account <hidden>
Date: 2002-11-13 09:52:59

Hello All,
  We are porting Linux 2.5.44 for our custom board which has
 603e processor..
    We are using the arch/ppc/boot/simple bootloader with minor
modifications. At the end of boot-code relocation to 8 Mb, the code jumps
to the relocated code and thereafter
does the decompression (decompress_kernel)of the vmlinux image to physical
address 0 and jumps to the 0th location (3 nops followed by code). It is
from here that early_init is called.
    Now the problem is ... the kernel has been linked at 3GB and a call in
kernel/head.S which says ---
       bl early_init
translates to sth like =>    bl 0Xc000xxxx
   I dont have the MMU on at this point nor any dual mapping being done
thru the BATs. So how is the above code supposed to execute ?????
Our board precisely hangs after this jump.

Also, later in the same file (kernel/head.S) i have a piece of code which
goes like ...

        bl      mmu_off
__after_mmu_off:
        bl      clear_bats
        bl      flush_tlbs

        bl      initial_bats

after doing a mmu_off (disabling translations) we again do branches which
actually translate to the 3Gb addresses. How r they supposed to execute ?

  Can somebody pls explain ..

thanx in advance :)

Nishant


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Problem in booting PPC with kernel 2.5.44

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2002-11-14 13:36:21

On Wed, 2002-11-13 at 10:52, Atm account wrote:
Hello All,
  We are porting Linux 2.5.44 for our custom board which has
 603e processor..
    We are using the arch/ppc/boot/simple bootloader with minor
modifications. At the end of boot-code relocation to 8 Mb, the code jumps
to the relocated code and thereafter
does the decompression (decompress_kernel)of the vmlinux image to physical
address 0 and jumps to the 0th location (3 nops followed by code). It is
from here that early_init is called.
    Now the problem is ... the kernel has been linked at 3GB and a call in
kernel/head.S which says ---
       bl early_init
translates to sth like =>    bl 0Xc000xxxx
   I dont have the MMU on at this point nor any dual mapping being done
thru the BATs. So how is the above code supposed to execute ?????
Our board precisely hangs after this jump.
Those are relative branches, not absolute.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Problem in booting PPC with kernel 2.5.44

From: Tom Rini <hidden>
Date: 2002-11-14 15:11:36

On Wed, Nov 13, 2002 at 02:52:59PM +0500, Atm account wrote:
Hello All,
  We are porting Linux 2.5.44 for our custom board which has
 603e processor..
    We are using the arch/ppc/boot/simple bootloader with minor
modifications. At the end of boot-code relocation to 8 Mb, the code jumps
to the relocated code and thereafter
does the decompression (decompress_kernel)of the vmlinux image to physical
address 0 and jumps to the 0th location (3 nops followed by code). It is
from here that early_init is called.
Just wondering, what modifications did you have to make to
arch/ppc/boot/simple?
    Now the problem is ... the kernel has been linked at 3GB and a call in
kernel/head.S which says ---
How did you change things to have it link at 3GB?

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Problem in booting PPC with kernel 2.5.44

From: Atm account <hidden>
Date: 2002-11-15 11:24:36

On Thu, 14 Nov 2002, Tom Rini wrote:
quoted
address 0 and jumps to the 0th location (3 nops followed by code). It is
from here that early_init is called.
Just wondering, what modifications did you have to make to
arch/ppc/boot/simple?
    well that change was the addition of a routine to initialize the on
board IBM 82660 bridge, and the S5933 PCI controller.
quoted
    Now the problem is ... the kernel has been linked at 3GB and a call in
kernel/head.S which says ---
How did you change things to have it link at 3GB?
	What else is it linked at?? Is it not what KERNELBASE is assigned
to?? AFAIK kernel links at 0xc0000000 and the bootloader at
8Mb (PPC based boards).
   Btw the problem turned out to be a _printk_ which was causing
an MCP to occur...we use a serial device for printing

thanx a lot

nishant

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/



** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Problem in booting PPC with kernel 2.5.44

From: Tom Rini <hidden>
Date: 2002-11-15 16:17:24

On Fri, Nov 15, 2002 at 04:24:36PM +0500, Atm account wrote:
On Thu, 14 Nov 2002, Tom Rini wrote:
quoted
quoted
    Now the problem is ... the kernel has been linked at 3GB and a call in
kernel/head.S which says ---
How did you change things to have it link at 3GB?
	What else is it linked at?? Is it not what KERNELBASE is assigned
to?? AFAIK kernel links at 0xc0000000 and the bootloader at
8Mb (PPC based boards).
Did you change the file itself, or did you make use of
CONFIG_ADVANCED_OPTIONS, is what I'm asking.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: Problem in booting PPC with kernel 2.5.44

From: Tom Rini <hidden>
Date: 2002-11-15 16:26:48

On Fri, Nov 15, 2002 at 04:24:36PM +0500, Atm account wrote:
On Thu, 14 Nov 2002, Tom Rini wrote:
quoted
quoted
    Now the problem is ... the kernel has been linked at 3GB and a call in
kernel/head.S which says ---
How did you change things to have it link at 3GB?
	What else is it linked at?? Is it not what KERNELBASE is assigned
to?? AFAIK kernel links at 0xc0000000 and the bootloader at
8Mb (PPC based boards).
Er, ignore my last email.  Too close to the weekend I suppose. :)

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help