When you power on your ConnectCore 8M Mini Development Kit device, it displays the Digi company logo for a few seconds, followed by an animation of the Digi logo. You may want to customize these images for more complete product branding:
Change Linux kernel splash screen
Requirements:
-
A Linux development computer
-
A graphic design application
-
ppmquant
utility (part ofnetpbm
package) -
pnmnoraw
utility (part ofnetpbm
package) -
The Linux kernel source code
The splash image is stored in the Linux kernel sources in PPM (Portable Pixmap Format) format. To change the splash image, follow these steps:
-
Create a splash image using a graphic design application. Save the image as
logo_custom.ppm
.You can convert any existing image to ppm format using conversion utilities such as mogrify
. -
Reduce the number of colors to 224 using
ppmquant
. Execute this command:$ ppmquant 224 logo_custom.ppm > logo_custom_224.ppm
-
Convert the image to ASCII format using
pnmnoraw
. Issue this command:$ pnmnoraw logo_custom_224.ppm > logo_custom_clut224.ppm
The final name of the image must be
logo_custom_clut224.ppm
. -
In the Linux kernel sources, replace the current logo image with the image you have just created. For Android, it is located at
kernel_imx/drivers/video/logo/logo_custom_clut224.ppm
. -
If you already have the kernel compiled, remove the objects to generate the images with the new image. For Android:
$ rm -rf out/target/product/ccimx8mmdvk/obj/KERNEL_OBJ
-
Build the firmware and program it in the module. The new splash is displayed when you boot your device.
Change Android boot animation
The boot animation and its configuration are contained in a ZIP file. The system selects this zip file from the following locations, in order:
-
/system/media/bootanimation-encrypted.zip
(ifgetprop("vold.decrypt") = '1'`
) -
/system/media/bootanimation.zip
-
/oem/media/bootanimation.zip
This bootanimation.zip
file includes the following:
desc.txt part0 \ part1 \ part directories ... / partN /
-
A
desc.txt
file containing the configuration of the animation. -
One or more part directories with the PNG images that compose the animation, with filenames containing incremental numbers.
The animation sequentially displays the images in the part
directories.
The files located in part0
are displayed first.
Then, if there are more part folders, files within part1
are displayed, and so on.
The boot animation must contain at least one sequence folder (part0
).
You can find the complete specifications at bootanimation format. |
desc.txt file format
The contents of this file define how the sequences and images are displayed during the animation. The file is configured with the following:
-
The first line defines the general parameters of the animation:
WIDTH HEIGHT FPS
-
WIDTH
andHEIGHT
equal the resolution of the PNG images. -
FPS
defines the number of images play per second.
-
-
It is followed by a number of rows of the form:
TYPE COUNT PAUSE PATH [#RGBHEX [CLOCK1 [CLOCK2]]]
-
TYPE
is a single char indicating what type of animation segment this is:-
p
this part will play unless interrupted by the end of the boot. -
c
this part will play to completion, no matter what.
-
-
COUNT
defines the number of times that the sequence will loop. A 0 indicates that the sequence will loop infinitely until boot is complete. The last sequence of the animation typically has a COUNT value of 0. -
PAUSE
defines (in number of frames) how long the scene will pause on the last frame before continuing. Divide thePAUSE
value by the FPS to convert it into time. -
PATH
is the name of the directory where the PNG images for this part are located (e.g.part0
) -
(Optional)
RGBHEX
is the background color, specified as #RRGGBB. -
(Optional)
CLOCK1
,CLOCK2
are the coordinates at which to draw the current time (for watches).
-
Example:
420 600 30 p 1 15 part0 p 0 0 part1
In this example, the 420 x 600 PNG images play at 30 fps.
The first scene (part0
) plays once and pauses for 15 frames (15/30 = 0.5 seconds) before moving onto the next scene (part1
), which loops until the boot has finished.
You can add as many sequence definition lines as necessary.
part directories
Part directories contain the images for each sequence of the animation. Every file is expected to be a PNG file that represents one frame in that part (at the specified resolution). They must be named sequentially: their name can have a common prefix but must end with a whole number incrementing by one.
For example:
boot_0000.png boot_0001.png boot_0002.png ... boot_0085.png
An animation must contain at least one sequence, so there should be at least one part folder within the bootanimation.zip file.
|
Generate your own boot animation
Follow these steps to create your own boot animation:
-
Generate the sequence or sequences of PNG images with a graphic design application. Remember to name the images with an incremental whole number.
-
Divide the animation into sequences and organize the PNG files in their corresponding sequence directories. If your animation contains just one sequence, you only need one folder.
-
Create the
desc.txt
file and configure your animation settings. See desc.txt file format for more information. -
Zip your animation files (
desc.txt
and directories) in a file calledbootanimation.zip
. Run the zip compression command inside the directory with thestore
option enabled.$ ls . desc.txt part0 part1 .... partn $ zip -0 -r ../bootanimation.zip *
You must run the command inside the directory and use the store option to generate the bootanimation.zip
file. -
Modify the Android sources to build firmware with your own boot animation:
-
In the Android sources, replace the
bootanimation.zip
file contained indevice/digi/common/runtime
with your zip file. -
If you already have the sources compiled, remove the file
out/target/product/ccimx8mmdvk/system/media/bootanimation.zip
.
-