RK3568 user-defined startup screen function

The startup screen drawing logic in the RK solution

In RK's solutions, such as RK1109, RK1126, RK3568, these embedded LINUX solutions have the same startup screen processing logic. The
user's uboot and kernel startup screens are all included in a boot.img file together with dts and kernel. The file structure of
boot.img is basically similar to the Android boot file structure. For the specific file structure, you can refer to the corresponding definitions in uboot and kernel!

Resource packaging tool

In the tools directory in uboot, u-boot\tools\rockchip tool resource_tool.c is the resource packaging tool! Specific users can refer to the mkimg script in BSP!
For example, we need to package dtb, startup screen and other files together:

resource_tool test.dtb logo.bmp logo_kernel.bmp > /dev/null

After execution, a file like resource.img will be obtained in the directory!
Then use the mkbootimg script in the kernel to package it together with the kernel into boot.img!

mkbootimg --kernel zImage --second resource.img -o boot.img

RK3568 user-defined startup screen function

In the RK solution, the user's uboot and kernel startup screens are included in a boot.img file together with dts and kernel. In
embedded products, if facing an all-inclusive upgrade, dts, kernel, image files, etc. Resource files are upgraded together! In the application scenarios of some application products, such as customizing the startup screen required by customers, it is difficult to meet the requirements!

design logic

1、在系统中添加一个专用的分区来放用户的资源文件,如开机画面等!
2、修改uboot中加载图片的代码,从专用的分区来加载图片文件!

Add resource file partition

Modify the parameter.txt partition configuration and add a partition such as OEM!, such as my partition location:
0x00010000@0x00048000(oem)

Modify the code in uboot to load user pictures

This partition is planned to be used to store user pictures in the 1M~5M range!

In uboot, read the code of the above partition into the specified memory through the emmc instruction, such as:
emmc read 0x88000000 0x48800 0x2000

In this way, the user's image is loaded to 0x88000000. Next, modify the code in uboot (rockchip_display.c)
and refer to load_bmp_logo to modify the loaded position method to complete the loading method of the image!

The system application layer adds tools for users to modify pictures.

1、把resource_tool编译一个板端版本!
2、用户上传一个bmp文件格式(要求小于4M,24bit图片);
3、调用resource_tool把用户上传的bmp文件生成resource.img文件;
4、使用dd命令把resource.img文件写到oem的特定分区(1~5MB分区位置);

After the above method is completed, the user can customize the user picture!

Guess you like

Origin blog.csdn.net/jhting/article/details/130403747