Tutorial on Creating and Configuring the Psplash Boot Animation for the OK3588-C Embedded Linux System
by yir65681 in Circuits > Linux
274 Views, 1 Favorites, 0 Comments
Tutorial on Creating and Configuring the Psplash Boot Animation for the OK3588-C Embedded Linux System

In the embedded Linux system of the RK3588 platform, the boot screen can not only enhance the user experience but also display brand logos or system status information. psplash is a lightweight boot screen program that can display static pictures or simple animations during system startup, providing intuitive feedback to users. This article will take the RK3588 as an example to introduce in detail how to create a boot animation from videos or pictures and configure psplash on the embedded device to achieve the display of a customized boot screen.
This method uses the psplash tool, which is a lightweight startup screen program commonly used in embedded Linux systems. Its main function is to display a graphical boot screen during system startup to provide user feedback, usually in the form of a brand logo or a progress bar.
Features:
- Lightweight: psplash is designed to be as small as possible to fit resource - constrained embedded devices.
- Graphical interface: It can display static images or simple animations, offering users a better visual experience during startup.
- Progress bar support: It can display a progress bar during the startup process to indicate the system loading status.
- Flexible configuration: Users can customize the boot image, progress bar color, display time, etc. through the configuration file.
Picture Creation
Place the adapted files in the folder into the virtual machine for conversion.
Create a folder to save the project:
Then, put the video into the mp4_logo folder.
Download ffmpeg, which will be used later when processing the MP4 video:
Create a new part0 folder to store the pictures that will be generated later:
Enter the following command for conversion:
Now, take a look at the pictures in the part0 folder.
Convert Images to .h Files
Before converting to .h files, please check if the images match the screen resolution. When using psplash, the image resolution must be consistent with the screen resolution.
Use the following command:
The current resolution is 640x360. Next, the conversion will be carried out.
Create a logo_h folder and inside it, create h, logo_1024x800, and master folders respectively:
Then, copy the previously generated PNG files into the master folder. The copying process is not demonstrated here.
Start resolution conversion after copy is complete:
Create the fix _ 1280x800.sh script in the master folder:
Give executable permissions:
After execution, the modified file is created at logo _ 1280x800.
Create a make-image- header. sh in the h folder and give it executable permission:
Execute script:
Source Code Modification
Before modification, you need to copy the psplash source code to the psplash _ logo/folder. Please copy it by yourself.
The cross-compiler section of the Makefile is then modified first.
Change the CC variable here to the cross-compiler used by your platform.
Create a logo folder, copy the *-img. h files just generated, and add references to the psplash. c file.
Add a macro definition below to make it easier to write parameters later:
Add the following to the main function:
Here are IMG_WIDTH for width, IMG_HEIGHT for height, IMG_BYTES_PER_PIXEL for pixel format, and IMG_RLE_PIXEL_DATA for image data.
Since the width, height, and pixel format are the same, the same parameters are used. Only the parameter of IMG_RLE_PIXEL_DATA (image data) is modified.
Finally, directly execute make. After execution, the psplash and psplash - write files will be generated and need to be copied to the /usr/bin/ directory of the board.
Linux System Configuration
Linux System Configuration
Configure executable permissions. It should also be noted that the sleep 5 here needs to be configured according to the actual playback time. It is recommended to display a black-background image at the end of the playback to prevent seeing the underlying dynamic logo image when shutting down.
Verification of the Effect
After the configuration is completed, simply restart the system.
With the method introduced in this article, a startup animation can be easily created and displayed on the RK3588 embedded Linux system. The entire process includes decomposing a video into images, adjusting the resolution, generating a C header file, modifying the source code, compiling, and configuring the system startup script. Mastering this process not only enhances the visual effect during system startup but also facilitates brand presentation and user experience optimization. After completing the configuration, restart the RK3588 device to verify the effect and ensure that the custom animation is displayed smoothly.