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 | |
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 | |
| 10 | Where 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 == |
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 | |
| 35 | In 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 | |
| 37 | By 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 | |
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 > Open...</tt> |
144 | | </li></ol><ol start="4"><li>Scale your image to the size of your target display <tt>Image > 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 > By Color</tt>, then using the bucket tool <tt>Tools > Painting Tools > 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 > Mode > 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 > 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 | |
| 53 | Start by first completing a source compile of the Gateworks bootloader shown [wiki:ventana/bootloader#BuildingfromSource here] |
| 54 | |
| 55 | 1. 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] |
| 69 | 2. Download and install the opensource photo editing software [https://www.gimp.org/downloads/ GIMP] |
| 70 | 3. Launch GIMP and open the logo to be used {{{File > Open...}}} |
| 71 | 4. 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. |
| 73 | 5. Convert the image to index mode {{{Image > Mode > Indexed...}}}. Select the {{{Generate optimum palette}}} option and set your maximum number of colors to 224. |
| 74 | 6. 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. |
| 76 | 7. 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]. |
| 77 | 8. 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]. |
| 78 | 9. 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 | |
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 === |
| 85 | 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 {{{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 | |
| 87 | For 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 | |
| 89 | Displaying 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 === |
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 |
| 100 | 1. 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 | }}} |
| 111 | 2. 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 |
| 113 | setenv splash GWLogo.bmp |
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 === |
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 > Open...</tt> |
273 | | </li></ol><ol start="4"><li>Open the export dialogue window <tt>File > 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 <gimp_export_file>.pnm > 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 > 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 | |
| 204 | 1. Begin by following the steps at the [wiki:linux/kernel linux/kernel] to set up a development environment for the linux kernel. |
| 205 | 2. Download and install the opensource photo editing software [https://www.gimp.org/downloads/ GIMP] if you have not done so already. |
| 206 | 3. Launch GIMP and open the logo or image to be used File > Open... |
| 207 | 4. 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. |
| 208 | 5. Convert to 224 color pnm using {{{ppmquant}}}: |
| 209 | {{{#!bash |
| 210 | ppmquant 224 <gimp_export_file>.pnm > logo_linux_clut224.ppm |
| 211 | }}} |
| 212 | 6. Convert to plain ppm and copy to kernel logo directory: |
| 213 | {{{#!bash |
| 214 | pnmtoplainpnm logo_linux_clut224.ppm > drivers/video/logo/logo_linux_clut224.ppm |
| 215 | }}} |
| 216 | 7. Build and deploy new kernel. |
| 217 | |
| 218 | |
| 219 | === Further Kernel Options === |
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 |
| 224 | 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 drivers/video/mb862xx/mb862xxfbdrv.c. Further information about this config can be seen here and here. |
| 225 | |
| 226 | 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 here. |
| 227 | |
| 228 | * Fix backlight flickering |
| 229 | 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 here. |
| 230 | |
| 231 | * Disable flashing framebuffer cursor |
| 232 | 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 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 == |
| 237 | Both 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 | |
| 239 | 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 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 | |
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 <BUILD_DIR> -name "make-image-header.sh"</tt>. |
336 | | <ol class="loweralpha"><li>An example result of this find command would be <tt><BUILD_DIR>/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 /<PATH>/<IMAGE>.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 <IMAGE>.h <BUILD_DIR>/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 === |
| 254 | For 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. |
| 255 | 1. Begin by following the instructions at Yocto/Building to set up a working environment. |
| 256 | 2. 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. |
| 258 | 3. 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 | }}} |
| 266 | 4. Copy the resulting header to the psplash recipe header under the recipe's "files" directory: |
| 267 | {{{#!bash |
| 268 | cp <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 |
| 272 | mkdir poky/meta-yocto/recipes-core/psplash/files/ventana |
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/<ARCHITECTURE_VERSION>/psplash/<GIT_VERSION>/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><BUILD_DIR>/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 <BUILD_DIR> -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 /<PATH>/<IMAGE>.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 | |
| 301 | echo "Note, this will hard-rebuild" |
| 302 | time 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/ |
| 306 | 6. Rebuild the BSP. |
| 307 | {{{#!bash |
| 308 | . ./setup-environment build # activate a bitbake shell if not already done |
| 309 | bitbake gateworks-image-multimedia # replace argument with desired target |
| 310 | }}} |
| 311 | 7. Deploy the resulting .ubi files located under {{{<BUILD_DIR>/tmp/deploy/images/ventana/}}} to target machine. |
| 312 | |
| 313 | |
| 314 | === OpenWrt Set Up === |
| 315 | Although 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 | |
| 317 | Note 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 | |
| 319 | 1. 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. |
| 321 | 2. Edit {{{./feeds.conf.default}}} and uncomment the "oldpackages" feed. |
| 322 | 3. Update all package feeds: {{{./scripts/feeds update}}} |
| 323 | 4. Install PSplash and default it to yes (enabled): {{{./scripts/feeds install -dy psplash}}} |
| 324 | 5. Execute a top level build to create the tools necessary for making a custom logo header file: {{{make -j1 V=s}}} |
| 325 | 6. 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. |
| 328 | 7. 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 | }}} |
| 336 | 8. Use the resulting header file to replace the one located at {{{package/feeds/oldpackages/psplash/files/image_generic.h}}} |
| 337 | 9.Clean the psplash package {{{make package/feeds/oldpackages/psplash/clean}}} |
| 338 | 10. Install the psplash package {{{make package/feeds/oldpackages/psplash/install}}} |
| 339 | 11. Perform a top level make once again {{{make -j1 V=s}}}. This should only need to rebuild the psplash package. |
| 340 | 12. Deploy the images created under {{{bin/imx6/}}} to target boards. |
| 341 | |
| 342 | |
| 343 | [=#android] |
| 344 | == Android == |
| 345 | There 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 | |
| 347 | Before 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 | |
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><BUILD_DIR>/out/host/linux-x86/bin/rgb2565 < initlogo.raw > <BUILD_DIR>/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 === |
| 352 | To modify the {{{initlogo.rle}}} source: |
| 353 | |
| 354 | 1. 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. |
| 355 | 2. Install {{{imagemagick}}}: |
| 356 | {{{#!bash |
| 357 | sudo apt-get install imagemagick |
| 358 | }}} |
| 359 | 3. Convert the BMP to PNG: |
| 360 | {{{#!bash |
| 361 | convert initlogo.bmp initlogo.png |
| 362 | }}} |
| 363 | 4. Convert the resulting PNG to RAW RGB: |
| 364 | {{{#!bash |
| 365 | convert -depth 16 initlogo.png rgb:initlogo.raw |
| 366 | }}} |
| 367 | 5. 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 |
| 374 | export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 |
| 375 | source build/envsetup.sh |
439 | | mmm <BUILD_DIR>build/tools/rgb2565/ <span class="c"># replace <BUILD_DIR> 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"><width> <height> <frames per second> |
451 | | p <times to repeat> <end of animation pause time> <folder containing .png animations> |
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 |
| 377 | mmm <BUILD_DIR>build/tools/rgb2565/ # replace <BUILD_DIR> with the path to Android source |
| 378 | Build and deploy the new Android image. |
| 379 | }}} |
| 380 | |
| 381 | === Boot Animation - Does not Require Building Android Source === |
| 382 | A 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 | |
| 384 | To modify the {{{bootanimation.zip}}} source: |
| 385 | 1. Construct the {{{desc.txt}}} file specific to your animation that follows this format: |
| 386 | {{{ |
| 387 | <width> <height> <frames per second> |
| 388 | p <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 | {{{ |
| 392 | 640 480 30 |
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 | |
| 427 | 3. Package your zip: |
| 428 | {{{#!bash |
| 429 | zip -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 | |
| 433 | 4. Copy the zip to either the {{{/system/media/}}} or {{{/data/local/}}} directories. |
| 434 | Already complete SD Card: Copy the zip to either the /SYSTEM/media/ or /DATA/local/ directories. |
| 435 | |
| 436 | 5. 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 === |
| 440 | The 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}}}. |