From 66faf010bc1e7939448832d26110a698ea73649b Mon Sep 17 00:00:00 2001 From: fabian Date: Thu, 7 Mar 2024 00:57:27 +0100 Subject: [PATCH] finalize --- Makefile | 12 ++- build/conf/local.conf | 79 +++++-------------- build/conf/local.conf.flutter-auto | 0 .../custom-scripts/files/flutter-auto-launch | 2 + .../flutter-auto-launch_1.00.bb | 9 +++ .../devices/flutter-auto-setup_1.00.bb | 9 +++ .../devices/flutter-pi-setup_1.00.bb | 6 ++ .../recipes-core/devices/pi0w2-setup_1.00.bb | 15 ++++ .../recipes-core/devices/pi4-setup_1.00.bb | 15 ++++ .../recipes-core/flutter-user/files/file1 | 0 .../recipes-core/flutter-user/files/file2 | 0 .../recipes-core/flutter-user/files/file3 | 0 .../recipes-core/flutter-user/files/file4 | 0 .../flutter-user/flutter-user_1.00.bb | 34 ++++++++ .../my-rules/files/90-interfaces.rules | 12 +++ .../recipes-core/my-rules/my-rules_1.00.bb | 11 +++ .../systemd/files/flutter-auto.service | 44 +++++++++++ .../{flutter.service => flutter-pi.service} | 9 +-- .../systemd/flutter-auto-service_1.00.bb | 13 +++ .../systemd/flutter-pi-service_1.00.bb | 13 +++ .../systemd/flutter-service_1.00.bb | 13 --- .../recipes-example/example/example_0.1.bb | 13 --- .../recipes-extended/sudo_%.bbappend | 11 +++ 23 files changed, 227 insertions(+), 93 deletions(-) create mode 100644 build/conf/local.conf.flutter-auto create mode 100644 poky/meta-stargazer/recipes-core/custom-scripts/files/flutter-auto-launch create mode 100644 poky/meta-stargazer/recipes-core/custom-scripts/flutter-auto-launch_1.00.bb create mode 100644 poky/meta-stargazer/recipes-core/devices/flutter-auto-setup_1.00.bb create mode 100644 poky/meta-stargazer/recipes-core/devices/flutter-pi-setup_1.00.bb create mode 100644 poky/meta-stargazer/recipes-core/devices/pi0w2-setup_1.00.bb create mode 100644 poky/meta-stargazer/recipes-core/devices/pi4-setup_1.00.bb create mode 100644 poky/meta-stargazer/recipes-core/flutter-user/files/file1 create mode 100644 poky/meta-stargazer/recipes-core/flutter-user/files/file2 create mode 100644 poky/meta-stargazer/recipes-core/flutter-user/files/file3 create mode 100644 poky/meta-stargazer/recipes-core/flutter-user/files/file4 create mode 100644 poky/meta-stargazer/recipes-core/flutter-user/flutter-user_1.00.bb create mode 100644 poky/meta-stargazer/recipes-core/my-rules/files/90-interfaces.rules create mode 100644 poky/meta-stargazer/recipes-core/my-rules/my-rules_1.00.bb create mode 100644 poky/meta-stargazer/recipes-core/systemd/files/flutter-auto.service rename poky/meta-stargazer/recipes-core/systemd/files/{flutter.service => flutter-pi.service} (83%) create mode 100644 poky/meta-stargazer/recipes-core/systemd/flutter-auto-service_1.00.bb create mode 100644 poky/meta-stargazer/recipes-core/systemd/flutter-pi-service_1.00.bb delete mode 100644 poky/meta-stargazer/recipes-core/systemd/flutter-service_1.00.bb delete mode 100644 poky/meta-stargazer/recipes-example/example/example_0.1.bb create mode 100644 poky/meta-stargazer/recipes-extended/sudo_%.bbappend diff --git a/Makefile b/Makefile index ae325d2..8bb63d0 100644 --- a/Makefile +++ b/Makefile @@ -28,12 +28,18 @@ clean-all: clean-flutter-elinux: ./run_crops.sh bitbake -c clean flutter-elinux -clean-flutter-service: - ./run_crops.sh bitbake -c clean flutter-service +clean-flutter-pi-service: + ./run_crops.sh bitbake -c clean flutter-pi-service + +clean-flutter-auto-service: + ./run_crops.sh bitbake -c clean flutter-auto-service clean-flutter-pi: ./run_crops.sh bitbake -c clean flutter-pi - + +clean-flutter-user: + ./run_crops.sh bitbake -c clean flutter-user + clean-flutter-sdk: ./run_crops.sh bitbake flutter-sdk-native -cdo_cleanall diff --git a/build/conf/local.conf b/build/conf/local.conf index 4f00b45..f86eaa8 100644 --- a/build/conf/local.conf +++ b/build/conf/local.conf @@ -11,94 +11,54 @@ # default values are provided as comments to show people example syntax. Enabling # the option is a question of removing the # character and making any change to the # variable as required. -# TOOLCHAIN_HOST_TASK:append = " nativesdk-flutter-sdk" -ENABLE_UART = "1" +# manually set how many cores should be used to build +# by default bitbake will use as many threads as available on the system #BB_NUMBER_THREADS = "16" #PARALLEL_MAKE = "-j 16" -# INHERIT:remove = "uninative" -# INHERIT += "mender-full" -# flutter-service - -# # Machine Selection -# -# You need to select a specific machine to target the build with. There are a selection -# of emulated machines available which can boot and run in the QEMU emulator: -# -#MACHINE ?= "qemuarm" -#MACHINE ?= "qemuarm64" -#MACHINE ?= "qemumips" -#MACHINE ?= "qemumips64" -#MACHINE ?= "qemuppc" -#MACHINE ?= "qemux86" -#MACHINE ?= "qemux86-64" -# -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -#MACHINE ?= "edgerouter" -# -# This sets the default machine to be qemux86-64 if no other machine is selected: MACHINE ??= "raspberrypi4-64" #MACHINE ??= "raspberrypi0-2w-64" -# MACHINE ??= "raspberrypi3-64" -# pi4 -IMAGE_INSTALL:append = " flutter-pi flutter-auto flutter-elinux flutter-service flutter-libraries linux-firmware-rpidistro-bcm43430 linux-firmware-bcm43455 kernel-image kernel-devicetree liberation-fonts networkmanager dhcpcd iptables iw linux-firmware ca-certificates gstreamer1.0-rtsp-server gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav libinput libxkbcommon tzdata alsa-utils alsa-lib bcm2835-dev" -CORE_IMAGE_EXTRA_INSTALL += "wayland weston cage" +##!! use flutter-pi-service or flutter-auto-service -# pi 0 w2 -#IMAGE_INSTALL:append = " flutter-pi flutter-elinux flutter-service flutter-libraries linux-firmware-rpidistro-bcm43436s linux-firmware-bcm43455 kernel-image kernel-devicetree liberation-fonts networkmanager dhcpcd iptables iw linux-firmware ca-certificates gstreamer1.0-rtsp-server gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav libinput libxkbcommon tzdata" -# IMAGE-INSTALL:append = " network-manager dhcp-server wireless-tools dhcp-client" +# pi4: +IMAGE_INSTALL:append = " flutter-auto flutter-auto-launch flutter-pi flutter-elinux flutter-auto-service my-rules flutter-libraries sudo linux-firmware-rpidistro-bcm43430 linux-firmware-bcm43455 kernel-image kernel-devicetree liberation-fonts networkmanager dhcpcd iptables iw linux-firmware ca-certificates gstreamer1.0-rtsp-server gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav libinput libxkbcommon tzdata alsa-utils alsa-lib bcm2835-dev flutter-user" -#alsa-dev alsa-lib alsa-utils bcm2835-dev tmux chrony tzdata +# pi 0 w2: +#IMAGE_INSTALL:append = " flutter-auto flutter-auto-launch flutter-pi flutter-elinux flutter-auto-service flutter-libraries sudo linux-firmware-rpidistro-bcm43436s linux-firmware-bcm43455 kernel-image kernel-devicetree liberation-fonts networkmanager dhcpcd iptables iw linux-firmware ca-certificates gstreamer1.0-rtsp-server gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav libinput libxkbcommon tzdata alsa-utils alsa-lib bcm2835-dev" + + +# needed only for flutter-auto: +CORE_IMAGE_EXTRA_INSTALL += "wayland cage" + + +# needed for gstreamer-plugins-ugly LICENSE_FLAGS_ACCEPTED = "commercial" +# set the default timezone, will be synced by systemd DEFAULT_TIMEZONE = "Europe/Berlin" - - -#MACHINE_EXTRA_RRECOMMENDS:append = " dhcp-server iptables iw wireless-tools dhcp-client linux-firmware linux-firmware-bcm43455 kernel-image kernel-devicetree liberation-fonts" - INIT_MANAGER = "systemd" -# MENDER_SERVER_URL = "https://mender.io" -#MENDER_TENANT_TOKEN = "" - -# RPI_USE_U_BOOT = "1" -# MENDER_EFI_LOADER = "u-boot" -# MENDER_PARTITION_ALIGNMENT_KB = "4096" -# MENDER_BOOT_PART_SIZE_MB = "40" -# VIRTUAL-RUNTIME_init_manager = "systemd" -# DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" -# MENDER_SERVER_URL = "https://hosted.mender.io" -# MENDER_TENANT_TOKEN = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzNGQwNjgzYy01NDM4LTQwNTUtYTgwNy1mYTVmMTNjMDI5ZTYiLCJzdWIiOiI1ZjkwZTY1Yi01N2YyLTQ5NDYtOGU2ZC1hN2NhZGIwNjg4YzAiLCJleHAiOjE2OTg1OTUyNjIsImlhdCI6MTY5ODUwODg2MiwibWVuZGVyLnRlbmFudCI6IjY1MzQzYWQ4ZDdjOTNlZTM3NTFhMmUyNCIsIm1lbmRlci51c2VyIjp0cnVlLCJpc3MiOiJNZW5kZXIgVXNlcnMiLCJzY3AiOiJtZW5kZXIuKiIsIm1lbmRlci5wbGFuIjoiZW50ZXJwcmlzZSIsIm1lbmRlci50cmlhbCI6dHJ1ZSwibWVuZGVyLmFkZG9ucyI6W3sibmFtZSI6ImNvbmZpZ3VyZSIsImVuYWJsZWQiOnRydWV9LHsibmFtZSI6InRyb3VibGVzaG9vdCIsImVuYWJsZWQiOnRydWV9LHsibmFtZSI6Im1vbml0b3IiLCJlbmFibGVkIjp0cnVlfV0sIm5iZiI6MTY5ODUwODg2Mn0.dABkcij0pm7d4o4RqYsWWparQbZQ4J-uL0iaQuaoYzPnObdPemoB61JyzNcBnA0rYzBsaa5yu177rFnwNGzuxN-tdxID1BMpADo_EwrXRxuQlRx287XJQTZRa9Ilj-nUpDq-XWOePKccm2_6SmMP6cCvoyB3aHADIQ9bl99iM0txduj2uVA8KDh2vKa5zq_Cjci1DHomweY_k9wXlC9jDXQ_cLdfPrVK9gapemLVBMN0lw8RbdUWwYVUipCIOJVlN0jObpDIyEx5p4zRAqKEMJIEPrNvl32IdtWZS9H2QsfZQXLc3AflfpIhzvh3Wovs7y4iAO14o0Vb5PRPPj5e0nI7MQoyjQnv1VG_Lhd1gJoYB3bNcv1lMJC24B9lnEF3c68z2SAeOGgq17KZJb2NZRzw5qdoRXUWsbt5BhSbNqzCReL5xuCZxXkH2E4J4t2aSXhlEJsGOX9AEVetqnSe4oViTygAGmy6A_Q76EQLNjovA20YZjDC7nsJS428rDVw" -# KERNEL_FEATURES:remove = "cfg/fs/vfat.scc" - +# wayland is only needed for flutter-auto DISTRO_FEATURES:append = " systemd opengl wifi wayland pam" +# meta-raspberry specific configuration for raspberry pi devices DISABLE_OVERSCAN = "1" DISABLE_SPLASH = "1" GPU_MEM = "64" DISABLE_RPI_BOOT_LOGO = "1" ENABLE_SPI_BUS = "1" -# ENABLE_I2C = "1" - -# KERNEL_MODULE_AUTOLOAD:rpi += "i2c-dev i2c-bcm2708" - +ENABLE_UART = "1" +# extra boot configuration for raspberry pi RPI_EXTRA_CONFIG = ' \n \ dtparam=spi=on \n \ dtparam=audio=on \n \ ' - - # # Where to place downloads # @@ -338,5 +298,6 @@ PACKAGECONFIG:append:pn-qemu-system-native = " sdl" # this doesn't mean anything to you. CONF_VERSION = "2" +# set output file format IMAGE_FSTYPES = "ext4 rpi-sdimg" SDIMG_ROOTFS_TYPE = "ext4" diff --git a/build/conf/local.conf.flutter-auto b/build/conf/local.conf.flutter-auto new file mode 100644 index 0000000..e69de29 diff --git a/poky/meta-stargazer/recipes-core/custom-scripts/files/flutter-auto-launch b/poky/meta-stargazer/recipes-core/custom-scripts/files/flutter-auto-launch new file mode 100644 index 0000000..72d4cc3 --- /dev/null +++ b/poky/meta-stargazer/recipes-core/custom-scripts/files/flutter-auto-launch @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +/usr/bin/flutter-auto --b=/flutter/flutter_elinux/3.19.2/release --c --f \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/custom-scripts/flutter-auto-launch_1.00.bb b/poky/meta-stargazer/recipes-core/custom-scripts/flutter-auto-launch_1.00.bb new file mode 100644 index 0000000..26bdc80 --- /dev/null +++ b/poky/meta-stargazer/recipes-core/custom-scripts/flutter-auto-launch_1.00.bb @@ -0,0 +1,9 @@ +LICENSE = "CLOSED" + +SRC_URI:append = " file://flutter-auto-launch " +FILES:${PN} += "/usr/local/bin/flutter-auto-launch" + +do_install:append() { + install -d ${D}/usr/local/bin + install -m 0777 ${WORKDIR}/flutter-auto-launch ${D}/usr/local/bin +} \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/devices/flutter-auto-setup_1.00.bb b/poky/meta-stargazer/recipes-core/devices/flutter-auto-setup_1.00.bb new file mode 100644 index 0000000..30d5c4a --- /dev/null +++ b/poky/meta-stargazer/recipes-core/devices/flutter-auto-setup_1.00.bb @@ -0,0 +1,9 @@ +LICENSE = "CLOSED" + +IMAGE_INSTALL:append = " flutter-auto flutter-elinux flutter-auto-launch flutter-libraries kernel-image kernel-devicetree liberation-fonts networkmanager dhcpcd iptables iw linux-firmware ca-certificates gstreamer1.0-rtsp-server gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav libinput libxkbcommon tzdata alsa-utils alsa-lib bcm2835-dev" + +# needed for gstreamer-plugins-ugly: +LICENSE_FLAGS_ACCEPTED = "commercial" + +CORE_IMAGE_EXTRA_INSTALL += "wayland cage" +DISTRO_FEATURES:append = " wayland" \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/devices/flutter-pi-setup_1.00.bb b/poky/meta-stargazer/recipes-core/devices/flutter-pi-setup_1.00.bb new file mode 100644 index 0000000..4f40d2a --- /dev/null +++ b/poky/meta-stargazer/recipes-core/devices/flutter-pi-setup_1.00.bb @@ -0,0 +1,6 @@ +LICENSE = "CLOSED" + +IMAGE_INSTALL:append = " flutter-pi flutter-elinux flutter-auto-launch flutter-libraries kernel-image kernel-devicetree liberation-fonts networkmanager dhcpcd iptables iw linux-firmware ca-certificates gstreamer1.0-rtsp-server gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav libinput libxkbcommon tzdata alsa-utils alsa-lib" + +# needed for gstreamer-plugins-ugly: +LICENSE_FLAGS_ACCEPTED = "commercial" \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/devices/pi0w2-setup_1.00.bb b/poky/meta-stargazer/recipes-core/devices/pi0w2-setup_1.00.bb new file mode 100644 index 0000000..e3a933f --- /dev/null +++ b/poky/meta-stargazer/recipes-core/devices/pi0w2-setup_1.00.bb @@ -0,0 +1,15 @@ +LICENSE = "CLOSED" + +IMAGE_INSTALL:append = " linux-firmware-rpidistro-bcm43436s linux-firmware-bcm43455 bcm2835-dev" + +# meta-raspberry specific configuration for raspberry pi devices +DISABLE_OVERSCAN = "1" +DISABLE_SPLASH = "1" +GPU_MEM = "64" +DISABLE_RPI_BOOT_LOGO = "1" +ENABLE_SPI_BUS = "1" + +RPI_EXTRA_CONFIG = ' \n \ +dtparam=spi=on \n \ +dtparam=audio=on \n \ +' \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/devices/pi4-setup_1.00.bb b/poky/meta-stargazer/recipes-core/devices/pi4-setup_1.00.bb new file mode 100644 index 0000000..b5a06c8 --- /dev/null +++ b/poky/meta-stargazer/recipes-core/devices/pi4-setup_1.00.bb @@ -0,0 +1,15 @@ +LICENSE = "CLOSED" + +IMAGE_INSTALL:append = " linux-firmware-rpidistro-bcm43430 linux-firmware-bcm43455 bcm2835-dev" + +# meta-raspberry specific configuration for raspberry pi devices +DISABLE_OVERSCAN = "1" +DISABLE_SPLASH = "1" +GPU_MEM = "64" +DISABLE_RPI_BOOT_LOGO = "1" +ENABLE_SPI_BUS = "1" + +RPI_EXTRA_CONFIG = ' \n \ +dtparam=spi=on \n \ +dtparam=audio=on \n \ +' \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/flutter-user/files/file1 b/poky/meta-stargazer/recipes-core/flutter-user/files/file1 new file mode 100644 index 0000000..e69de29 diff --git a/poky/meta-stargazer/recipes-core/flutter-user/files/file2 b/poky/meta-stargazer/recipes-core/flutter-user/files/file2 new file mode 100644 index 0000000..e69de29 diff --git a/poky/meta-stargazer/recipes-core/flutter-user/files/file3 b/poky/meta-stargazer/recipes-core/flutter-user/files/file3 new file mode 100644 index 0000000..e69de29 diff --git a/poky/meta-stargazer/recipes-core/flutter-user/files/file4 b/poky/meta-stargazer/recipes-core/flutter-user/files/file4 new file mode 100644 index 0000000..e69de29 diff --git a/poky/meta-stargazer/recipes-core/flutter-user/flutter-user_1.00.bb b/poky/meta-stargazer/recipes-core/flutter-user/flutter-user_1.00.bb new file mode 100644 index 0000000..c53d188 --- /dev/null +++ b/poky/meta-stargazer/recipes-core/flutter-user/flutter-user_1.00.bb @@ -0,0 +1,34 @@ +SUMMARY = "Example recipe for using inherit useradd" +DESCRIPTION = "This recipe serves as an example for using features from useradd.bbclass" +SECTION = "examples" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +S = "${WORKDIR}" + +EXCLUDE_FROM_WORLD = "1" + +inherit useradd + +USERADD_PACKAGES = "${PN}" + +GROUPADD_PARAM:${PN} = "gpio; spi" + +USERADD_PARAM:${PN} = "-d /home/user1 -G input,video,gpio,spi -r -s /bin/bash user1;" + +do_install () { + install -d -m 755 ${D}${datadir}/user1 + + chown -R user1 ${D}${datadir}/user1 + + install -d -m 711 ${D}/home/user1 + chown -R user1 ${D}/home/user1 + chgrp -R user1 ${D}/home/user1 +} + +FILES:${PN} = "${datadir}/user1/ /home/user1" + +# Prevents do_package failures with: +# debugsources.list: No such file or directory: +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + diff --git a/poky/meta-stargazer/recipes-core/my-rules/files/90-interfaces.rules b/poky/meta-stargazer/recipes-core/my-rules/files/90-interfaces.rules new file mode 100644 index 0000000..48f6cab --- /dev/null +++ b/poky/meta-stargazer/recipes-core/my-rules/files/90-interfaces.rules @@ -0,0 +1,12 @@ +SUBSYSTEM=="input", GROUP="input", MODE="0660" +SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660" +SUBSYSTEM=="spidev", GROUP="spi", MODE="0660" +SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660" + +SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660" +SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\ +chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\ +chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 +/sys/devices/virtual/gpio;\ +chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\ +'" \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/my-rules/my-rules_1.00.bb b/poky/meta-stargazer/recipes-core/my-rules/my-rules_1.00.bb new file mode 100644 index 0000000..b5d4039 --- /dev/null +++ b/poky/meta-stargazer/recipes-core/my-rules/my-rules_1.00.bb @@ -0,0 +1,11 @@ +LICENSE = "CLOSED" + +SRC_URI:append = " file://90-interfaces.rules" +FILES:${PN} += " /etc/udev/rules.d/90-interfaces.rules" + +do_install:append() { + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0666 ${WORKDIR}/90-interfaces.rules ${D}/etc/udev/rules.d/90-interfaces.rules +} + +PROVIDES = "my-rules" \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/systemd/files/flutter-auto.service b/poky/meta-stargazer/recipes-core/systemd/files/flutter-auto.service new file mode 100644 index 0000000..f7f876f --- /dev/null +++ b/poky/meta-stargazer/recipes-core/systemd/files/flutter-auto.service @@ -0,0 +1,44 @@ +[Unit] +Description=Flutter App Service +After=network.target +StartLimitIntervalSec=0 + +Requires=systemd-user-sessions.service +After=systemd-user-sessions.service + +After=plymouth-quit-wait.service + +Wants=dbus.socket +After=dbus.socket + +Before=graphical.target + +ConditionPathExists=/dev/tty0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +ExecStart=/usr/bin/cage /usr/local/bin/flutter-auto-launch + +User=user1 +Group=user1 + +WorkingDirectory=/home/user1 + +PAMName=login + +TTYPath=/dev/tty7 +TTYReset=yes +TTYVHangup=yes +TTYTDisallocate=yes + +StandardInput=tty-fail +StandardOutput=journal +StandardError=journal + +UtmpIdentifier=tty7 +UtmpMode=user + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/systemd/files/flutter.service b/poky/meta-stargazer/recipes-core/systemd/files/flutter-pi.service similarity index 83% rename from poky/meta-stargazer/recipes-core/systemd/files/flutter.service rename to poky/meta-stargazer/recipes-core/systemd/files/flutter-pi.service index d686bad..9bc4b50 100644 --- a/poky/meta-stargazer/recipes-core/systemd/files/flutter.service +++ b/poky/meta-stargazer/recipes-core/systemd/files/flutter-pi.service @@ -19,15 +19,14 @@ ConditionPathExists=/dev/tty0 Type=simple Restart=always RestartSec=1 -#ExecStart=/usr/bin/cage /usr/bin/flutter-auto-launch ExecStart=/usr/bin/flutter-pi --release /flutter/flutter_elinux/3.19.2/release -User=root -Group=root +User=user1 +Group=user1 -WorkingDirectory=/home/root +WorkingDirectory=/home/user1 -PAMName=weston-autologin +PAMName=login TTYPath=/dev/tty7 TTYReset=yes diff --git a/poky/meta-stargazer/recipes-core/systemd/flutter-auto-service_1.00.bb b/poky/meta-stargazer/recipes-core/systemd/flutter-auto-service_1.00.bb new file mode 100644 index 0000000..b527004 --- /dev/null +++ b/poky/meta-stargazer/recipes-core/systemd/flutter-auto-service_1.00.bb @@ -0,0 +1,13 @@ +LICENSE = "CLOSED" +inherit systemd + +SYSTEMD_AUTO_ENABLE = "enable" +SYSTEMD_SERVICE:${PN} = "flutter-auto.service" + +SRC_URI:append = " file://flutter-auto.service " +FILES:${PN} += "${systemd_unitdir}/system/flutter-auto.service" + +do_install:append() { + install -d ${D}/${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/flutter-auto.service ${D}/${systemd_unitdir}/system +} \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/systemd/flutter-pi-service_1.00.bb b/poky/meta-stargazer/recipes-core/systemd/flutter-pi-service_1.00.bb new file mode 100644 index 0000000..afe5799 --- /dev/null +++ b/poky/meta-stargazer/recipes-core/systemd/flutter-pi-service_1.00.bb @@ -0,0 +1,13 @@ +LICENSE = "CLOSED" +inherit systemd + +SYSTEMD_AUTO_ENABLE = "enable" +SYSTEMD_SERVICE:${PN} = "flutter-pi.service" + +SRC_URI:append = " file://flutter-pi.service " +FILES:${PN} += "${systemd_unitdir}/system/flutter-pi.service" + +do_install:append() { + install -d ${D}/${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/flutter-pi.service ${D}/${systemd_unitdir}/system +} \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-core/systemd/flutter-service_1.00.bb b/poky/meta-stargazer/recipes-core/systemd/flutter-service_1.00.bb deleted file mode 100644 index 2d40a6c..0000000 --- a/poky/meta-stargazer/recipes-core/systemd/flutter-service_1.00.bb +++ /dev/null @@ -1,13 +0,0 @@ -LICENSE = "CLOSED" -inherit systemd - -SYSTEMD_AUTO_ENABLE = "enable" -SYSTEMD_SERVICE:${PN} = "flutter.service" - -SRC_URI:append = " file://flutter.service " -FILES:${PN} += "${systemd_unitdir}/system/flutter.service" - -do_install:append() { - install -d ${D}/${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/flutter.service ${D}/${systemd_unitdir}/system -} \ No newline at end of file diff --git a/poky/meta-stargazer/recipes-example/example/example_0.1.bb b/poky/meta-stargazer/recipes-example/example/example_0.1.bb deleted file mode 100644 index facaae3..0000000 --- a/poky/meta-stargazer/recipes-example/example/example_0.1.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "bitbake-layers recipe" -DESCRIPTION = "Recipe created by bitbake-layers" -LICENSE = "MIT" - -python do_display_banner() { - bb.plain("***********************************************"); - bb.plain("* *"); - bb.plain("* Example recipe created by bitbake-layers *"); - bb.plain("* *"); - bb.plain("***********************************************"); -} - -addtask display_banner before do_build diff --git a/poky/meta-stargazer/recipes-extended/sudo_%.bbappend b/poky/meta-stargazer/recipes-extended/sudo_%.bbappend new file mode 100644 index 0000000..8d3cb50 --- /dev/null +++ b/poky/meta-stargazer/recipes-extended/sudo_%.bbappend @@ -0,0 +1,11 @@ +AUTHORIZED_USER_NAME ?= "user1" + +do_install_append () { + # Add sudo accesses for user. + install -d -m 0710 "${D}/etc/sudoers.d" + echo "${AUTHORIZED_USER_NAME} ALL=(ALL) NOPASSWD: /sbin/shutdown" > "${D}/etc/sudoers.d/0001_${AUTHORIZED_USER_NAME}" + chmod 0644 "${D}/etc/sudoers.d/0001_${AUTHORIZED_USER_NAME}" +} + +FILES_${PN} += "/etc/sudoers.d \ + /etc/sudoers.d/0001_${AUTHORIZED_USER_NAME}" \ No newline at end of file