
현재 yocto build system($BUILDDIR)/conf/bblayers.conf
# your yocto build system
# poky/build/conf/bblayers.conf
BBLAYERS ?= " \
...
<poky path>/meta-raspberrypi \
"


vc4를 사용한다.mesa를 gl라이브러리의 PROVIDER 로 사용한다.DISABLE_VC4GRAPHCS = "1"로 할 것userland를 사용한다.userland는 64-bit arch를 지원하지 않는다.KEY_DECODE_MPG2, KEY_DECODE_WVC1 in local.confKEY_DECODE_MPG2 = "12345678"
KEY_DECODE_WVC1 = "123456789"
KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
| GPU_MEM Variable | Description |
|---|---|
GPU_MEM | GPU memory in MB. Sets the memory split between the ARM and GPU. ARM gets the remaining memory.MIN: 16. Default: 64 |
GPU_MEM_128 | GPU memory in MG for the 256MB Rpi. Ignored by the 512MG RP. Overrides gpu_mem.MAX: 192. Default not set. |
GPU_MEM_512 | GPU memory in MG for the 512MB Rpi. Ignored by the 256MG RP. Overrides gpu_mem.MAX: 448. Default not set. |
GPU_MEM_1028 | GPU memory in MG for the 1024MB Rpi. Ignored by the 256/512MG RP. Overrides gpu_mem.MAX: 944. Default not set. |
for more details: https://www.raspberrypi.com/documentation/computers/configuration.html
DISABLE_OVERSCAN = "1"
DISPMANX_OFFLINE = "1"
For more details: http://wayland.freedesktop.org/raspberrypi.html

meta-raspberrypi/conf/machine/include/rpi-base.inc
local.conf에 RPI_USE_U_BOOT = "1"
로 set할 것
local.conf에 ENABLE_UART = "1"
로 set할 것
meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc
local.conf에INITRAMFS_IMAGE_BUNDLE = "1"
meta-raspberrypi/conf/machine
raspberrypi4-64.conf
local.conf MACHINE 하드코딩# === local.conf === #
MACHINE = "raspberrypi4-64"
meta-raspberrypi/recipe-core/images
rpi-basic-image.bbcore-image-minimal을 기반으로함
$ bitbake rpi-basic-image
$ sudo dd if=./<>.rpi-sdimg of=/dev/sd<x> bs=4M && sync
UART는 disable 되어 있음ENABLE_UART = "1"
ENABLE_I2C = "1"
IMAGE_INSTALL += "i2c-tools vim"
IMAGE_INSTALL: packagee.g, IMAGE_INSTALL += "kernel-modules i2c-tools nodejs"IMAGE_FSTYPES, IMAGE_FEATURES: filesystem 관련custom-image를 만듦
# meta-markyang-raspberrypi/recipes-core/images/example-image.bb
include recipes-core/images/rpi-basic-image.bb
# "rpi"로 시작하는 machine만 유효하다.
# Only allow for machines which start with "rpi"
COMPATIBLE_MACHINE = "^rpi$"
rpi-basic-image.bb를 보자.
IMAGE_INSTALL += "kernel-modules"를 사용해, rootfs에 커널모듈을 사용할 수 있게끔 한다.$ bitbake-layers show-recipes "example-*"

meta-raspberrypi/conf/machine/raspberrypi4-64.conf가 있기 때문에, local.conf에 MACHINE = "raspberrypi4-64"로 하고 빌드해보자.# ==== local.conf ==== #
MACHINE = "raspberrypi4-64"
$ bitbake example-image
MACHINEOVERRIDES
raspberrypi4-64-custom.inc로 가져오자.raspberryi4-64-custom.inc내용이 require conf/machine/raspberrypi4-64.conf로 해도 된다.
raspberrypi4-64-custom.conf도 하나 만들어 raspberrypi4-64-custom.inc를 require|include 하게하자.
local.confMACHINE = "raspberrypi4-64-custom"
systemd는 DISTRO_FEATURES에서 추가 가능하다. 따라서, DISTRO 전반에 영향을 주는 것 이기 때문에,
자신의 layer/conf/distro/<DISTRO>.conf에 설정한다.
# poky/meta-poky/conf/distro/poky.conf
DISTRO_FEATURES:append = " systemd" # DISTRO_FEATURES에 systemd 추가
DISTRO_FEATURES:remove = "sysvinit" # DISTRO_FEATURES에 sysvinit 제거
VIRTUAL-RUNTIME_init_manger = "systemd" # VIRTUAL-RUNTIME_init_manager에 위에서 추가한 DISTRO_FEATURES의 systemd
DISTRO_FEATURES_BACKFILL:remove = "sysvinit" # sysvinit 자동으로 DISTRO_FEATURES에 추가되는 것 제거
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
VIRTUAL-RUNTIME_syslog = ""
VIRTUAL-RUNTIME_base-utils-syslog = ""

