VAR-SOM-OM35/7 Linux Splash Screen Support: Difference between revisions

From Variscite Wiki
(Created page with "{{DocImage|category1=Linux|category2=VAR-SOM-OM35}} Category:VAR-SOM-OM37 =VAR-SOM-OM35/7 Splash Screen Support = __toc__ The VAR-SOM-OM3X uboot supports display a splash ...")
 
No edit summary
 
Line 1: Line 1:
{{PageHeader|VAR-SOM-OM35/7 Splash Screen Support}}
{{DocImage|category1=Linux|category2=VAR-SOM-OM35}} [[Category:VAR-SOM-OM37]]
{{DocImage|category1=Linux|category2=VAR-SOM-OM35}} [[Category:VAR-SOM-OM37]]
=VAR-SOM-OM35/7 Splash Screen Support =
__toc__
__toc__
The VAR-SOM-OM3X uboot supports display a splash screen of customer's logo.  
The VAR-SOM-OM3X uboot supports display a splash screen of customer's logo.  


== Splash Screen Modes  ==
= Splash Screen Modes  =


The u-boot can display splash-screen in 3 modes  
The u-boot can display splash-screen in 3 modes  
Line 14: Line 14:
The mode may be chosen in the ''include/configs/var-om3xxx.h'' file which consists notes explaining how to choose appropriate mode.  
The mode may be chosen in the ''include/configs/var-om3xxx.h'' file which consists notes explaining how to choose appropriate mode.  


=== Black Screen Mode  ===
== Black Screen Mode  ==


For black screen, just remove any defines of '''CONFIG_VIDEO_***''' in the ''include/configs/var-om3xxx.h''  
For black screen, just remove any defines of '''CONFIG_VIDEO_***''' in the ''include/configs/var-om3xxx.h''  
Line 25: Line 25:
#endif /* CONFIG_VIDEO_SPLASH */
#endif /* CONFIG_VIDEO_SPLASH */
</pre>  
</pre>  
=== Solid Color Mode  ===
== Solid Color Mode  ==


For Solid Color, define '''CONFIG_VIDEO_BACKGROUND''' in the ''include/configs/var-om3xxx.h''  
For Solid Color, define '''CONFIG_VIDEO_BACKGROUND''' in the ''include/configs/var-om3xxx.h''  
Line 38: Line 38:
#endif /* CONFIG_VIDEO_SPLASH */
#endif /* CONFIG_VIDEO_SPLASH */
</pre>  
</pre>  
=== Custom Image Mode  ===
== Custom Image Mode  ==


For custom image demonstration, define '''CONFIG_VIDEO_SPLASH''' in the ''include/configs/var-om3xxx.h''  
For custom image demonstration, define '''CONFIG_VIDEO_SPLASH''' in the ''include/configs/var-om3xxx.h''  
Line 51: Line 51:
#endif /* CONFIG_VIDEO_SPLASH */
#endif /* CONFIG_VIDEO_SPLASH */
</pre>  
</pre>  
== Splash Mode Customization  ==
= Splash Mode Customization  =


The Solid Color and Custom Image modes may be customized.  
The Solid Color and Custom Image modes may be customized.  


=== Solid Color Mode  ===
== Solid Color Mode  ==


The Solid Color mask may be customized by user. The mask is defined by '''SPLASH_SOLID_COLOR''' constant in the ''board/ti/var-om3xxx/var-om35xx.h'' file:  
The Solid Color mask may be customized by user. The mask is defined by '''SPLASH_SOLID_COLOR''' constant in the ''board/ti/var-om3xxx/var-om35xx.h'' file:  
Line 69: Line 69:
*'''BB''' - hex value of blue component
*'''BB''' - hex value of blue component


=== Custom Image Mode  ===
== Custom Image Mode  ==


==== Data Preparation  ====
=== Data Preparation  ===


The custom image data are supplied as predefined array of the bitmap pixels.  
The custom image data are supplied as predefined array of the bitmap pixels.  
Line 95: Line 95:
{{note|'''Note''': The ''var_16_splash.c'' file is included in the ''board/ti/var-om3xxx/var-om35xx.c''. Therefore, the objects in ''board/ti/var-om3xxx'' should be removed in order to compile u-boot with new custom image data.|info}}
{{note|'''Note''': The ''var_16_splash.c'' file is included in the ''board/ti/var-om3xxx/var-om35xx.c''. Therefore, the objects in ''board/ti/var-om3xxx'' should be removed in order to compile u-boot with new custom image data.|info}}


==== Custom Image Data Copying  ====
=== Custom Image Data Copying  ===


The custom image data copy to the frame buffer done by '''omap3_fill_framebuffer''' function residing in the ''drivers/video/omap_dss.c'' file.  
The custom image data copy to the frame buffer done by '''omap3_fill_framebuffer''' function residing in the ''drivers/video/omap_dss.c'' file.  

Latest revision as of 14:02, 22 January 2014

VAR-SOM-OM35/7 Splash Screen Support

