gui running in qemu
This commit is contained in:
@@ -9,5 +9,9 @@ BBLAYERS ?= " \
|
||||
/workspace/yocto/poky/meta \
|
||||
/workspace/yocto/poky/meta-poky \
|
||||
/workspace/yocto/poky/meta-yocto-bsp \
|
||||
/workspace/yocto/meta-openembedded/meta-oe \
|
||||
/workspace/yocto/meta-openembedded/meta-python \
|
||||
/workspace/yocto/meta-openembedded/meta-multimedia \
|
||||
/workspace/yocto/meta-rust-bin \
|
||||
/workspace/meta-layers/meta-fcb-looper \
|
||||
"
|
||||
|
||||
@@ -20,4 +20,16 @@ PARALLEL_MAKE = "-j 2"
|
||||
|
||||
# Limit memory usage for builds
|
||||
BB_SCHEDULER = "completion"
|
||||
INHERIT += "rm_work"
|
||||
INHERIT += "rm_work"
|
||||
|
||||
# Rust support
|
||||
ENABLE_RUST = "1"
|
||||
|
||||
# GUI support
|
||||
DISTRO_FEATURES:append = " wayland systemd pam usrmerge"
|
||||
VIRTUAL-RUNTIME_init_manager = "systemd"
|
||||
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
|
||||
VIRTUAL-RUNTIME_initscripts = ""
|
||||
|
||||
# Add GUI packages to image
|
||||
CORE_IMAGE_EXTRA_INSTALL += "gui-app weston liberation-fonts"
|
||||
|
||||
@@ -9,15 +9,17 @@ services:
|
||||
container_name: disk-image
|
||||
hostname: disk-image
|
||||
working_dir: /workspace
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
- ./:/workspace
|
||||
- ../:/repo
|
||||
tty: true
|
||||
stdin_open: true
|
||||
command: >
|
||||
bash -c "
|
||||
source /workspace/yocto/poky/oe-init-build-env /workspace/build &&
|
||||
cp /workspace/conf/* /workspace/build/conf/ &&
|
||||
bitbake core-image-minimal &&
|
||||
bitbake fcb-looper-image &&
|
||||
echo 'Build complete. Image files available in output directory.'
|
||||
"
|
||||
|
||||
@@ -34,6 +36,7 @@ services:
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
- ./:/workspace
|
||||
- ../:/repo
|
||||
tty: true
|
||||
stdin_open: true
|
||||
depends_on:
|
||||
@@ -44,5 +47,5 @@ services:
|
||||
echo 'VNC will be available on localhost:5901' &&
|
||||
echo 'SSH will be available on localhost:2222' &&
|
||||
echo 'QEMU monitor on localhost:4444' &&
|
||||
qemu-system-x86_64 -cpu core2duo -m 2048 -smp 2 -kernel /workspace/build/tmp/deploy/images/genericx86-64/bzImage -drive file=/workspace/build/tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.rootfs.ext4,if=virtio,format=raw -netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-:22,hostfwd=tcp:127.0.0.1:8080-:8080 -device virtio-net-pci,netdev=net0 -vnc 127.0.0.1:1 -monitor telnet:127.0.0.1:4444,server,nowait -serial stdio -append 'root=/dev/vda rw console=ttyS0 console=tty0'
|
||||
qemu-system-x86_64 -cpu core2duo -m 2048 -smp 2 -kernel /workspace/build/tmp/deploy/images/genericx86-64/bzImage -drive file=/workspace/build/tmp/deploy/images/genericx86-64/fcb-looper-image-genericx86-64.rootfs.ext4,if=virtio,format=raw -netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-:22,hostfwd=tcp:127.0.0.1:8080-:8080 -device virtio-net-pci,netdev=net0 -device virtio-vga -vnc 127.0.0.1:1 -monitor telnet:127.0.0.1:4444,server,nowait -serial stdio -append 'root=/dev/vda rw console=ttyS0 console=tty0'
|
||||
"
|
||||
@@ -9,7 +9,7 @@ BBFILE_PATTERN_meta-fcb-looper = "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-fcb-looper = "10"
|
||||
|
||||
LAYERVERSION_meta-fcb-looper = "1"
|
||||
LAYERSERIES_COMPAT_meta-fcb-looper = "whinlatter"
|
||||
LAYERSERIES_COMPAT_meta-fcb-looper = "scarthgap"
|
||||
|
||||
# Dependencies
|
||||
LAYERDEPENDS_meta-fcb-looper = "core"
|
||||
LAYERDEPENDS_meta-fcb-looper = "core openembedded-layer rust-bin-layer"
|
||||
@@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
Description=FCB Looper GUI Application
|
||||
After=weston.service
|
||||
Wants=weston.service
|
||||
Requires=graphical.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Environment="WAYLAND_DISPLAY=wayland-0"
|
||||
Environment="XDG_RUNTIME_DIR=/run/user/0"
|
||||
Environment="RUST_LOG=info"
|
||||
ExecStartPre=/bin/sleep 3
|
||||
ExecStart=/usr/bin/gui
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
WatchdogSec=30
|
||||
|
||||
# Resource limits
|
||||
MemoryMax=256M
|
||||
CPUQuota=80%
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
||||
@@ -0,0 +1,36 @@
|
||||
SUMMARY = "FCB Looper GUI Application"
|
||||
DESCRIPTION = "Rust egui GUI for FCB1010 looper pedal"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
inherit cargo_bin systemd externalsrc
|
||||
|
||||
# Network access required for cargo dependencies (Yocto 4.0+)
|
||||
do_compile[network] = "1"
|
||||
|
||||
# Remove debug function - clean recipe
|
||||
#CARGO_BUILD_FLAGS = "--target x86_64-poky-linux-gnu --release"
|
||||
|
||||
# Use external source directory
|
||||
EXTERNALSRC = "/repo/gui"
|
||||
EXTERNALSRC_BUILD = "${WORKDIR}/build"
|
||||
|
||||
# Disable externalsrc debug symlinks
|
||||
EXTERNALSRC_SYMLINKS = ""
|
||||
|
||||
# Dependencies for GUI
|
||||
DEPENDS += "wayland wayland-protocols libxkbcommon fontconfig"
|
||||
RDEPENDS:${PN} += "weston liberation-fonts systemd"
|
||||
|
||||
# Systemd service
|
||||
SRC_URI += "file://gui-app.service"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/gui-app.service ${D}${systemd_system_unitdir}/
|
||||
}
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "gui-app.service"
|
||||
SYSTEMD_AUTO_ENABLE:${PN} = "enable"
|
||||
|
||||
FILES:${PN} += "${systemd_system_unitdir}/gui-app.service"
|
||||
@@ -0,0 +1,29 @@
|
||||
SUMMARY = "FCB1010 Looper System Image"
|
||||
DESCRIPTION = "Minimal embedded Linux system with GUI for audio looper"
|
||||
|
||||
require recipes-core/images/core-image-base.bb
|
||||
|
||||
IMAGE_INSTALL += "\
|
||||
packagegroup-core-boot \
|
||||
gui-app \
|
||||
weston \
|
||||
weston-init \
|
||||
liberation-fonts \
|
||||
systemd \
|
||||
openssh \
|
||||
ssh-keys \
|
||||
${CORE_IMAGE_EXTRA_INSTALL} \
|
||||
"
|
||||
|
||||
# Optimize for embedded use
|
||||
IMAGE_FEATURES += "read-only-rootfs ssh-server-openssh"
|
||||
SYSTEMD_DEFAULT_TARGET = "graphical.target"
|
||||
|
||||
# Size optimization
|
||||
IMAGE_ROOTFS_SIZE ?= "1048576"
|
||||
IMAGE_OVERHEAD_FACTOR = "1.1"
|
||||
|
||||
# Image formats
|
||||
IMAGE_FSTYPES += "ext4 tar.bz2"
|
||||
|
||||
LICENSE = "MIT"
|
||||
@@ -13,7 +13,7 @@ do_compile[noexec] = "1"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${ROOT_HOME}/.ssh
|
||||
install -m 0600 ${UNPACKDIR}/authorized_keys ${D}${ROOT_HOME}/.ssh/authorized_keys
|
||||
install -m 0600 ${WORKDIR}/authorized_keys ${D}${ROOT_HOME}/.ssh/authorized_keys
|
||||
}
|
||||
|
||||
FILES:${PN} = "${ROOT_HOME}/.ssh/authorized_keys"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# Disable xwayland for embedded system
|
||||
PACKAGECONFIG:remove = "xwayland"
|
||||
@@ -0,0 +1,2 @@
|
||||
# Enable DRM backend for VirtIO GPU
|
||||
PACKAGECONFIG:append = " drm"
|
||||
Submodule image/yocto/poky updated: 243d54fd46...b8f8125f05
Reference in New Issue
Block a user