54635ee01c90 at ~/workspace/poky ±(dunfell) ✗ ❯ bitbake-layers show-recipes "tz*"
NOTE: Starting bitbake server...
Loading cache: 100% |######################################| Time: 0:00:00
Loaded 1361 entries from dependency cache.
=== Matching recipes: ===
tzcode-native:
meta 2022a
tzdata:
meta 2022a
meta/recipes-extended/timezone/tzdata.bb
example-image.bb에 해당 IMAGE_INSTALL 추가IMAGE_INSTALL += "tzdata tzdata-misc"
DEFAULT_TIMEZONE = "Cuba"
https://docs.yoctoproject.org/ref-manual/classes.html#extrausers-bbclass
openssl로 해시 비밀번호를 만들어 보자$ openssl passwd -1 toor
example-image.bb에 아래를 추가한다.

git://git.openembedded.org/meta-openembedded
meta-python, meta-oe도 meta-openembedded내 있다.

example-image.bbIMAGE_INSTALL += "networkmanager networkmanager-nmtui networkmanager-bash-completion"
nmtui systemctl status NetworkManager 실행 해보자.IMAGE_FSTYPEexample-image.bbIMAGE_FSTYPES = "rpi-sdimg"
| QPA | Description |
|---|---|
| DirectFP(FrameBuffer) | - |
| elgfs | opengl사용. HW 가속 (컴포지터 X 가능) |
| LinuxFB(FrameBuffer) | 완전 SW |
| VNC | |
| Mir Client |
meta-qt5/recipes-qt/qt5/qtbase_git.bb에 qtbase를 위한 레시피가 있다.

qtbase기반으로 나는 무슨 QPA를 사용할 것인지 설정할 수 있다.
poky/meta/recipes-core/qt5/qtbase_%.bbappendfiles 디렉토리도 만듦poky/meta/recipes-core/qt5 ±(dunfell) ✗ ❯ tree .
.
├── files
└── qtbase_%.bbappend
# ===== qtbase_%.bbappend ===== #
# === qtbase_%.bbappend === #
PACKAGECONFIG_append = " gl directfb eglfs gles2 journald"
# set QPA
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " \
file://qt-qpa.sh \
"
do_install_append() {
install -d "${D}${sysconfdir}/profile.d"
install -m 0644 "${WORKDIR}/qt-qpa.sh" "${D}${sysconfdir}/profile.d"
}
files/qt-qpa.shexport QT_QPA_PLATFORM=eglfs

aarch64-poky-linux/qtbase의 config.summary