The VAR-SOM-OM3X uboot supports display a splash screen of customer's logo.

Splash Screen Modes

The u-boot can display splash-screen in 3 modes

  • Black Screen Splash - the video output is disabled and LCD back-light is disabled
  • Solid Color Splash - the video output is enabled and the LCD is filled with a solid color defined by user
  • Custom Image Splash - the video output is enabled and part of LCD frame buffer is filled with a user-defined custom data

The mode may be chosen in the include/configs/var-om3xxx.h file which consists notes explaining how to choose appropriate mode.

Black Screen Mode

For black screen, just remove any defines of CONFIG_VIDEO_*** in the include/configs/var-om3xxx.h

/* Splash Screen operation in the u-boot: */
/* define CONFIG_VIDEO_SPLASH for bitmap image demonstration    */
/* define CONFIG_VIDEO_BACKGROUND for solid color demonstration */

#if (defined(CONFIG_VIDEO_SPLASH) || defined(CONFIG_VIDEO_BACKGROUND))
#define CONFIG_VIDEO_OMAP3	/* DSS Support			*/
#endif /* CONFIG_VIDEO_SPLASH */

Solid Color Mode

For Solid Color, define CONFIG_VIDEO_BACKGROUND in the include/configs/var-om3xxx.h

/* Splash Screen operation in the u-boot: */
/* define CONFIG_VIDEO_SPLASH for bitmap image demonstration    */
/* define CONFIG_VIDEO_BACKGROUND for solid color demonstration */

#define CONFIG_VIDEO_BACKGROUND

#if (defined(CONFIG_VIDEO_SPLASH) || defined(CONFIG_VIDEO_BACKGROUND))
#define CONFIG_VIDEO_OMAP3	/* DSS Support			*/
#endif /* CONFIG_VIDEO_SPLASH */

Custom Image Mode

For custom image demonstration, define CONFIG_VIDEO_SPLASH in the include/configs/var-om3xxx.h

/* Splash Screen operation in the u-boot: */
/* define CONFIG_VIDEO_SPLASH for bitmap image demonstration    */
/* define CONFIG_VIDEO_BACKGROUND for solid color demonstration */

#define CONFIG_VIDEO_SPLASH

#if (defined(CONFIG_VIDEO_SPLASH) || defined(CONFIG_VIDEO_BACKGROUND))
#define CONFIG_VIDEO_OMAP3	/* DSS Support			*/
#endif /* CONFIG_VIDEO_SPLASH */

Splash Mode Customization

The Solid Color and Custom Image modes may be customized.

Solid Color Mode

The Solid Color mask may be customized by user. The mask is defined by SPLASH_SOLID_COLOR constant in the board/ti/var-om3xxx/var-om35xx.h file:

#ifdef CONFIG_VIDEO_BACKGROUND
#define SPLASH_SOLID_COLOR	0x00FF8000
#endif /* CONFIG_VIDEO_BACKGROUND */

The format of the mask is as follows: 00RRGGBB, where

  • 00 - should be double zero
  • RR - hex value of red component
  • GG - hex value of green component
  • BB - hex value of blue component

Custom Image Mode

Data Preparation

The custom image data are supplied as predefined array of the bitmap pixels.

Maximum pixels allowed: 132,000 (data size of 264,000)

  • The customer logo image should be converted to the bitmap image format by any editor (like GIMP).
  • Image format is 5,6,5 16 bit
  • The bitmap image should be converted to the C array.
    • The conversion may be done by bin2hex.pl script (may be downloaded from [1]).
    • BMP heading bytes should be removed from the beginning of the array. These bytes belong to the header of the bitmap image.
    • Add size of the array
    • Check that image data and data size variables names follow Variscite convention. For more details see the following example.

The example of such predefined data may be found in the board/ti/var-om3xxx/var_16_splash.c

unsigned int splash_data_size = 264000;

/* binary data: */
unsigned char splash_data[] = /* 264000 */
{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
Note: The var_16_splash.c file is included in the board/ti/var-om3xxx/var-om35xx.c. Therefore, the objects in board/ti/var-om3xxx should be removed in order to compile u-boot with new custom image data.

Custom Image Data Copying

The custom image data copy to the frame buffer done by omap3_fill_framebuffer function residing in the drivers/video/omap_dss.c file.

/*
 * Fill frame buffer with splash screen data
 */
void omap3_fill_framebuffer(unsigned int fb_addr, unsigned char *bit_data, unsigned int size)
{
	memset((unsigned char*)fb_addr, 0xff, (800 * 480 *2));
	/* copy splash image row data to the frame buffer */
	memcpy((unsigned char*)fb_addr + (165 * 800 * 2), bit_data, size);

	<***>
}
Note: example Variscite Image consists of 165 full lines for simplicity, but image data may be copied in different ways to meet customer's logo requirements.


Note: the pixel data format of the Custom Image is 16 bit (or 16 bit color depth), such that 5 bits stand for red, 6 bits stand for green and 5 bits for blue.