[U-Boot] Help with LCD setup

Anatolij Gustschin agust at denx.de
Mon Mar 8 22:35:46 CET 2010


Hi,

On Mon, 8 Mar 2010 13:32:32 -0600
Chao You <you.chao at gmail.com> wrote:

> First time user. Sorry if you got multiple emails already.
> 
> I add the following line at the bottom of my omap3_beagle.h file.
> 
> #define CONFIG_LCD                      1
> #define CONFIG_CMD_BMP                  1
> #define CONFIG_SPLASH_SCREEN            1
> #define CONFIG_MPC823                   1

This if wrong. Please don't use MPC823 specific board configuration
macro in your config file, it is for different architecture.
 
> The following is the error message. Did I miss anything?

There is no support for splash screen in mainline U-Boot, it seems.
You need to add appropriate display controller initialization code,
better would be to add a simple driver so that other omap3 boards
could also benefit from it.

> lcd.c: In function ‘bitmap_plot’:
> lcd.c:505: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
> before ‘*’ token
> lcd.c:505: error: ‘immr’ undeclared (first use in this function)
> lcd.c:505: error: (Each undeclared identifier is reported only once
> lcd.c:505: error: for each function it appears in.)
> lcd.c:505: error: ‘immap_t’ undeclared (first use in this function)
> lcd.c:505: error: expected expression before ‘)’ token

Try to understand the information your compiler gives you:
Look at the common/lcd.c file, around line 505:

504: #elif defined(CONFIG_MPC823)
505:        volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
506:        volatile cpm8xx_t *cp = &(immr->im_cpm);
507: #endif

‘immap_t’ type is used in the code, but it is undeclared.

You can try to find out where it could be declared, i.e.
by searching in the code:
ag at wker:~/u-boot$ grep -r "} immap_t" *
include/asm-ppc/immap_86xx.h:} immap_t;
include/asm-ppc/immap_83xx.h:} immap_t;
include/asm-ppc/immap_83xx.h:} immap_t;
include/asm-ppc/immap_83xx.h:} immap_t;
include/asm-ppc/immap_83xx.h:} immap_t;
include/asm-ppc/immap_83xx.h:} immap_t;
include/asm-ppc/immap_83xx.h:} immap_t;
include/asm-ppc/immap_512x.h:} immap_t;
include/asm-ppc/5xx_immap.h:} immap_t;
include/asm-ppc/immap_8220.h:} immap_t;
include/asm-ppc/8xx_immap.h:} immap_t;
include/asm-ppc/immap_8260.h:} immap_t;

Now you can see that this type declaration is in ppc
architecture specific headers which can't be used for your
platform. That means, you must be doing something wrong. You
also can see that the variable declarations are conditional,
depending on definition of CONFIG_MPC823 macro. Try to find
out what this macro is actually for, than you can see if it
makes sense to use it in your case.

Best regards,
Anatolij


More information about the U-Boot mailing list