Programu Iliyopachikwa - Skrini ya splash maalum Yocto bar nyeupe ya upakiaji na maandishi nyeusi

Yocto Raspberry Pi

Skrini ya Splash Maalum na Upau wa Maendeleo

Andaa picha ya skrini ya splash

Skrini ya Splash inashughulikiwa na kichocheo kinachoitwa "psplash" inayopatikana chini ya saraka ya "/workdir/poky-honister/meta-raspberrypi/recipes-core" ya mti wa chanzo.

Kwa kuwa "psplash" inatarajia picha kuwa katika muundo wa faili ya kichwa, kwanza unahitaji kubadilisha picha yako kuwa umbizo la faili ya kichwa kwa kutumia hati inayoitwa "make-image-header.sh".

Hifadhi ya psplash ya Clone

Ili kupata hati, iga hazina ya yoctoproject psplash - katika kesi hii kwa saraka ya /workdir

git clone https://git.yoctoproject.org/psplash

Katika saraka ya psplash utapata hati "make-image-header.sh".

Sakinisha maktaba

Hati inahitaji "libgdk-pixbuf2.0-dev" kusakinishwa kwenye mfumo. Unaweza kufanya hivyo katika dirisha la pili la terminal na:

docker exec -it --user=root crops-poky bash
apt-get install libgdk-pixbuf2.0-dev
exit

Sasa unaweza kutumia hati kubadilisha faili yako ya png kuwa .h-file

./make-image-header.sh <path-to-png>/psplash-ixlogo.png POKY

Kama matokeo, unapaswa kupata faili inayoitwa "psplash-ixlogo-img.h". Kichwa kinaonekana kama:

/* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */

#define POKY_IMG_ROWSTRIDE (4080)
#define POKY_IMG_WIDTH (1020)
#define POKY_IMG_HEIGHT (768)
#define POKY_IMG_BYTES_PER_PIXEL (4) /* 3:RGB, 4:RGBA */
#define POKY_IMG_RLE_PIXEL_DATA ((uint8*) \
...

Ikiwa unataka kubadilisha rangi ya mandharinyuma ya skrini ya splash, unaweza kuongeza mstari ufuatao:

#define PSPLASH_BACKGROUND_COLOR 0x07,0x85,0x00

Hii inaweka rangi ya mandharinyuma kwa kijani. </:code5:></:code4:></:code3:></:code2:></:code1:>

Unda safu maalum ya meta

Ili kujumuisha picha ya skrini ya splash iliyoundwa, tunahitaji safu maalum ya meta.

Chanzo cha kwanza kwa rpi-kujenga.

source poky-honister/oe-init-build-env rpi-build

Na "bitbake-layers" tunaunda safu mpya ya meta na kuongeza safu hii ya meta kwenye conf/bblayers.conf ya mradi wa sasa.

bitbake-layers create-layer meta-interelectronix-rpi
bitbake-layers add-layer meta-interelectronix-rpi

Baada ya nakala hii saraka "psplash" kutoka meta-raspberrypi/recipes-core kwa safu mpya ya meta:

mkdir meta-interelectronix-rpi/recipes-core
cp -r /workdir/poky-honister/meta-raspberrypi/recipes-core/psplash meta-interelectronix-rpi/recipes-core/

Nakili psplash-ixlogo-img.h kwa meta-interelectronix-rpi/recipes-core/psplash/files/

cp <path-to-h-file>/psplash-ixlogo-img.h meta-interelectronix-rpi/recipes-core/psplash/files/

Hatimaye hariri "meta-interelectronix-rpi/recipes-core/psplash/psplash_%.bbappend" na ubadilishe "psplash-raspberrypi-img.h" kuwa "psplash-ixlogo-img.h".</:code9:></:code8:></:code7:></:code6:>

Jumuisha psplash

Katika hatua ya mwisho, kifurushi cha psplash lazima kiongezwe kwenye faili ya ndani.conf ya mradi. Ili kufanya hivyo, hariri faili /workdir/rpi-build/conf/local.conf

My local.conf inaonekana kama:

## systemd settings
DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME:init_manager = "systemd"
VIRTUAL-RUNTIME:initscripts = ""
IMX_DEFAULT_DISTRO_FEATURES:append = " systemd"

enable some hardware

ENABLE_I2C = "1" ENABLE_UART = "1" DISABLE_SPLASH = "1" DISABLE_RPI_BOOT_LOGO = "1"

IMAGE_INSTALL:append = " psplash" IMAGE_FEATURES += " splash "

Leseni ya Hakimiliki

Copyright © 2022 Interelectronix e.K.
Msimbo huu wa chanzo cha Mradi una leseni chini ya leseni ya GPL-3.0.