|
|
||
|---|---|---|
| .. | ||
| Devuan-logo-swoosh.bmp | ||
| Devuan-logo-swoosh.png | ||
| Devuan-logo-swoosh.svg | ||
| Devuan-logo.bmp | ||
| Devuan-logo.png | ||
| Devuan-logo.svg | ||
| README.md | ||
README.md
Pinephone A64 native resolution 1440x720 18:9 2:1
Display size: 5.32" × 2.66" = 14.16in² (13.52cm × 6.76cm = 91.36cm²) at 270.58 PPI, 0.0939mm dot pitch, 73215 PPI²
https://developer.toradex.com/linux-bsp/how-to/boot/splash-screen-on-u-boot/
- Inkscape
Load the svg to inkscape and export png
- Converting from PNG to BMP
U-Boot can read a specific image format. Use the following command to convert the PNG image to BPM.
SVG="Devuan-logo.svg"
PNG="Devuan-logo.png"
BMP="Devuan-logo.bmp"
inkscape --export-type="png" ${SVG}
convert {PNG} -type Palette -colors 224 -depth 8 -compress none -verbose BMP3:{PNG}
SVG="Devuan-logo-swoosh.svg"
PNG="Devuan-logo-swoosh.png"
BMP="Devuan-logo-swoosh.bmp"
inkscape --export-type="png" ${SVG}
convert {PNG} -type Palette -colors 224 -depth 8 -compress none -verbose BMP3:{BMP}
The u-boot makefile sets the location of the logo image in LOGO_BMP
It will look for logos/(BOARD).bmp and logos/(VENDOR).bmp so
we can write it their instead.
copy to the existing denx generic logo image location.
tools/bmp_logo --gen-info ./tools/logos/denx.bmp > include/bmp_logo.h
tools/bmp_logo --gen-bmp ./tools/logos/denx.bmp > include/bmp_logo_data.h
cp ~/{BMP} {UBOOT_HOME}/tools/logos/denx.bmp
- Using GIMP image dump
https://developer.ridgerun.com/wiki/index.php/How_to_change_uboot_splash_image
Get image that you want to show in resolution smaller than your display resolution.
Open the image using GIMP graphic application.
Save the image using "save as" option.
In the select box "Select File Type (by Extension)" select the format "c source code"
Then you will get one windows with some options, in this window deselect all options (Use glibs types, use macros instead of struct, Use 1 byte run-length-encoding, Save alpha channel)
Then save this file (changing the file extension from .c to .h) to
#* $DEVDIR/bootloader/uboot.*/src/board/davinci/common
Change the variable value CONFIG_SPLASH_LOGO_FILE with the name of file used above. The CONFIG_SPLASH_LOGO_FILE configuration setting can be found in the Splash Screen section in your board file in the directory
#* $DEVDIR/bootloader/uboot.*/src/include/configs
Clean and compile the bootloader
The form of the image-file must be similar to:
/* GIMP RGB C-Source image dump (image.c) */static const struct { unsigned int width; unsigned int height; unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ unsigned char pixel_data[200 * 100 * 3 + 1]; } gimp_image = { 200, 100, 3, "(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306" "(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306" "(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306" "(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306(\237\306"
Remember that normally the bootloader modifications are made using patches.