Created
September 13, 2019 19:41
-
-
Save riaancillie/c97af871a4ba6556e7d8558da6c88da6 to your computer and use it in GitHub Desktop.
Khadas u-boot logo change
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Khadas/Rockchip stores the logo to be displayed after power on in a partition called "resource" which is located at 0x0000 a000 | |
The file system in proprierty but can be generated using a a tool provided by rockchip. There appears to be a limit on the bitmap | |
that can be displayed. 1000x1000px works fine, but 2048x1536 causes a interleaved effect when starting up although correcting | |
itself after a few seconds. | |
Note that the partition is only 16mb in size. | |
To create a new logo.img file, use resource_tool, either from rkbin in fenix/build/rkbin____/tools folder or by cloning repo | |
https://github.com/linux-rockchip/u-boot-rockchip/blob/u-boot-rk3288/tools/resource_tool/resource_tool.c which also provides | |
source code. | |
Create a logo bitmap and name it logo.bmp. It must be 24-bit and saved in Windows format. | |
To create the .img file place the bitmap in a folder and with that folder as the working directory run | |
resource_loader --pack logo.bmp | |
A file will be created called resource.img | |
If the script is run from a different folder be sure to include the 'root' argument otherwise the .img filesystem | |
will show logo.bmp in a subfolder (open the .img with a hex editor and look) | |
/home/riaan/fenix/build/rkbin-b8bbafdd87a3f6c92a7b23e3e3f991b8fba97c23/tools/resource_tool --root=/tmp/unpacked/out --pack /tmp/unpacked/out/logo.bmp | |
To include this file in the fenix build script when creating an image, rename resource.img to logo.img and place it | |
fenix/archives/logo/Rockchip/logo.img | |
When building the full firmware (make all) it will include this at the correct offset. | |
To apply the new logo image afterwards use the RKDevTool/AndroidTool which is used to flash new firmware. On the first tab (Download Image) | |
uncheck everything and create a new row at 0x0000A000/RiaanLogo/path_to_logo/img. | |
Check the new row, place the Khadas in loader mode (hold function after reset), and click run. | |
The image can also be applied directly from the khadas, but running | |
sudo dd if=logo.img of=/dev/mmcblk1p5 (verify the partition number by checking for 16mb in lsblk) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So I followed the instruction until I got here:
./resource_loader --pack logo.bmp
But this is what seems to work:
./resource_tool --pack logo.bmp