[U-Boot-Users] Re: Problem building U-boot for RpxLite with Mpc823e

Wolfgang Denk wd at denx.de
Sun Nov 28 11:21:56 CET 2004


In message <200411271908.32930.ccool at ninjatech.biz> you wrote:
> 
> > I don't think this is the definition of "struct bd_info" ??
> >
> > > And I don't know what is the IMAP_ADDR, I don't know what to do.  If you
> > > ca> n
> 
> I still don't have a clue what is "IMAP_ADDR" and what it does?

Start reading the code. Where is it used, and what for? If you  look,
you'll see code like this:

	volatile immap_t *immap = (immap_t *)IMAP_ADDR;

"immap_t"   is   defined   in    include/asm-ppc/8xx_immap.h    resp.
include/asm-ppc/immap_8260.h;   check   the   code.   Also  read  the
processor's User's Manual.

You MUST understand the hardware you're working  on  before  you  can
fiddle with low level code. There is no way around it.

And BTW: all these Linux related questions are off topic  here.  They
have nothing to do with U-Boot.

> What can I tell you that will help you. I do have the memory map of my board 
> and my hardware is simple, " EP MPC823 H1 DW " but with only 16M of RAM.  We 

Well, I have some other simple board here. It's a  XYZZY  board  from
the  FOOBAR  company with 128 MB of SDRAM. Do you now know which flah
chips re on this  board?  You  provide  exactly  the  same  level  of
information: it's useless, and you cannot expect useful replies.

> ordered thoses board and we received a few boards with MPC823 and some with>  
> MPC823e.  I'm now developping for the MPC823.  Here is the link if you're 
> interested.

No, I'm not. 

> FA20 0000
>  - 16 Kb Internal Register and DP Ram

Aha!!! So use this address in your configuration.

> > MTD is working fine on all supported boards.
> >
> Well, it is not detected on my board with the linuxppc_2_4_devel, but I do
> have a character device on my linux-2.4.22 patched with the stuff on 
> penguinppc.org  I used the same config and I tried some other and it does not 
> work.

You do it again: you provide inaccurate and incomplete information  -
don't expect ANY usefule reply.

> skip the elf header, so "go at 0x0011 0000"), and it was booting.  So I 
> though that the kernel would work with u-boot.  To do so, I have read the doc 

It will, after making sure the requirements imposed by U-Boot are met.

> Sadly, it did not work, it froze exactly after uncompressing the kernel.  So I 
> refer myself to the FAQ and I am not experimented enough (or a good enough
> code-writer at this point) to fully understand what I had to do modify the
> bd_info structures correctly without breaking everything.  That's pretty much 
> it.

Isn't "make sure that your machine specific header file (for instance
include/asm-ppc/tqm8xx.h) includes the same definition of  the  Board
Information  structure  as  we  define in include/ppcboot.h, and make
sure that your definition of IMAP_ADDR uses the same  value  as  your
U-Boot  configuration in CFG_IMMR" precise enough (quote from the FAQ
section of the DULG) ?

Let's go through it step by step:

* make sure that your machine specific header file ... includes the
  same definition of the Board Information structure as we define in
  include/ppcboot.h":

  The easiest way to acchieve this is to include  the  common  U-Boot
  header;  i.  e.  edit "arch/ppc/platforms/rpxlite.h" and remove all
  this code:

    ...
     15 /* A Board Information structure that is given to a program when
     16  * prom starts it up.
     17  */
     18 typedef struct bd_info {
     19         unsigned int    bi_memstart;    /* Memory start address */
     20         unsigned int    bi_memsize;     /* Memory (end) size in bytes */
     21         unsigned int    bi_intfreq;     /* Internal Freq, in Hz */
     22         unsigned int    bi_busfreq;     /* Bus Freq, in Hz */
     23         unsigned char   bi_enetaddr[6];
     24         unsigned int    bi_baudrate;
     25 } bd_t;
     26
     27 extern bd_t m8xx_board_info;
    ...

  Instead, insert a single line

	#include <asm/ppcboot.h>

* "use the same value as your U-Boot configuration in CFG_IMMR":

	-> grep CFG_IMMR include/configs/RPXl*
	include/configs/RPXlite.h:#define CFG_IMMR          0xFA200000
	...
	include/configs/RPXlite_DW.h:#define CFG_IMMR       0xFA200000
	...

   This is the same as in your memory map above; fine!

   Check the definition of IMAP_ADDR in "arch/ppc/platforms/rpxlite.h":

   	-> grep IMAP_ADDR arch/ppc/platforms/rpxlite.h
	#define IMAP_ADDR               ((uint)0xfa200000)

   Fine, they are the same; no need to change.


Then run the standard build sequence:

	bash$ make mrproper
	bash$ make rpxlite_config
	bash$ make oldconfig
	bash$ make dep
	bash$ make uImage
	bash$ cp arch/ppc/boot/images/uImage /tftpboot/
	...


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
This all sounds complicated, but it mostly does excatly what you  ex-
pect. It's just difficult for us to explain what you expect...
                       - L. Wall & R. L. Schwartz, _Programming Perl_




More information about the U-Boot mailing list