Changes between Version 1 and Version 2 of ventana/SplashScreen


Ignore:
Timestamp:
01/09/2018 04:32:31 PM (3 months ago)
Author:
Tim Harvey
Comment:

convert restored html to wiki markup

Legend:

Unmodified
Added
Removed
Modified
  • ventana/SplashScreen

    v1 v2  
    1 {{{#!html
    2           <div id="wikipage" class="trac-content"><p>
    3 </p><div class="wiki-toc">
    4 <ol>
    5   <li>
    6     <a href="#VentanaSplashScreen">Ventana Splash Screen</a>
    7     <ol>
    8       <li>
    9         <a href="#U-BootBootloader">U-Boot Bootloader</a>
    10         <ol>
    11           <li>
    12             <a href="#CreateCustomBMPLogoMethod">Create Custom BMP Logo Method</a>
    13           </li>
    14           <li>
    15             <a href="#ModifyDefaultLinuxLogoMethod">Modify Default Linux Logo Method</a>
    16           </li>
    17           <li>
    18             <a href="#BMPFromStorageMethod">BMP From Storage Method</a>
    19           </li>
    20           <li>
    21             <a href="#RelatedSourceFiles">Related Source Files</a>
    22           </li>
    23           <li>
    24             <a href="#SuppressingU-BootVersion">Suppressing U-Boot Version</a>
    25           </li>
    26         </ol>
    27       </li>
    28       <li>
    29         <a href="#LinuxKernel">Linux Kernel</a>
    30         <ol>
    31           <li>
    32             <a href="#FurtherKernelOptions">Further Kernel Options</a>
    33           </li>
    34         </ol>
    35       </li>
    36       <li>
    37         <a href="#PSplash">PSplash</a>
    38         <ol>
    39           <li>
    40             <a href="#YoctoSetUp">Yocto Set Up</a>
    41           </li>
    42           <li>
    43             <a href="#OpenWrtSetUp">OpenWrt Set Up</a>
    44           </li>
    45         </ol>
    46       </li>
    47       <li>
    48         <a href="#Android">Android</a>
    49         <ol>
    50           <li>
    51             <a href="#InitLogo-RequiresBuildingofAndroidSourceCode">Init Logo - Requires Building of Android Source Code</a>
    52           </li>
    53           <li>
    54             <a href="#BootAnimation-DoesnotRequireBuildingAndroidSource">Boot Animation - Does not Require Building Android Source</a>
    55             <ol>
    56               <li>
    57                 <a href="#DisablingtheBootAnimation">Disabling the Boot Animation</a>
    58               </li>
    59             </ol>
    60           </li>
    61         </ol>
    62       </li>
    63     </ol>
    64   </li>
    65 </ol>
    66 </div><p>
    67 </p>
    68 <h1 id="VentanaSplashScreen">Ventana Splash Screen</h1>
    69 <p>
    70 <a style="padding:0; border:none" href="/attachment/wiki/ventana/SplashScreen/lcd_gateworks_logo.png"><img width="400px" src="/raw-attachment/wiki/ventana/SplashScreen/lcd_gateworks_logo.png" /></a>
    71 <br />
     1[[PageOutline]]
     2
     3= Ventana Splash Screen =
     4[[Image(http://i0.wp.com/blog.gateworks.com/wp-content/uploads/2016/05/lcd_gateworks_logo.png, 400px)]]
     5
    726For devices that have a display, customers may often want to present a splash-screen as soon as possible. This provides a sense of responsiveness for those expecting a visual effect on power up while at the same time providing an avenue for the prominent display of a vendor logo. All for minimal impact on overall system boot time. This page covers the various splash screen options available to Ventana products as well as instructions for customization.
    73 </p>
    74 <p>
     7
    758For each step in the typical boot process, a splash screen can usually be configured for the duration of its operation. For example, the IMX6 processor used on Ventana boards starts with a Primary Boot Loader (PBL) (this is firmware inside the IMX6 which can not be modified), a Secondary Program Loader (SPL) which configures DRAM and loads the main bootloader, then the OS kernel itself. The first place a splash screen can be configured is the bootloader where typically a static splash is displayed. This image can be switched out or left in place by the kernel. Finally, depending on the operating system, a dynamic animated splash may be enabled in early userspace init which leads to a GUI if available once init is complete.
    76 </p>
    77 <p>
    78 <a style="padding:0; border:none" href="/attachment/wiki/ventana/SplashScreen/SplashScreensInTheBootProcess.png"><img src="/raw-attachment/wiki/ventana/SplashScreen/SplashScreensInTheBootProcess.png" /></a><br />
    79 <sub>Note: Times will vary depending based on hardware, OS, and configuration. Times shown are for the default development configuration without boot speed tuning.</sub>
    80 </p>
    81 <p>
    82 From the above timelines you can see where it may be most useful to implement a splash screen. For example:
    83 </p>
    84 <ul><li>if your intention is to provide feedback within the first second of power-up then you must do this in the bootloader (but be aware it will not persist for more than 1.5 seconds or so
    85 </li><li>if your intention is to provide feedback within the first 2 seconds then you'll get the most bang-for-your buck using a kernel splash
    86 </li><li>if your intention is to have a splash up until the moment that you can interact with the Android GUI then you at least have to use a userspace spash (for Android this is best done via the bootanimation.zip)
    87 </li><li>if you want visual feedback all along the way you may want to implement a bootloader splash, a kernel splash, and a userspace splash
    88 </li></ul><h2 id="U-BootBootloader">U-Boot Bootloader</h2>
    89 <p>
     9
     10Where you want implement a splash screen depends on the desired effect. For example:
     11 * if your intention is to provide feedback within the first second of power-up then you must do this in the bootloader (but be aware it will not persist for more than 1.5 seconds or so
     12 * if your intention is to provide feedback within the first 2 seconds then you'll get the most bang-for-your buck using a kernel splash
     13 * if your intention is to have a splash up until the moment that you can interact with the Android GUI then you at least have to use a userspace spash (for Android this is best done via the bootanimation.zip)
     14 * if you want visual feedback all along the way you may want to implement a bootloader splash, a kernel splash, and a userspace splash
     15
     16
     17[=#uboot]
     18== U-Boot Bootloader ==
    9019As previously mentioned, the first opportunity to display a splash screen becomes available at the start of bootloader execution. Being mainly responsible for configuring the DRAM controller and loading/executing the OS kernel, the bootloader's support for displays is rudimentary. However, there currently exists a small number of methods to configure the bootloader's splash screen.
    91 </p>
    92 <p>
     20
    9321The methods available to Ventana's U-boot are as follows:
    94 </p>
    95 <ol><li>Create a custom BMP logo <strong>(recommended)</strong>
    96 </li><li>Modify the default linux "Tux" logo
    97 </li><li>Load BMP from storage using environment
    98 </li></ol><p>
     221. Create a custom BMP logo '''(recommended)'''
     232. Modify the default linux "Tux" logo
     243. Load BMP from storage using environment
     25
    9926Bootloader Splash Screen Method Comparison:
    100 </p>
    101 <table class="wiki">
    102 <tr><th style="text-align: center">                         </th><th> Create Custom BMP Logo </th><th> Modify Default Linux Logo </th><th> Load From Storage
    103 </th></tr><tr><td style="text-align: left">Dynamic Placement          </td><td style="text-align: center">        <strong>X</strong>           </td><td style="text-align: center">                             </td><td style="text-align: center">     <strong>X</strong>         
    104 </td></tr><tr><td style="text-align: left">Immediate Display          </td><td style="text-align: center">        <strong>X</strong>           </td><td style="text-align: center">        <strong>X</strong>              </td><td style="text-align: center">                     
    105 </td></tr><tr><td style="text-align: left">Minimal Boot Speed Impact  </td><td style="text-align: center">        <strong>X</strong>           </td><td style="text-align: center">        <strong>X</strong>              </td><td style="text-align: center">                     
    106 </td></tr><tr><td style="text-align: left">Easy to Implement          </td><td style="text-align: center">        <strong>X</strong>           </td><td style="text-align: center">                             </td><td style="text-align: center">                     
    107 </td></tr><tr><td style="text-align: left">Modifiable in Environment  </td><td style="text-align: center">                          </td><td style="text-align: center">                             </td><td style="text-align: center">     <strong>X</strong>         
    108 </td></tr><tr><td style="text-align: left">No Color Limitations       </td><td style="text-align: center">                          </td><td style="text-align: center">                             </td><td style="text-align: center">     <strong>X</strong>         
    109 </td></tr></table>
    110 <p>
    111 In order to implement any of the aforementioned you will need access to a U-Boot build system. For more information see the <a class="wiki" href="/wiki/ventana/bootloader#BuildingfromSource">ventana/bootloader</a> wiki.
    112 </p>
    113 <p>
    114 By default, the Ventana bootloader has the following splash screen related configs defined in <tt>u-boot-imx6/include/configs/gw_ventana.h</tt>.
    115 </p>
    116 <div class="code"><pre><span class="cp">#define CONFIG_CFB_CONSOLE
    117 </span>              <span class="o">-</span> Enables console device <span class="k">for</span> a color framebuffer<span class="p">.</span>
    118 <span class="cp">#define CONFIG_VIDEO
    119 </span>              <span class="o">-</span> Define this to enable video support <span class="p">(</span><span class="k">for</span> output to video<span class="p">).</span>
    120 <span class="cp">#define CONFIG_VIDEO_LOGO
    121 </span>              <span class="o">-</span> Enable support <span class="k">for</span> display of Linux logo in upper left corner<span class="p">.</span>
    122 </pre></div><p>
     27||= Feature =||= Create Custom BMP Logo =||= Modify Default Linux Logo =||= Load From Storage ||
     28|| Dynamic Placement         ||  X  ||     ||  X  ||
     29|| Immediate Display         ||  X  ||  X  ||     ||   
     30|| Minimal Boot Speed Impact ||  X  ||  X  ||     ||   
     31|| Easy to Implement         ||  X  ||     ||     ||           
     32|| Modifiable in Environment ||     ||     ||  X  ||
     33|| No Color Limitations      ||     ||     ||  X  ||
     34
     35In order to implement any of the aforementioned you will need access to a U-Boot build system. For more information see the [wiki:ventana/bootloader#BuildingfromSource ventana/bootloader] wiki.
     36
     37By default, the Ventana bootloader has the following splash screen related configs defined in {{{u-boot-imx6/include/configs/gw_ventana.h}}}.
     38{{{#!bash
     39#define CONFIG_CFB_CONSOLE
     40              - Enables console device for a color framebuffer.
     41#define CONFIG_VIDEO
     42              - Define this to enable video support (for output to video).
     43#define CONFIG_VIDEO_LOGO
     44              - Enable support for display of Linux logo in upper left corner.
     45}}}
     46
    12347Before continuing, ensure that they are defined otherwise the following methods will not function as intended. For those wishing to suppress any sort of splash screen, removing these configs will disable all U-Boot video support.
    124 </p>
    125 <h3 id="CreateCustomBMPLogoMethod">Create Custom BMP Logo Method</h3>
    126 <p>
     48
     49
     50=== Create Custom BMP Logo Method ===
    12751This method simply involves creating a custom BMP image and placing it within the U-Boot build system where it will automatically be configured to be used as a splash screen image. All things considered, this is the recommended option for most users and is the default behavior for the latest Ventana bootloader.
    128 </p>
    129 <ul><li>Start by first completing a source compile of the Gateworks bootloader shown <a class="wiki" href="/wiki/ventana/bootloader#BuildingfromSource">here</a>
    130 </li></ul><ol><li>Begin by adding the following configs (omitting descriptions) to <tt>u-boot-imx6/include/configs/gw_ventana.h</tt>:
    131 <div class="code"><pre><span class="cp">#define CONFIG_VIDEO_LOGO
    132 </span>              <span class="o">-</span> Enable support <span class="k">for</span> display of Linux logo in upper left corner<span class="p">.</span>
    133 <span class="cp">#define CONFIG_VIDEO_BMP_LOGO
    134 </span>              <span class="o">-</span> Use bmp_logo<span class="p">.</span>h instead of linux_logo<span class="p">.</span>h <span class="k">for</span> logo<span class="p">.</span> Requires CONFIG_VIDEO_LOGO<span class="p">.</span>
    135 <span class="cp">#define CONFIG_SPLASH_SCREEN_ALIGN
    136 </span>              <span class="o">-</span> If this option is set the splash image <span class="p">(</span>or bmp logo<span class="p">)</span> can be freely positioned
    137                 on the screen<span class="p">.</span> Environment variable <span class="s">"splashpos"</span> specifies the position as
    138                 <span class="s">"x,y"</span><span class="p">.</span> If a positive number is given it is used as number of pixel from
    139                 left<span class="o">/</span>top<span class="p">.</span> If a negative number is given it is used as number of pixel from
    140                 right<span class="o">/</span>bottom<span class="p">.</span> You can also specify <span class="sc">'m'</span> as x and<span class="o">/</span>or y to center the image<span class="p">.</span>
    141 </pre></div><ul><li>Note that this is already done in the <a class="ext-link" href="https://github.com/Gateworks/u-boot-imx6"><span class="icon">​</span>current Gateworks bootloader source</a>
    142 </li></ul></li></ol><ol start="2"><li>Download and install the opensource photo editing software <a class="ext-link" href="https://www.gimp.org/downloads/"><span class="icon">​</span>GIMP</a>
    143 </li></ol><ol start="3"><li>Launch GIMP and open the logo to be used <tt>File &gt; Open...</tt>
    144 </li></ol><ol start="4"><li>Scale your image to the size of your target display <tt>Image &gt; Scale Image...</tt>. The width of your image <strong>*must*</strong> be equal to or less than the resolution of your display or the image will become distorted and may even hang the bootloader. Height values larger than your display will simply crop the image.
    145 <ol class="loweralpha"><li>If you plan on supporting multiple displays of different resolutions, a good approach is to scale your image to be compatible with your smallest display and set its background color to black so when centered it will look clean on your larger displays. You can quickly change the background color of your image in GIMP by using color select on your background color <tt>Select &gt; By Color</tt>, then using the bucket tool <tt>Tools &gt; Painting Tools &gt; Bucket Fill</tt> to fill the desired areas with black.
    146 </li></ol></li></ol><ol start="5"><li>Convert the image to index mode <tt>Image &gt; Mode &gt; Indexed...</tt>. Select the <tt>Generate optimum palette</tt> option and set your maximum number of colors to 224.
    147 </li></ol><ol start="6"><li>Open the export dialogue window <tt>File &gt; Export As...</tt>. Set the save location to <tt>u-boot-imx6/tools/logos/gateworks.bmp</tt>. Open the <tt>Select File Type (By Extension)</tt> menu located in the bottom left of the dialogue and select the Windows BMP Image (.bmp) extension. Select <tt>Export</tt>, and under <tt>Compatability Options</tt> select <tt>Do not write color space information</tt> before finally selecting <tt>Export</tt> again.
    148 <ol class="loweralpha"><li>Note that if your <tt>u-boot-imx6/board/gateworks/gw_ventana/Kconfig</tt> has BOARD or VENDOR changed from the defaults, rename the .bmp file to the value of BOARD or VENDOR otherwise the U-Boot Makefile will not generate the necessary files for your image.
    149 </li></ol></li></ol><ol start="7"><li>Navigate to your U-Boot build directory and kick off a <tt>make</tt> command. For information on compiling the bootloader, please see <a class="ext-link" href="http://trac.gateworks.com/wiki/ventana/bootloader#BuildingfromSource"><span class="icon">​</span>this page</a>.
    150 </li></ol><ol start="8"><li>Update your device's bootloader with the new binaries via <tt>run updateuboot</tt> from the bootloader or JTAG flashing. To see more information, please visit <a class="ext-link" href="http://trac.gateworks.com/wiki/ventana/bootloader#ProgrammingInstallingU-Boot"><span class="icon">​</span>this page</a>.
    151 </li></ol><ol start="9"><li>Break into your device's bootloader and set splashpos via <tt>setenv splashpos m,m</tt> then <tt>saveenv</tt>.
    152 <ol class="loweralpha"><li>If you wish for this to be a part of your default environment, add it to your <tt>CONFIG_EXTRA_ENV_SETTINGS_COMMON</tt> define statement.
    153 </li></ol></li></ol><p>
     52
     53Start by first completing a source compile of the Gateworks bootloader shown [wiki:ventana/bootloader#BuildingfromSource here]
     54
     551. Begin by adding the following configs (omitting descriptions) to {{{u-boot-imx6/include/configs/gw_ventana.h}}}:
     56{{{#!bash
     57#define CONFIG_VIDEO_LOGO
     58              - Enable support for display of Linux logo in upper left corner.
     59#define CONFIG_VIDEO_BMP_LOGO
     60              - Use bmp_logo.h instead of linux_logo.h for logo. Requires CONFIG_VIDEO_LOGO.
     61#define CONFIG_SPLASH_SCREEN_ALIGN
     62              - If this option is set the splash image (or bmp logo) can be freely positioned
     63                on the screen. Environment variable "splashpos" specifies the position as
     64                "x,y". If a positive number is given it is used as number of pixel from
     65                left/top. If a negative number is given it is used as number of pixel from
     66                right/bottom. You can also specify 'm' as x and/or y to center the image.
     67}}}
     68 * Note that this is already done in the ​[https://github.com/Gateworks/u-boot-imx6 current Gateworks bootloader source]
     692. Download and install the opensource photo editing software [https://www.gimp.org/downloads/ ​GIMP]
     703. Launch GIMP and open the logo to be used {{{File > Open...}}}
     714. Scale your image to the size of your target display {{{Image > Scale Image...}}}. The width of your image '''*must*''' be equal to or less than the resolution of your display or the image will become distorted and may even hang the bootloader. Height values larger than your display will simply crop the image.
     72 - If you plan on supporting multiple displays of different resolutions, a good approach is to scale your image to be compatible with your smallest display and set its background color to black so when centered it will look clean on your larger displays. You can quickly change the background color of your image in GIMP by using color select on your background color {{{Select > By Color}}}, then using the bucket tool {{{Tools > Painting Tools > Bucket Fill}}} to fill the desired areas with black.
     735. Convert the image to index mode {{{Image > Mode > Indexed...}}}. Select the {{{Generate optimum palette}}} option and set your maximum number of colors to 224.
     746. Open the export dialogue window {{{File > Export As...}}}. Set the save location to {{{u-boot-imx6/tools/logos/gateworks.bmp}}}. Open the {{{Select File Type (By Extension)}}} menu located in the bottom left of the dialogue and select the Windows BMP Image (.bmp) extension. Select {{{Export}}}, and under {{{Compatability Options}}} select {{{Do not write color space information}}} before finally selecting {{{Export}}} again.
     75 - Note that if your u-boot-imx6/board/gateworks/gw_ventana/Kconfig has BOARD or VENDOR changed from the defaults, rename the .bmp file to the value of BOARD or VENDOR otherwise the U-Boot Makefile will not generate the necessary files for your image.
     767. Navigate to your U-Boot build directory and kick off a {{{make}}} command. For information on compiling the bootloader, please see [wiki:ventana/bootloader#BuildingfromSource ​this page].
     778. Update your device's bootloader with the new binaries via {{{run updateuboot}}} from the bootloader or JTAG flashing. To see more information, please visit ​[wiki:ventana/bootloader#ProgrammingInstallingU-Boot this page].
     789. Break into your device's bootloader and set splashpos via {{{setenv splashpos m,m}}} then {{{saveenv}}}.
     79 - If you wish for this to be a part of your default environment, add it to your {{{CONFIG_EXTRA_ENV_SETTINGS_COMMON}}} define statement.
     80
    15481Upon reset and provided a display, the bootloader will now display your custom logo in the middle of your display.
    155 </p>
    156 <h3 id="ModifyDefaultLinuxLogoMethod">Modify Default Linux Logo Method</h3>
    157 <p>
    158 A secondary approach is to directly modify the file responsible for displaying the default linux "Tux" logo that comes standard on stock releases of U-Boot. While this is a somewhat straightforward concept, acquiring and using the dated tools to produce a header file in a similar format to <tt>u-boot-imx6/include/linux_logo.h</tt> can be problematic. This also has the same 224 color limitation, and using an image with dimensions other that 80x80 requires further editing of video driver source files. Therefore this method is discouraged.
    159 </p>
    160 <p>
    161 For those seeking further information and steps regardless, see <a class="ext-link" href="https://developer.ridgerun.com/wiki/index.php?title=IMX6_boot_logo#Changing_u-boot_boot_logo_from_source_code"><span class="icon">​</span>this page</a>.
    162 </p>
    163 <p>
    164 Displaying the default "Tux" logo (or your custom image) is enabled by adding the following config (omitting description) to <tt>u-boot-imx6/include/configs/gw_ventana.h</tt>:
    165 </p>
    166 <div class="code"><pre><span class="cp">#define CONFIG_VIDEO_LOGO
    167 </span>              <span class="o">-</span> Enable support <span class="k">for</span> display of Linux logo in upper left corner<span class="p">.</span>
    168 </pre></div><h3 id="BMPFromStorageMethod">BMP From Storage Method</h3>
    169 <p>
     82
     83
     84=== Modify Default Linux Logo Method ===
     85A secondary approach is to directly modify the file responsible for displaying the default linux "Tux" logo that comes standard on stock releases of U-Boot. While this is a somewhat straightforward concept, acquiring and using the dated tools to produce a header file in a similar format to {{{u-boot-imx6/include/linux_logo.h}}} can be problematic. This also has the same 224 color limitation, and using an image with dimensions other that 80x80 requires further editing of video driver source files. Therefore this method is discouraged.
     86
     87For those seeking further information and steps regardless, see [https://developer.ridgerun.com/wiki/index.php?title=IMX6_boot_logo#Changing_u-boot_boot_logo_from_source_code ​this page].
     88
     89Displaying the default "Tux" logo (or your custom image) is enabled by adding the following config (omitting description) to {{{u-boot-imx6/include/configs/gw_ventana.h}}}:
     90{{{#!bash
     91#define CONFIG_VIDEO_LOGO
     92              - Enable support for display of Linux logo in upper left corner.
     93}}}
     94
     95
     96=== BMP From Storage Method ===
    17097The final method for implementing a splash screen in U-Boot is by pulling a image from a storage medium at the beginning of the boot script using environment variables. This has the advantage of being able to change the splash screen image by using the bootloader environment or even within userspace by replacing the designated file. However this method still requires an initial editing of the bootloader source and is only recommended if the client wishes to have the ability to change the splash screen image frequently. It also has the added disadvantage of losing at least a few seconds of display time depending on your configuration. This occurs because of the need to first mount your storage medium which occurs after the boot delay during the bootcmd script.
    171 </p>
    172 <p>
     98
    17399This method can only use RBG (uncompressed) BMP images. As a result, no color limitation exists as is the case in previous methods. The steps are as follows:
    174 </p>
    175 <ol><li>Begin by adding the following configs (omitting descriptions) to <tt>u-boot-imx6/include/configs/gw_ventana.h</tt>:
    176 <div class="code"><pre><span class="cp">#define CONFIG_CMD_BMP
    177 </span>              <span class="o">-</span> Adds support <span class="k">for</span> displaying raw bmp images<span class="p">.</span>
    178 <span class="cp">#define CONFIG_SPLASH_SCREEN_ALIGN
    179 </span>              <span class="o">-</span> If this option is set the splash image <span class="p">(</span>or bmp logo<span class="p">)</span> can be freely positioned
    180                 on the screen<span class="p">.</span> Environment variable <span class="s">"splashpos"</span> specifies the position as
    181                 <span class="s">"x,y"</span><span class="p">.</span> If a positive number is given it is used as number of pixel from
    182                 left<span class="o">/</span>top<span class="p">.</span> If a negative number is given it is used as number of pixel from
    183                 right<span class="o">/</span>bottom<span class="p">.</span> You can also specify <span class="sc">'m'</span> as x and<span class="o">/</span>or y to center the image<span class="p">.</span>
    184 </pre></div></li></ol><ol start="2"><li>Make the below bootloader environment edits in the bootloader itself or in the CONFIG_EXTRA_ENV_SETTINGS_COMMON definition in <tt>gw_ventana.h</tt>:
    185 <div class="code"><pre>setenv splash GWLogo.bmp
     1001. Begin by adding the following configs (omitting descriptions) to {{{u-boot-imx6/include/configs/gw_ventana.h}}}:
     101{{{#!bash
     102#define CONFIG_CMD_BMP
     103              - Adds support for displaying raw bmp images.
     104#define CONFIG_SPLASH_SCREEN_ALIGN
     105              - If this option is set the splash image (or bmp logo) can be freely positioned
     106                on the screen. Environment variable "splashpos" specifies the position as
     107                "x,y". If a positive number is given it is used as number of pixel from
     108                left/top. If a negative number is given it is used as number of pixel from
     109                right/bottom. You can also specify 'm' as x and/or y to center the image.
     110}}}
     1112. Make the below bootloader environment edits in the bootloader itself or in the {{{CONFIG_EXTRA_ENV_SETTINGS_COMMON}}} definition in {{{gw_ventana.h}}}:
     112{{{#!bash
     113setenv splash GWLogo.bmp
    186114
    187115setenv splashpos m,m
    188116
    189 setenv show_splash <span class="s1">'${fsload} ${loadaddr} ${bootdir}/${splash}; bmp d ${loadaddr}'</span>
    190 
    191 setenv flash_boot <span class="s1">'setenv fsload ubifsload; ubi part rootfs; if ubi check boot; \
     117setenv show_splash '${fsload} ${loadaddr} ${bootdir}/${splash}; bmp d ${loadaddr}'
     118
     119setenv flash_boot 'setenv fsload ubifsload; ubi part rootfs; if ubi check boot; \
    192120then ubifsmount ubi0:boot; setenv root ubi0:rootfs ubi.mtd=2 rootfstype=squashfs,ubifs; \
    193121setenv bootdir; elif ubi check rootfs; then ubifsmount ubi0:rootfs; \
     
    196124then setenv bootargs console=${console},${baudrate} root=${root} ${video} ${extra}; \
    197125if run loadfdt; then ubifsumount; bootm ${loadaddr} - ${fdt_addr}; \
    198 else ubifsumount; bootm; fi; fi'</span>
    199 </pre></div><sub>Note that the added <tt>run show_splash</tt> must be after the ubi mounting and before the loadscript execution as shown.
    200 </sub></li></ol><ol start="3"><li>Open the <a class="wiki" href="/wiki/linux/ubi#OnatargetboardwithNANDFLASH">linux/ubi</a> wiki and follow the example "Mounting UBI NAND FLASH volume" (replace rootfs with boot)
    201 </li></ol><ol start="4"><li>Place your BMP image in your boot volume under the same name as your <tt>splash</tt> environment variable.
    202 </li></ol><h3 id="RelatedSourceFiles">Related Source Files</h3>
    203 <p>
     126else ubifsumount; bootm; fi; fi'
     127}}}
     128 * Note that the added run show_splash must be after the ubi mounting and before the loadscript execution as shown.
     1293. Open the [wiki:/linux/ubi linux/ubi] wiki and follow the example "Mounting UBI NAND FLASH volume" (replace rootfs with boot)
     1304. Place your BMP image in your boot volume under the same name as your {{{splash}}} environment variable.
     131
     132
     133=== Related Source Files ===
    204134For those interested in seeing the primary source code related to the displaying of splash screens in U-boot the following list has been created for your convenience.
    205 </p>
    206 <ul><li>Within the <tt>include</tt> folder:
    207 <ul><li><tt>bmp_layout.h</tt> - defines a bmp image header
    208 </li><li><tt>bmp_logo_data.h</tt> - the data contents of a bmp logo
    209 </li><li><tt>bmp_logo.h</tt> - the metadata of a bmp logo (dimensions etc)
    210 </li><li><tt>linux_logo.h</tt> - default linux logo (sitting penguin aka tux)
    211 </li></ul></li><li>Within the <tt>tools</tt> folder:
    212 <ul><li><tt>bmp_logo.c</tt> - c tool that converts a raw bmp image into data headers used for logos in bootloader
    213 </li><li><tt>bmp_logo</tt> - executable of bmp_logo.c
    214 </li></ul></li><li>Within the <tt>doc</tt> folder:
    215 <ul><li><tt>README.displaying-bmps</tt> - discusses memory alignment issues when using BMP from storage
    216 </li><li><tt>README.splashprepare</tt> - discusses possibility of custom preprocessing for BMP images
    217 </li></ul></li><li>Within the <tt>common</tt> folder:
    218 <ul><li><tt>lcd.c</tt> - responsible for displaying BMPs from storage
    219 </li></ul></li><li>Within the <tt>drivers/video/</tt> folder:
    220 <ul><li><tt>cfb_console.c</tt> - responsible for displaying BMPs injected at compile time (first two methods)
    221 </li><li><tt>fbcon.c</tt> - file to change hardcoded dimension values in if modifying default linux logo
    222 </li></ul></li><li><tt>board/gateworks/gw_ventana/Kconfig</tt> - contains the config targets to define BOARD and VENDOR
    223 </li></ul><h3 id="SuppressingU-BootVersion">Suppressing U-Boot Version</h3>
    224 <p>
     135* Within the include folder:
     136 - bmp_layout.h - defines a bmp image header
     137 - bmp_logo_data.h - the data contents of a bmp logo
     138 - bmp_logo.h - the metadata of a bmp logo (dimensions etc)
     139 - linux_logo.h - default linux logo (sitting penguin aka tux)
     140* Within the tools folder:
     141 - bmp_logo.c - c tool that converts a raw bmp image into data headers used for logos in bootloader
     142 - bmp_logo - executable of bmp_logo.c
     143* Within the doc folder:
     144 - README.displaying-bmps - discusses memory alignment issues when using BMP from storage
     145 - README.splashprepare - discusses possibility of custom preprocessing for BMP images
     146* Within the common folder:
     147 - lcd.c - responsible for displaying BMPs from storage
     148* Within the drivers/video/ folder:
     149 - cfb_console.c - responsible for displaying BMPs injected at compile time (first two  methods)
     150 - fbcon.c - file to change hardcoded dimension values in if modifying default linux logo
     151* board/gateworks/gw_ventana/Kconfig - contains the config targets to define BOARD and VENDOR
     152
     153
     154=== Suppressing U-Boot Version ===
    225155After following one of the above methods to change your bootloader's splash image, you may have noticed that editing the image alone still leaves the U-Boot version string displayed on the right side of the image (or overflowed onto the image itself). While some clients may want this information present, for those that do not we have implemented a small code change in our latest bootloader to add the ability of hiding this U-Boot version information.
    226 </p>
    227 <p>
    228 We added the ability to the Gateworks bootloader to disable this via CONFIG_HIDE_LOGO_VERSION which is defined in <tt>u-boot-imx6/include/configs/gw_ventana.h</tt>:
    229 </p>
    230 <div class="code"><pre><span class="cp">#define CONFIG_HIDE_LOGO_VERSION
    231 </span>              <span class="o">-</span> Custom config to hide U<span class="o">-</span>boot version when CONFIG_VIDEO_LOGO
     156
     157We added the ability to the Gateworks bootloader to disable this via {{{CONFIG_HIDE_LOGO_VERSION}}} which is defined in {{{u-boot-imx6/include/configs/gw_ventana.h}}}:
     158{{{#!bash
     159#define CONFIG_HIDE_LOGO_VERSION
     160              - Custom config to hide U-boot version when CONFIG_VIDEO_LOGO
    232161                or CONFIG_VIDEO_BMP_LOGO is defined
    233 </pre></div><ul><li>If you want the see the version info, undefine this to bring it back
    234 </li></ul><p>
     162}}}
     163
     164If you want the see the version info, undefine this to bring it back
     165
    235166For those using a different bootloader version that would like to implement this behavior themselves, see the following git diff and apply it as a patch or make the manual edits yourself:
    236 </p>
    237 <div class="code"><pre><span class="gh">diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
     167{{{#!bash
     168diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
    238169index a81affa..60a44e6 100644
    239 </span><span class="gd">--- a/drivers/video/cfb_console.c
    240 </span><span class="gi">+++ b/drivers/video/cfb_console.c
    241 </span><span class="gu">@@ -1986,7 +1986,6 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black)
    242 </span> static void *video_logo(void)
     170--- a/drivers/video/cfb_console.c
     171+++ b/drivers/video/cfb_console.c
     172@@ -1986,7 +1986,6 @@ static void plot_logo_or_black(void *screen, int width, int x, int y, int black)
     173 static void *video_logo(void)
    243174 {
    244175        char info[128];
    245 <span class="gd">-       int space, len;
    246 </span>        __maybe_unused int y_off = 0;
     176-       int space, len;
     177        __maybe_unused int y_off = 0;
    247178        __maybe_unused ulong addr;
    248179        __maybe_unused char *s;
    249 <span class="gu">@@ -2036,6 +2035,8 @@ static void *video_logo(void)
    250 </span>
     180@@ -2036,6 +2035,8 @@ static void *video_logo(void)
     181
    251182        sprintf(info, " %s", version_string);
    252183
    253 <span class="gi">+#ifndef CONFIG_HIDE_LOGO_VERSION
     184+#ifndef CONFIG_HIDE_LOGO_VERSION
    254185+       int space, len;
    255 </span>        space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
     186        space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
    256187        len = strlen(info);
    257188
    258 <span class="gu">@@ -2048,6 +2049,7 @@ static void *video_logo(void)
    259 </span>                y_off = 1;
     189@@ -2048,6 +2049,7 @@ static void *video_logo(void)
     190                y_off = 1;
    260191        } else
    261192                video_drawstring(VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *) info);
    262 <span class="gi">+#endif
    263 </span>
     193+#endif
     194
    264195 #ifdef CONFIG_CONSOLE_EXTRA_INFO
    265196        {
    266 </pre></div><h2 id="LinuxKernel">Linux Kernel</h2>
    267 <p>
     197}}}
     198
     199
     200[=#kernel]
     201== Linux Kernel ==
    268202Additionally, the Linux kernel has static splash-screen support. This is also very rudimentary however kernel code changes can be made to specify the graphic that is displayed.
    269 </p>
    270 <ol><li>Begin by following the steps at the <a class="wiki" href="/wiki/linux/kernel#BuildingtheLinuxkernelout-of-tree">linux/kernel</a> to set up a development environment for the linux kernel.
    271 </li></ol><ol start="2"><li>Download and install the opensource photo editing software <a class="ext-link" href="https://www.gimp.org/downloads/"><span class="icon">​</span>GIMP</a> if you have not done so already.
    272 </li></ol><ol start="3"><li>Launch GIMP and open the logo or image to be used <tt>File &gt; Open...</tt>
    273 </li></ol><ol start="4"><li>Open the export dialogue window <tt>File &gt; Export As...</tt>. Set the save location to your kernel working directory. Open the <tt>Select File Type (By Extension)</tt> menu located in the bottom left of the dialogue and select the PNM Image (.pnm) extension. Select <tt>Export</tt>, ensure that the Data Formatting type is <tt>Raw</tt> then select <tt>Export</tt> again to finish.
    274 </li></ol><ol start="5"><li>Convert to 224 color pnm using <tt>ppmquant</tt>:
    275 <div class="code"><pre>ppmquant 224 &lt;gimp_export_file&gt;.pnm &gt; logo_linux_clut224.ppm
    276 </pre></div></li></ol><ol start="6"><li>Convert to plain ppm and copy to kernel logo directory:
    277 <div class="code"><pre>pnmtoplainpnm logo_linux_clut224.ppm &gt; drivers/video/logo/logo_linux_clut224.ppm
    278 </pre></div></li></ol><ol start="7"><li>Build and deploy new kernel.
    279 </li></ol><h3 id="FurtherKernelOptions">Further Kernel Options</h3>
    280 <p>
     203
     2041. Begin by following the steps at the [wiki:linux/kernel linux/kernel] to set up a development environment for the linux kernel.
     2052. Download and install the opensource photo editing software [https://www.gimp.org/downloads/ ​GIMP] if you have not done so already.
     2063. Launch GIMP and open the logo or image to be used File > Open...
     2074. Open the export dialogue window {{{File > Export As...}}}. Set the save location to your kernel working directory. Open the {{{Select File Type (By Extension)}}} menu located in the bottom left of the dialogue and select the PNM Image (.pnm) extension. Select {{{Export}}}, ensure that the Data Formatting type is {{{Raw}}} then select {{{Export}}} again to finish.
     2085. Convert to 224 color pnm using {{{ppmquant}}}:
     209{{{#!bash
     210ppmquant 224 <gimp_export_file>.pnm > logo_linux_clut224.ppm
     211}}}
     2126. Convert to plain ppm and copy to kernel logo directory:
     213{{{#!bash
     214pnmtoplainpnm logo_linux_clut224.ppm > drivers/video/logo/logo_linux_clut224.ppm
     215}}}
     2167. Build and deploy new kernel.
     217
     218
     219=== Further Kernel Options ===
    281220While there is some severe limitations to the capabilities of splash screen support in the linux kernel, there does exist some possible improvements/modifications that require editing the kernel source.
    282 </p>
    283 <p>
     221
    284222Some modifications with accompanying links for those looking to investigate further:
    285 </p>
    286 <ul><li>Using bootloader framebuffer
    287 </li></ul><blockquote>
    288 <p>
    289 One potential work around for the limitations inherent to the built in splash capabilities of the linux kernel is by using the same framebuffer that the bootloader prepared. This has been implemented by another developer via the CONFIG_FB_PRE_INIT_FB config option and can be seen in <tt>drivers/video/mb862xx/mb862xxfbdrv.c</tt>. Further information about this config can be seen <a class="ext-link" href="http://www.denx.de/wiki/view/DULG/LinuxSplashScreen"><span class="icon">​</span>here</a> and <a class="ext-link" href="http://osdir.com/ml/linux-kernel/2009-04/msg10153.html"><span class="icon">​</span>here</a>.
    290 </p>
    291 </blockquote>
    292 <blockquote>
    293 <p>
    294 A similar method utilizing the bootloader's prepared framebuffer involves saving the contents of the framebuffer device after the splash has been presented and then directly writing that saved file to the framebuffer within the kernel. More information <a class="ext-link" href="http://free-electrons.com/blog/super-fast-linux-splashscreen/"><span class="icon">​</span>here</a>.
    295 </p>
    296 </blockquote>
    297 <ul><li>Fix backlight flickering
    298 </li></ul><blockquote>
    299 <p>
    300 During the kernel boot process a number of different drivers go through a cycle of registering display hardware which includes a pwm controlled backlight if present. This results in what appears to be a "flickering" display where varying driver defaults cause rapid changes to the backlight intensity. A potential solution would be to edit said pwm driver defaults so they all hold the same value, or remove the assignment alltogether. Further information on linux core PWM drivers can be found <a class="ext-link" href="http://processors.wiki.ti.com/index.php/Linux_Core_PWM_User%27s_Guide#Introduction"><span class="icon">​</span>here</a>.
    301 </p>
    302 </blockquote>
    303 <ul><li>Disable flashing framebuffer cursor
    304 </li></ul><blockquote>
    305 <p>
    306 For some kernel splash implementations a flashing console cursor can appear during boot which may overwrite a portion of the framebuffer that was originally displaying a splash image. If this situation applies, you can disable the cursor by editing the <tt>drivers/video/console/fbcon.c</tt> driver and removing all of the logic in the <tt>static void fbcon_cursor(...)</tt> function.
    307 </p>
    308 </blockquote>
    309 <h2 id="PSplash">PSplash</h2>
    310 <p>
    311 Both the Yocto and OpenWrt BSPs currently have built in support for kernel splash editing via <a class="ext-link" href="http://git.yoctoproject.org/cgit/cgit.cgi/psplash/about/"><span class="icon">​</span>PSplash</a>.
    312 </p>
    313 <p>
    314 PSplash is a userspace graphical boot splash screen for mainly embedded Linux devices supporting a 16bpp or 32bpp framebuffer. It has few dependencies (just libc), supports basic images and text and handles rotation. An early init script kicks off the <tt>psplash</tt> daemon and further init scripts use the <tt>psplash-write</tt> app to send single argument commands to advance the progress bar and finally exit the daemon.
    315 </p>
    316 <p>
     223* Using bootloader framebuffer
     224One potential work around for the limitations inherent to the built in splash capabilities of the linux kernel is by using the same framebuffer that the bootloader prepared. This has been implemented by another developer via the CONFIG_FB_PRE_INIT_FB config option and can be seen in drivers/video/mb862xx/mb862xxfbdrv.c. Further information about this config can be seen ​here and ​here.
     225
     226A similar method utilizing the bootloader's prepared framebuffer involves saving the contents of the framebuffer device after the splash has been presented and then directly writing that saved file to the framebuffer within the kernel. More information ​here.
     227
     228* Fix backlight flickering
     229During the kernel boot process a number of different drivers go through a cycle of registering display hardware which includes a pwm controlled backlight if present. This results in what appears to be a "flickering" display where varying driver defaults cause rapid changes to the backlight intensity. A potential solution would be to edit said pwm driver defaults so they all hold the same value, or remove the assignment alltogether. Further information on linux core PWM drivers can be found ​here.
     230
     231* Disable flashing framebuffer cursor
     232For some kernel splash implementations a flashing console cursor can appear during boot which may overwrite a portion of the framebuffer that was originally displaying a splash image. If this situation applies, you can disable the cursor by editing the drivers/video/console/fbcon.c driver and removing all of the logic in the static void fbcon_cursor(...) function.
     233
     234
     235[=#psplash]
     236== PSplash ==
     237Both the Yocto and OpenWrt BSPs currently have built in support for kernel splash editing via ​[http://git.yoctoproject.org/cgit/cgit.cgi/psplash/about/ PSplash].
     238
     239PSplash is a userspace graphical boot splash screen for mainly embedded Linux devices supporting a 16bpp or 32bpp framebuffer. It has few dependencies (just libc), supports basic images and text and handles rotation. An early init script kicks off the psplash daemon and further init scripts use the {{{psplash-write}}} app to send single argument commands to advance the progress bar and finally exit the daemon.
     240
    317241Example usage:
    318 </p>
    319 <div class="code"><pre>psplash &amp;                      <span class="c"># run daemon in background
    320 </span>psplash-write MSG <span class="s2">"my message"</span> <span class="c"># display message
    321 </span>psplash-write PROGRESS &lt;n&gt;     <span class="c"># set progress bar (from 0 to 100%)
    322 </span>psplash-write QUIT             <span class="c"># remove splash and exit daemon
    323 </span></pre></div><p>
     242{{{#!bash
     243psplash &                      # run daemon in background
     244psplash-write MSG "my message" # display message
     245psplash-write PROGRESS <n>     # set progress bar (from 0 to 100%)
     246psplash-write QUIT             # remove splash and exit daemon
     247}}}
     248
    324249To modify the image displayed when the daemon is running, begin by following the set up instructions specific to your BSP
    325 </p>
    326 <ul><li><a class="wiki" href="/wiki/ventana/SplashScreen#YoctoSetUp">Yocto Set Up</a>
    327 </li><li><a class="wiki" href="/wiki/ventana/SplashScreen#OpenWrtSetUp">OpenWrt Set Up</a>
    328 </li></ul><h3 id="YoctoSetUp">Yocto Set Up</h3>
    329 <p>
    330 For demonstration purposes we will simply replace the header file in the psplash directory <tt>sources/poky/meta/recipes-core/psplash/files/psplash-poky-img.h</tt> that is acts as the source for the default splash image. However, if you are managing your own layer, the recommended method for customizing a logo is to mimic what meta-yocto does in its layer (i.e. copy the <tt>meta-yocto/recipes-core/psplash</tt> directory into your own layer and overwrite that header file) rather than changing the default psplash-poky-img.h.
    331 </p>
    332 <ol><li>Begin by following the instructions at <a class="wiki" href="/wiki/Yocto/Building">Yocto/Building</a> to set up a working environment.
    333 </li></ol><ol start="2"><li>If you do not have one already, create a JPEG (jpg, jpeg, jpe) logo that will fit the dimensions of your display.
    334 <ol class="loweralpha"><li>If planning to support multiple displays, scale your JPEG logo to a size that will fit your smallest display and fill the image with a <span style="background: #EFEFE7">grey</span> background (HTML color is specifically <span style="background: #EFEFE7">#EFEFE7</span>). PSplash will automatically center your image against its own background, making a single image look clean on multiple displays of varying dimensions. For steps on creating a logo, or filling the background color, refer to the <a class="wiki" href="/wiki/ventana/SplashScreen#CreateCustomBMPLogo">above</a> section.
    335 </li></ol></li></ol><ol start="3"><li>Use the <tt>make-image-header.sh</tt> shell script to create the header file that will be used during compile time. This script is located within the PSplash package and can be found via a <tt>find &lt;BUILD_DIR&gt; -name "make-image-header.sh"</tt>.
    336 <ol class="loweralpha"><li>An example result of this find command would be <tt>&lt;BUILD_DIR&gt;/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/psplash/0.1+gitAUTOINC+14c8f7b705-r15/git/make-image-header.sh</tt>, however your directory may be different depending on architecture/versions etc.
    337 </li></ol></li></ol><blockquote>
    338 <p>
    339 Example usage:
    340 </p>
    341 <div class="code"><pre>./make-image-header.sh /&lt;PATH&gt;/&lt;IMAGE&gt;.jpg POKY
    342 </pre></div></blockquote>
    343 <ol start="4"><li>Copy the resulting header to the psplash recipe header under the recipe's "files" directory:
    344 <div class="code"><pre>cp &lt;IMAGE&gt;.h &lt;BUILD_DIR&gt;/sources/poky/meta-yocto/recipes-core/psplash/files/psplash-poky-img.h
    345 </pre></div>Alternatively, you could also use the fact that 'MACHINE' is inserted into the files search path and just add a new file to the <tt>ventana</tt> directory:
    346 <div class="code"><pre>mkdir poky/meta-yocto/recipes-core/psplash/files/ventana
     250* [wiki:ventana/SplashScreen#YoctoSetUp Yocto Set Up]
     251* [wiki:ventana/SplashScreen#OpenWrtSetUp OpenWrt Set Up]
     252
     253=== Yocto Set Up ===
     254For demonstration purposes we will simply replace the header file in the psplash directory {{{sources/poky/meta/recipes-core/psplash/files/psplash-poky-img.h}}} that is acts as the source for the default splash image. However, if you are managing your own layer, the recommended method for customizing a logo is to mimic what meta-yocto does in its layer (i.e. copy the {{{meta-yocto/recipes-core/psplash}}} directory into your own layer and overwrite that header file) rather than changing the default psplash-poky-img.h.
     2551. Begin by following the instructions at Yocto/Building to set up a working environment.
     2562. If you do not have one already, create a JPEG (jpg, jpeg, jpe) logo that will fit the dimensions of your display.
     257 - If planning to support multiple displays, scale your JPEG logo to a size that will fit your smallest display and fill the image with a grey background (HTML color is specifically #EFEFE7). PSplash will automatically center your image against its own background, making a single image look clean on multiple displays of varying dimensions. For steps on creating a logo, or filling the background color, refer to the above section.
     2583. Use the make-image-header.sh shell script to create the header file that will be used during compile time. This script is located within the PSplash package and can be found via a find <BUILD_DIR> -name "make-image-header.sh".
     259 
     260  An example result of this find command would be {{{<BUILD_DIR>/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/psplash/0.1+gitAUTOINC+14c8f7b705-r15/git/make-image-header.sh}}}, however your directory may be different depending on architecture/versions etc.
     261
     262 Example usage:
     263{{{#!bash
     264./make-image-header.sh /<PATH>/<IMAGE>.jpg POKY
     265}}}
     2664. Copy the resulting header to the psplash recipe header under the recipe's "files" directory:
     267{{{#!bash
     268cp <IMAGE>.h <BUILD_DIR>/sources/poky/meta-yocto/recipes-core/psplash/files/psplash-poky-img.h
     269}}}
     270 Alternatively, you could also use the fact that 'MACHINE' is inserted into the files search path and just add a new file to the ventana directory:
     271{{{#!bash
     272mkdir poky/meta-yocto/recipes-core/psplash/files/ventana
    347273cp psplash-poky-img.h poky/meta-yocto/recipes-core/psplash/files/ventana/
    348 </pre></div></li><li>Rebuild the PSplash package.
    349 <ol class="loweralpha"><li>If unfamiliar with package rebuilding you can use the following <tt>rebuild</tt> shell script and execute via <tt>./rebuild psplash</tt> while within your build directory.
    350 <div class="code"><pre><span class="c">#!/bin/bash
    351 </span>
    352 <span class="c"># $1 is the recipe to install
    353 </span>install<span class="o">()</span> <span class="o">{</span>
    354     <span class="nb">local </span><span class="nv">recipe</span><span class="o">=</span><span class="s2">"$@"</span>
    355     bitbake -f -c clean <span class="s2">"${recipe}"</span> <span class="o">&amp;&amp;</span> bitbake --no-setscene <span class="s2">"${recipe}"</span> <span class="o">&amp;&amp;</span> bitbake package-index
    356 <span class="o">}</span>
    357 
    358 runme<span class="o">()</span> <span class="o">{</span>
    359     <span class="k">case</span> <span class="s2">"$1"</span> in
    360         all<span class="o">)</span>
     274}}}
     2755. Rebuild the PSplash package.
     276
     277 If unfamiliar with package rebuilding you can use the following rebuild shell script and execute via {{{./rebuild psplash}}} while within your build directory.
     278{{{#!bash
     279#!/bin/bash
     280
     281# $1 is the recipe to install
     282install() {
     283    local recipe="$@"
     284    bitbake -f -c clean "${recipe}" && bitbake --no-setscene "${recipe}" && bitbake package-index
     285}
     286
     287runme() {
     288    case "$1" in
     289        all)
    361290            install gateworks-image-minimal
    362291            install gateworks-image-test
     
    364293            install gateworks-image-gui
    365294            ;;
    366         *<span class="o">)</span> install <span class="s2">"$@"</span>;;
    367     <span class="k">esac</span>
    368 <span class="o">}</span>
    369 
    370 <span class="o">[</span> <span class="s2">"$1"</span> <span class="o">]</span> <span class="o">||</span> <span class="nb">exit </span>1
    371 
    372 <span class="nb">echo</span> <span class="s2">"Note, this will hard-rebuild"</span>
    373 <span class="nb">time </span>runme <span class="s2">"$@"</span>
    374 </pre></div></li><li>You can verify the success of the custom image insertion by comparing your generated image header file against the one located in the work directory that PSplash was built in. To locate said directory, you can use the example find command from step 3. The directory should follow the pattern: <tt>build/tmp/work/&lt;ARCHITECTURE_VERSION&gt;/psplash/&lt;GIT_VERSION&gt;/git/</tt>
    375 </li></ol></li></ol><ol start="6"><li>Rebuild the BSP.
    376 <div class="code"><pre>. ./setup-environment build        <span class="c"># activate a bitbake shell if not already done
    377 </span>bitbake gateworks-image-multimedia <span class="c"># replace argument with desired target
    378 </span></pre></div></li></ol><ol start="7"><li>Deploy the resulting .ubi files located under <tt>&lt;BUILD_DIR&gt;/tmp/deploy/images/ventana/</tt> to target machine.
    379 </li></ol><h3 id="OpenWrtSetUp">OpenWrt Set Up</h3>
    380 <p>
    381 Although <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> has built in support for <a class="ext-link" href="http://git.yoctoproject.org/cgit/cgit.cgi/psplash/about/"><span class="icon">​</span>PSplash</a>, it is not included in our default configuration for the BSP. It can be added by adding the oldpackages feed. Otherwise the <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> steps are very similar to the Yocto process.
    382 </p>
    383 <p>
    384 Note that due to differences in the boot process of <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a>, the progress bar functionality of PSplash is disabled. For the related patch see <tt>package/feeds/oldpackages/psplash/patches/001-hide-msgfield-and-progressbar.patch</tt> after step <strong>5</strong>.
    385 </p>
    386 <ol><li>Follow the steps at the <a class="wiki" href="/wiki/OpenWrt/building">OpenWrt/building</a> wiki to set up an OpenWrt development environment.
    387 <ol class="loweralpha"><li>The rest of the steps here assume your present working directory is the top level <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> folder.
    388 </li></ol></li></ol><ol start="2"><li>Edit <tt>./feeds.conf.default</tt> and uncomment the "oldpackages" feed.
    389 </li></ol><ol start="3"><li>Update all package feeds: <tt>./scripts/feeds update</tt>
    390 </li></ol><ol start="4"><li>Install PSplash and default it to yes (enabled): <tt>./scripts/feeds install -dy psplash</tt>
    391 </li></ol><ol start="5"><li>Execute a top level build to create the tools necessary for making a custom logo header file: <tt>make -j1 V=s</tt>
    392 </li></ol><ol start="6"><li>If you do not have one already, create a JPEG (jpg, jpeg, jpe) logo that will fit the dimensions of your display.
    393 <ol class="loweralpha"><li>If planning to support multiple displays, scale your JPEG logo to a size that will fit your smallest display and fill the image with a <span style="background: #192A65; color: #FFFFFF">blue</span> background (HTML color is specifically <span style="background: #192A65; color: #FFFFFF">#192A65</span>). PSplash will automatically center your image against its own background, making a single image look clean on multiple displays of varying dimensions. For steps on creating a logo, or filling the background color, refer to the <a class="wiki" href="/wiki/ventana/SplashScreen#CreateCustomBMPLogo">above</a> section.
    394 </li><li>See the patch located at <tt>package/feeds/oldpackages/psplash/patches/000-adjust-for-openwrt.patch</tt> for information on changing the background PSplash color.
    395 </li></ol></li></ol><ol start="7"><li>Use the <tt>make-image-header.sh</tt> shell script to create the header file that will be used during compile time. This script is located within the PSplash package and can be found via a <tt>find &lt;BUILD_DIR&gt; -name "make-image-header.sh"</tt>.
    396 <ol class="loweralpha"><li>An example result of this find command would be <tt>build_dir/target-arm_cortex-a9+neon_musl-1.1.12_eabi/psplash-0.1/make-image-header.sh</tt>, however your directory may be different depending on architecture/versions etc.
    397 </li></ol></li></ol><blockquote>
    398 <p>
    399 Example usage:
    400 </p>
    401 <div class="code"><pre>./make-image-header.sh /&lt;PATH&gt;/&lt;IMAGE&gt;.jpg
    402 </pre></div></blockquote>
    403 <ol start="8"><li>Use the resulting header file to replace the one located at <tt>package/feeds/oldpackages/psplash/files/image_generic.h</tt>
    404 </li></ol><ol start="9"><li>Clean the psplash package <tt>make package/feeds/oldpackages/psplash/clean</tt>
    405 </li></ol><ol start="10"><li>Install the psplash package <tt>make package/feeds/oldpackages/psplash/install</tt>
    406 </li></ol><ol start="11"><li>Perform a top level make once again <tt>make -j1 V=s</tt>. This should only need to rebuild the psplash package.
    407 </li></ol><ol start="12"><li>Deploy the images created under <tt>bin/imx6/</tt> to target boards.
    408 </li></ol><h2 id="Android">Android</h2>
    409 <p>
    410 There currently exists two separate processes in Android that display graphics during the boot process. The first uses an image named <tt>initlogo.rle</tt> which lasts between 1-2 seconds and displays immediately after the kernel has finished booting and passed control to the Android userspace. The second uses a zip folder containing an animation that is named <tt>bootanimation.zip</tt> which then lasts until booting has finished (~15 seconds). Both of these image sources can be modified to display custom graphics.
    411 </p>
    412 <p>
    413 Before attempting to modify either of these sources, follow the steps at <a class="wiki" href="/wiki/Android/Building#BuildingAndroidforVentanafromsource">Android/Building</a> if you have not set up a working source directory.
    414 </p>
    415 <p>
     295        *) install "$@";;
     296    esac
     297}
     298
     299[ "$1" ] || exit 1
     300
     301echo "Note, this will hard-rebuild"
     302time runme "$@"
     303}}}
     304
     305 You can verify the success of the custom image insertion by comparing your generated image header file against the one located in the work directory that PSplash was built in. To locate said directory, you can use the example find command from step 3. The directory should follow the pattern: build/tmp/work/<ARCHITECTURE_VERSION>/psplash/<GIT_VERSION>/git/
     3066. Rebuild the BSP.
     307{{{#!bash
     308. ./setup-environment build        # activate a bitbake shell if not already done
     309bitbake gateworks-image-multimedia # replace argument with desired target
     310}}}
     3117. Deploy the resulting .ubi files located under {{{<BUILD_DIR>/tmp/deploy/images/ventana/}}} to target machine.
     312
     313
     314=== OpenWrt Set Up ===
     315Although OpenWrt has built in support for ​PSplash, it is not included in our default configuration for the BSP. It can be added by adding the oldpackages feed. Otherwise the OpenWrt steps are very similar to the Yocto process.
     316
     317Note that due to differences in the boot process of OpenWrt, the progress bar functionality of PSplash is disabled. For the related patch see {{{package/feeds/oldpackages/psplash/patches/001-hide-msgfield-and-progressbar.patch}}} after step 5.
     318
     3191. Follow the steps at the OpenWrt/building wiki to set up an OpenWrt development environment.
     320 - The rest of the steps here assume your present working directory is the top level OpenWrt folder.
     3212. Edit {{{./feeds.conf.default}}} and uncomment the "oldpackages" feed.
     3223. Update all package feeds: {{{./scripts/feeds update}}}
     3234. Install PSplash and default it to yes (enabled): {{{./scripts/feeds install -dy psplash}}}
     3245. Execute a top level build to create the tools necessary for making a custom logo header file: {{{make -j1 V=s}}}
     3256. If you do not have one already, create a JPEG (jpg, jpeg, jpe) logo that will fit the dimensions of your display.
     326 - If planning to support multiple displays, scale your JPEG logo to a size that will fit your smallest display and fill the image with a blue background (HTML color is specifically #192A65). PSplash will automatically center your image against its own background, making a single image look clean on multiple displays of varying dimensions. For steps on creating a logo, or filling the background color, refer to the above section.
     327 - See the patch located at {{{package/feeds/oldpackages/psplash/patches/000-adjust-for-openwrt.patch}}} for information on changing the background PSplash color.
     3287. Use the {{{make-image-header.sh}}} shell script to create the header file that will be used during compile time. This script is located within the PSplash package and can be found via a find <BUILD_DIR> -name "make-image-header.sh".
     329
     330  An example result of this find command would be build_dir/target-arm_cortex-a9+neon_musl-1.1.12_eabi/psplash-0.1/make-image-header.sh, however your directory may be different depending on architecture/versions etc.
     331
     332  Example usage:
     333{{{#!bash
     334./make-image-header.sh /<PATH>/<IMAGE>.jpg
     335}}}
     3368. Use the resulting header file to replace the one located at {{{package/feeds/oldpackages/psplash/files/image_generic.h}}}
     3379.Clean the psplash package {{{make package/feeds/oldpackages/psplash/clean}}}
     33810. Install the psplash package {{{make package/feeds/oldpackages/psplash/install}}}
     33911. Perform a top level make once again {{{make -j1 V=s}}}. This should only need to rebuild the psplash package.
     34012. Deploy the images created under {{{bin/imx6/}}} to target boards.
     341
     342
     343[=#android]
     344== Android ==
     345There currently exists two separate processes in Android that display graphics during the boot process. The first uses an image named {{{initlogo.rle}}} which lasts between 1-2 seconds and displays immediately after the kernel has finished booting and passed control to the Android userspace. The second uses a zip folder containing an animation that is named {{{bootanimation.zip}}} which then lasts until booting has finished (~15 seconds). Both of these image sources can be modified to display custom graphics.
     346
     347Before attempting to modify either of these sources, follow the steps at [wiki:Android/Building Android/Building] if you have not set up a working source directory.
     348
    416349The following examples were written for Android KitKat 4.4.
    417 </p>
    418 <h3 id="InitLogo-RequiresBuildingofAndroidSourceCode">Init Logo - Requires Building of Android Source Code</h3>
    419 <p>
    420 To modify the <tt>initlogo.rle</tt> source:
    421 </p>
    422 <ol><li>Make a copy of or create a logo that is smaller than your display and convert it if necessary to a BMP. The BMP should be <strong>16bit</strong> with no run length encoding.
    423 </li></ol><ol start="2"><li>Install <tt>imagemagick</tt> <tt>sudo apt-get install imagemagick</tt>
    424 </li></ol><ol start="3"><li>Convert the BMP to PNG <tt>convert initlogo.bmp initlogo.png</tt>
    425 </li></ol><ol start="4"><li>Convert the resulting PNG to RAW RGB <tt>convert -depth 16 initlogo.png rgb:initlogo.raw</tt>
    426 </li></ol><ol start="5"><li>Use the pre-compiled rgb2565 tool to convert the RAW RGB to RLE and place in the <tt>/system</tt> directory
    427 </li></ol><blockquote>
    428 <p>
    429 <tt>&lt;BUILD_DIR&gt;/out/host/linux-x86/bin/rgb2565 &lt; initlogo.raw &gt; &lt;BUILD_DIR&gt;/system/initlogo.rle</tt>
    430 </p>
    431 </blockquote>
    432 <blockquote>
    433 <p>
    434 If the rgb2565 executable does not exist run the following commands:
    435 </p>
    436 <div class="code"><pre><span class="nb">export </span><span class="nv">JAVA_HOME</span><span class="o">=</span>/usr/lib/jvm/java-7-openjdk-amd64
    437 <span class="nb">source </span>build/envsetup.sh
     350
     351=== Init Logo - Requires Building of Android Source Code ===
     352To modify the {{{initlogo.rle}}} source:
     353
     3541. Make a copy of or create a logo that is smaller than your display and convert it if necessary to a BMP. The BMP should be 16bit with no run length encoding.
     3552. Install {{{imagemagick}}}:
     356{{{#!bash
     357sudo apt-get install imagemagick
     358}}}
     3593. Convert the BMP to PNG:
     360{{{#!bash
     361convert initlogo.bmp initlogo.png
     362}}}
     3634. Convert the resulting PNG to RAW RGB:
     364{{{#!bash
     365convert -depth 16 initlogo.png rgb:initlogo.raw
     366}}}
     3675. Use the pre-compiled rgb2565 tool to convert the RAW RGB to RLE and place in the /system directory:
     368{{{#!bash
     369./out/host/linux-x86/bin/rgb2565 < initlogo.raw > <BUILD_DIR>/system/initlogo.rle
     370}}}
     371
     372  If the rgb2565 executable does not exist run the following commands:
     373{{{#!bash
     374export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
     375source build/envsetup.sh
    438376lunch ventana-eng
    439 mmm &lt;BUILD_DIR&gt;build/tools/rgb2565/ <span class="c"># replace &lt;BUILD_DIR&gt; with the path to Android source
    440 </span></pre></div></blockquote>
    441 <ol start="6"><li>Build and deploy the new Android image.
    442 </li></ol><h3 id="BootAnimation-DoesnotRequireBuildingAndroidSource">Boot Animation - Does not Require Building Android Source</h3>
    443 <p>
    444 A boot animation consists of several parts contained in <tt>bootanimation.zip</tt> located in either the <tt>/system/media/</tt> or <tt>/data/local/</tt> directories of an Android system. In the root of a boot animation zip archive, there are usually a number of folders conventionally named <tt>part0</tt>, <tt>part1</tt>, etc, and a file called <tt>desc.txt</tt>.
    445 </p>
    446 <p>
    447 To modify the <tt>bootanimation.zip</tt> source:
    448 </p>
    449 <ol><li>Construct the <tt>desc.txt</tt> file specific to your animation that follows this format:
    450 <pre class="wiki">&lt;width&gt; &lt;height&gt; &lt;frames per second&gt;
    451 p &lt;times to repeat&gt; &lt;end of animation pause time&gt; &lt;folder containing .png animations&gt;
    452 </pre></li></ol><blockquote>
    453 <p>
    454 An example <tt>desc.txt</tt> describing an animation with the first part executing once, then the second part looping until boot (a times to repeat value of  0):
    455 </p>
    456 <pre class="wiki">640 480 30
     377mmm <BUILD_DIR>build/tools/rgb2565/ # replace <BUILD_DIR> with the path to Android source
     378Build and deploy the new Android image.
     379}}}
     380
     381=== Boot Animation - Does not Require Building Android Source ===
     382A boot animation consists of several parts contained in {{{bootanimation.zip}}} located in either the {{{/system/media/}}} or {{{/data/local/}}} directories of an Android system. In the root of a boot animation zip archive, there are usually a number of folders conventionally named {{{part0}}}, {{{part1}}}, etc, and a file called {{{desc.txt}}}.
     383
     384To modify the {{{bootanimation.zip}}} source:
     3851. Construct the {{{desc.txt}}} file specific to your animation that follows this format:
     386{{{
     387<width> <height> <frames per second>
     388p <times to repeat> <end of animation pause time> <folder containing .png animations>
     389}}}
     390  An example {{{desc.txt}}} describing an animation with the first part executing once, then the second part looping until boot (a times to repeat value of 0):
     391{{{
     392640 480 30
    457393p 1 0 part0
    458394p 0 0 part1
    459 </pre></blockquote>
    460 <blockquote>
    461 <p>
    462 For a static image, an example would be:
    463 </p>
    464 <pre class="wiki">640 480 1
     395}}}
     396
     397  For a static image, an example would be:
     398{{{
     399640 480 1
    465400p 0 0 part0
    466 </pre></blockquote>
    467 <ol start="2"><li>Name your animation PNGs in such a way that they are in alphabetically ordered in the same order you wish for them to be displayed. Conventionally files are named in the format of <tt>&lt;height&gt;_&lt;width&gt;_&lt;sequence number&gt;.png</tt>.
    468 <ul><li>Note, Gateworks has only tested with PNG image file format.
    469 </li></ul></li></ol><blockquote>
    470 <p>
     401}}}
     402
     4032. Name your animation PNGs in such a way that they are in alphabetically ordered in the same order you wish for them to be displayed. Conventionally files are named in the format of {{{<height>_<width>_<sequence number>.png}}}.
     404 - Note, Gateworks has only tested with PNG image file format.
     405
    471406An example list of files in the part folders:
    472 </p>
    473 <pre class="wiki">+bootanimation.zip
     407{{{
     408+bootanimation.zip
    474409| | +part0
    475410| | 480_640_00000.png
     
    488423| desc.txt
    489424+--------------------
    490 </pre></blockquote>
    491 <ol start="3"><li>Package your zip <tt>zip -r0 bootanimation.zip desc.txt part0 part1</tt>
    492 <ol class="loweralpha"><li>Note that this applies a "store only" compression on the files and is required to properly display the boot animation. If you have a different number of part folders make sure they are all listed.
    493 </li></ol></li></ol><ol start="4"><li>Copy the zip to either the <tt>/system/media/</tt> or <tt>/data/local/</tt> directories.
    494 <ol><li>Already complete SD Card: Copy the zip to either the <tt>/SYSTEM/media/</tt> or <tt>/DATA/local/</tt> directories.
    495 </li></ol></li></ol><ol start="5"><li>Build and deploy the new Android image.
    496 <ul><li>NOTE: Not required if copying .zip file to an already in use Android SD Card.
    497 </li></ul></li></ol><p>
    498 For an example boot animation, see download <a class="attachment" href="/attachment/wiki/ventana/SplashScreen/bootanimation.zip" title="Attachment 'bootanimation.zip' in ventana/SplashScreen">bootanimation.zip</a><a class="trac-rawlink" href="/raw-attachment/wiki/ventana/SplashScreen/bootanimation.zip" title="Download">​</a>.
    499 </p>
    500 <h4 id="DisablingtheBootAnimation">Disabling the Boot Animation</h4>
    501 <p>
    502 The boot animation can be disabled via <tt>setprop debug.sf.nobootanimation 1</tt> in either the boot section of <tt>init.rc</tt> or adding to the setprop list in <tt>/system/bin/init.sh</tt>.
    503 </p>
    504 }}}
     425}}}
     426
     4273. Package your zip:
     428{{{#!bash
     429zip -r0 bootanimation.zip desc.txt part0 part1
     430}}}
     431 * Note that this applies a "store only" compression on the files and is required to properly display the boot animation. If you have a different number of part folders make sure they are all listed.
     432
     4334. Copy the zip to either the {{{/system/media/}}} or {{{/data/local/}}} directories.
     434Already complete SD Card: Copy the zip to either the /SYSTEM/media/ or /DATA/local/ directories.
     435
     4365. Build and deploy the new Android image.
     437 * NOTE: Not required if copying .zip file to an already in use Android SD Card.
     438
     439=== Disabling the Boot Animation ===
     440The boot animation can be disabled via {{{setprop debug.sf.nobootanimation 1}}} in either the boot section of {{{init.rc}}} or adding to the setprop list in {{{/system/bin/init.sh}}}.