example-image.bbIMAGE_INSTALL += "cinematicexperience"
oe-pkgdata-util list-pkg-files: 뭔파일이 설치됬니?IMAGE_INSTALL += "cinematicexperience"로 대체 뭔 파일들이 설치되었나?$ oe-pkgdata-util list-pkg-files cinematicexperience
cinematicexperience:
/lib/systemd/system-preset/98-cinematicexperience.preset
...주르륵
/usr/share/cinetmaticexperience-1.0/QT5_CinematicExperience 경로로 설치 되었구만,
systemd 구성systemd 구성 | 설명 |
|---|---|
| systemd | init 데몬 |
| systemd-journald | 다른 데몬(프로세스)들의 출력(syslog, 표준, 에러 출력), 로그 저장 데몬 |
| systemd-logind | 사용자 로그인, 세션 등 관리 데몬 |
| systemd-udevd | 장치 관리자 데몬 |
| systemd-networkd | 네트워크 관리 데몬. DHCP 뿐만 아니라 Virtual Lan 설정까지 가능 |
| systemd-resolved | DNS 해석 데몬 |
| systemd-timesyncd | NTP로 컴퓨터 시간 동기화 데몬 |
| systemd-boot | UEFI 부트로더 |
| DISTRO_FEATURES | description |
|---|---|
| alsa | Include ALSA support (OSS compatibility kernel modules installed if available). |
| api-documentation | Enables generation of API documentation during recipe builds. The resulting documentation is added to SDK tarballs when the bitbake -c populate_sdk command is used. See the “Adding API Documentation to the Standard SDK” section in the Yocto Project Application Development and the Extensible Software Development Kit (eSDK) manual. |
| bluetooth | Include bluetooth support (integrated BT only). |
| cramfs | Include CramFS support. |
| directfb | Include DirectFB support. |
| ext2 | Include tools for supporting for devices with internal HDD/Microdrive for storing files (instead of Flash only devices). |
| ipsec | Include IPSec support. |
| ipv6 | Include IPv6 support. |
| keyboard | Include keyboard support (e.g. keymaps will be loaded during boot). |
| ldconfig | Include support for ldconfig and ld.so.conf on the target. |
| nfs | Include NFS client support (for mounting NFS exports on device). |
| opengl | Include the Open Graphics Library, which is a cross-language, multi-platform application programming interface used for rendering two and three-dimensional graphics. |
| pci | Include PCI bus support. |
| pcmcia | Include PCMCIA/CompactFlash support. |
| ppp | Include PPP dialup support. |
| ptest | Enables building the package tests where supported by individual recipes. For more information on package tests, see the “Testing Packages With ptest” section in the Yocto Project Development Tasks Manual. |
| smbfs | Include SMB networks client support (for mounting Samba/Microsoft Windows shares on device). |
| systemd | Include support for this init manager, which is a full replacement of for init with parallel starting of services, reduced shell overhead, and other features. This init manager is used by many distributions. |
| usbgadget | Include USB Gadget Device support (for USB networking/serial/storage). |
| usbhost | Include USB Host support (allows to connect external keyboard, mouse, storage, network etc). |
| usrmerge | Merges the /bin, /sbin, /lib, and /lib64 directories into their respective counterparts in the /usr directory to provide better package and application compatibility. /bin -> /usr/bin/lib -> /usr/lib로 심볼릭링크 시킨다. |
| wayland | Include the Wayland display server protocol and the library that supports it. |
| wifi | Include WiFi support (integrated only). |
| x11 | Include the X server and libraries. |
/etc/init.d/ 디렉토리에 저장된다./etc/rc<N>.d/ 디렉토리에 나뉘어 구성되어 있고 <N>은 런레벨에 따라, S, 0, 1, .. 6DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"을 추가하면 이를 방지할 수 있다.include/security_flags.inc에서, -Werror=format-security가 set 되어 있기 때문이다.SECURITY_STRINGFORMAT = ""으로 하자.meta/conf/bitbake.conf에 MACHINE_FEATURES_BACKFILL, DISTRO_FEATURES_BACKFILL에 추가되어 자동으로 채워준다.DISTRO_FEATURES_BACKFILL' variable in meta/conf/bitbake.conf파일에 의해 다시 채워진다. meta/conf/bitbake.conf)변수에 의해 다시 backfill된다. systemd-jornald는 syslog runtime or provider가 아니다.systemd-jornald를 유일한 로깅 매커니즘으로 사용하려면, distro conf에 아래 변수를 사용해, syslog를 비활성화 해야한다.VIRTUAL-RUNTIME_syslog = ""
VIRTUAL-RUNTIME_base-tuils-syslog = ""
이를 이용해, rsyslog/busybox-syslog가 사용되는 것을 막을 수 있다.
Wayland: ProtocolWeston: Compositormesa가 wayland-egl platform으로 빌드됨$ bitbake core-image-weston
으로 이미지 빌드 후, 라즈베리파이에 write하고, 띄워보자.

XDG_RUNTIME_DIR이 설정되어 있지않아, 에러가 날 수 있다.
root $ mkdir -p /tmp/$USER-weston
root $ chmod 0700 /tmp/$USER-weston
root $ export XDG_RUNTIME_DIR=/tmp/$USER-weston



$ bitbake core-image-weston

weston-init/lib/systemd/system/weston@.service
Current working status
QEMU
Weston 1.0.3 will not run directly on the emulated QEMU hardware, due to lack of EGL support.
Weston will run under X emulation without issues.
Physical Machines
There is no embedded-class physical machine yet verified to run Weston to top of hardware. Current efforts focus on enabling FRI2.
Plan
Upgrade Weston to a version that can run only on framebuffer (e.g. pixman)
Image that boots Weston on KMS
Enable GTK+ 3 Wayland support
Enable Qt Wayland support
Enable Clutter Wayland support


| PACKAGECONFIG | Description |
|---|---|
PACKAGECONFIG_GL:rpi |
|
PACKAGECONFIG_GL:append:rpi |
|
PACKAGECONFIG_FONTS_rpi | "fontconfig" |
PACKAGECONFIG:append:rpi | " libinput examples tslib xkb xkbcommon" |
PACKAGECONFIG:remove:rpi | " tests" |

qtbase_%.bbappend 사용 처럼 qtwayland_%.bbappend를 사용하자!






https://prographics.tistory.com/1
poky-custom.conf
DISTRO_FEATURES:remove = "sysvinit x11"example-image.bb