finalize
This commit is contained in:
parent
dae3069942
commit
9e98469b22
1
poky/.gitignore
vendored
1
poky/.gitignore
vendored
@ -29,6 +29,7 @@ hob-image-*.bb
|
||||
!meta-mender
|
||||
!meta-mender-community
|
||||
!meta-flutter-apps
|
||||
!meta-flutter-elinux
|
||||
/documentation/*/eclipse/
|
||||
/documentation/*/*.html
|
||||
/documentation/*/*.pdf
|
||||
|
17
poky/meta-flutter-elinux/COPYING.MIT
Normal file
17
poky/meta-flutter-elinux/COPYING.MIT
Normal file
@ -0,0 +1,17 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
41
poky/meta-flutter-elinux/README
Normal file
41
poky/meta-flutter-elinux/README
Normal file
@ -0,0 +1,41 @@
|
||||
This README file contains information on the contents of the meta-stargazer layer.
|
||||
|
||||
Please see the corresponding sections below for details.
|
||||
|
||||
Dependencies
|
||||
============
|
||||
|
||||
URI: <first dependency>
|
||||
branch: <branch name>
|
||||
|
||||
URI: <second dependency>
|
||||
branch: <branch name>
|
||||
|
||||
.
|
||||
.
|
||||
.
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Please submit any patches against the meta-stargazer layer to the xxxx mailing list (xxxx@zzzz.org)
|
||||
and cc: the maintainer:
|
||||
|
||||
Maintainer: XXX YYYYYY <xxx.yyyyyy@zzzzz.com>
|
||||
|
||||
Table of Contents
|
||||
=================
|
||||
|
||||
I. Adding the meta-stargazer layer to your build
|
||||
II. Misc
|
||||
|
||||
|
||||
I. Adding the meta-stargazer layer to your build
|
||||
=================================================
|
||||
|
||||
Run 'bitbake-layers add-layer meta-stargazer'
|
||||
|
||||
II. Misc
|
||||
========
|
||||
|
||||
--- replace with specific information about the meta-stargazer layer ---
|
13
poky/meta-flutter-elinux/conf/layer.conf
Normal file
13
poky/meta-flutter-elinux/conf/layer.conf
Normal file
@ -0,0 +1,13 @@
|
||||
# We have a conf and classes directory, add to BBPATH
|
||||
BBPATH .= ":${LAYERDIR}"
|
||||
|
||||
# We have recipes-* directories, add to BBFILES
|
||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
||||
${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "meta-stargazer"
|
||||
BBFILE_PATTERN_meta-stargazer = "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-stargazer = "6"
|
||||
|
||||
LAYERDEPENDS_meta-stargazer = "core"
|
||||
LAYERSERIES_COMPAT_meta-stargazer = "kirkstone"
|
@ -0,0 +1,4 @@
|
||||
network={
|
||||
ssid="Pixel_8693"
|
||||
psk=913bb5fe8b91473c9dd1d0d879f43af5f63e884250e3737dcf4b02955ea9f345
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
SRC_URI += "file://wpa_supplicant-nl80211-wlan0.conf"
|
||||
|
||||
SYSTEMD_AUTO_ENABLE = "enable"
|
||||
SYSTEMD_SERVICE:${PN}:append = " wpa_supplicant-nl80211@wlan0.service "
|
||||
|
||||
do_install:append () {
|
||||
install -d ${D}${sysconfdir}/wpa_supplicant/
|
||||
install -D -m 600 ${WORKDIR}/wpa_supplicant-nl80211-wlan0.conf ${D}${sysconfdir}/wpa_supplicant/
|
||||
|
||||
install -d ${D}${sysconfdir}/systemd/system/multi-user.target.wants/
|
||||
ln -s ${systemd_unitdir}/system/wpa_supplicant@.service ${D}${sysconfdir}/systemd/system/multi-user.target.wants/wpa_supplicant-nl80211@wlan0.service
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
/usr/bin/flutter-auto --b=/flutter/flutter_elinux/3.19.2/release --c --f
|
@ -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
|
||||
}
|
@ -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"
|
@ -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"
|
@ -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 \
|
||||
'
|
@ -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 \
|
||||
'
|
@ -0,0 +1,15 @@
|
||||
SUMMARY = ""
|
||||
DESCRIPTION = ""
|
||||
LICENSE = "closed"
|
||||
|
||||
FLUTTER_ELINUX_AUTOLAUNCH = "false"
|
||||
|
||||
DEPENDS = "flutter-auto flutter-auto-launch ${@bb.utils.contains('FLUTTER_ELINUX_AUTOLAUNCH', 'true', 'flutter-auto-service', '', d)} flutter-elinux flutter-elinux-rules flutter-user"
|
||||
|
||||
|
||||
# Installation task
|
||||
do_install() {
|
||||
# Since we only aim to install dependencies, there's
|
||||
# nothing to install directly for this recipe itself.
|
||||
:
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
SUMMARY = ""
|
||||
DESCRIPTION = ""
|
||||
LICENSE = "closed"
|
||||
|
||||
FLUTTER_ELINUX_AUTOLAUNCH = "false"
|
||||
|
||||
DEPENDS = "flutter-auto flutter-auto-launch ${@bb.utils.contains('FLUTTER_ELINUX_AUTOLAUNCH', 'true', 'flutter-auto-service', '', d)} flutter-elinux flutter-elinux-rules"
|
||||
|
||||
|
||||
# Installation task
|
||||
do_install() {
|
||||
# Since we only aim to install dependencies, there's
|
||||
# nothing to install directly for this recipe itself.
|
||||
:
|
||||
}
|
@ -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\
|
||||
'"
|
@ -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"
|
@ -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"
|
||||
|
BIN
poky/meta-flutter-elinux/recipes-core/libraries/files/libflutter_pty.so
Executable file
BIN
poky/meta-flutter-elinux/recipes-core/libraries/files/libflutter_pty.so
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,18 @@
|
||||
DESCRIPTION = "My custom libraries"
|
||||
LICENSE = "CLOSED"
|
||||
|
||||
SRC_URI = " \
|
||||
file://libperiphery_arm64.so \
|
||||
file://libflutter_pty.so \
|
||||
"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}/${libdir}/flutter
|
||||
install -m 0644 ${WORKDIR}/libperiphery_arm64.so ${D}/${libdir}/flutter
|
||||
install -m 0644 ${WORKDIR}/libflutter_pty.so ${D}/${libdir}/flutter
|
||||
|
||||
ln -sf ${libdir}/flutter/libperiphery_arm64.so ${D}${libdir}
|
||||
ln -sf ${libdir}/flutter/libflutter_pty.so ${D}${libdir}
|
||||
}
|
||||
|
||||
FILES:${PN} += "${libdir}/flutter/*.so"
|
@ -0,0 +1,10 @@
|
||||
[Match]
|
||||
Name=en*
|
||||
KernelCommandLine=!nfsroot
|
||||
|
||||
[Network]
|
||||
DHCP=v4
|
||||
|
||||
[DHCPv4]
|
||||
UseHostname=false
|
||||
EOF
|
@ -0,0 +1,10 @@
|
||||
[Match]
|
||||
Name=eth*
|
||||
KernelCommandLine=!nfsroot
|
||||
|
||||
[Network]
|
||||
DHCP=v4
|
||||
|
||||
[DHCPv4]
|
||||
UseHostname=false
|
||||
EOF
|
@ -0,0 +1,10 @@
|
||||
[Match]
|
||||
Name=wlan*
|
||||
KernelCommandLine=!nfsroot
|
||||
|
||||
[Network]
|
||||
DHCP=v4
|
||||
|
||||
[DHCPv4]
|
||||
UseHostname=false
|
||||
EOF
|
@ -0,0 +1,20 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
SRC_URI += " \
|
||||
file://eth.network \
|
||||
file://en.network \
|
||||
file://wlan.network \
|
||||
"
|
||||
|
||||
FILES:${PN} += " \
|
||||
${sysconfdir}/systemd/network/eth.network \
|
||||
${sysconfdir}/systemd/network/en.network \
|
||||
${sysconfdir}/systemd/network/wlan.network \
|
||||
"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${sysconfdir}/systemd/network
|
||||
install -m 0644 ${WORKDIR}/eth.network ${D}${sysconfdir}/systemd/network
|
||||
install -m 0644 ${WORKDIR}/en.network ${D}${sysconfdir}/systemd/network
|
||||
install -m 0644 ${WORKDIR}/wlan.network ${D}${sysconfdir}/systemd/network
|
||||
}
|
@ -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
|
@ -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/flutter-pi --release /flutter/flutter_elinux/3.19.2/release
|
||||
|
||||
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
|
@ -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
|
||||
}
|
@ -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
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
PACKAGECONFIG:append = " networkd resolved"
|
||||
RDEPENDS:${PN}:append = " wpa-supplicant "
|
11
poky/meta-flutter-elinux/recipes-extended/sudo_%.bbappend
Normal file
11
poky/meta-flutter-elinux/recipes-extended/sudo_%.bbappend
Normal file
@ -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}"
|
Loading…
x
Reference in New Issue
Block a user