Compare commits
16 Commits
a4637ec44b
...
scarthgap
Author | SHA1 | Date | |
---|---|---|---|
958a5aa658 | |||
797a54d2d9 | |||
ae474d490f | |||
be8b6c5cf0 | |||
ae13e50979 | |||
e8677f7618 | |||
2fc68b049d | |||
aa120fd4f6 | |||
5c2c49c639 | |||
1b87e10297 | |||
70caa69660 | |||
7b75b29500 | |||
8791a5d86d | |||
b333742f9f | |||
4ec5c71110 | |||
e7fbad271f |
@ -20,11 +20,14 @@ INITRAMFS_MAXSIZE="200000"
|
|||||||
INHERIT += "rm_work"
|
INHERIT += "rm_work"
|
||||||
|
|
||||||
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs "
|
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs "
|
||||||
# ssh-server-dropbear
|
DISTRO_FEATURES:append := " opengl pam "
|
||||||
DISTRO_FEATURES:append := " opengl "
|
DISTRO_FEATURES:remove = " x11 vulkan ptest "
|
||||||
DISTRO_FEATURES:remove = " x11 vulkan ptest"
|
|
||||||
TOOLCHAIN_TARGET_TASK:append = " libgles3-mesa-dev "
|
TOOLCHAIN_TARGET_TASK:append = " libgles3-mesa-dev "
|
||||||
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
|
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
|
||||||
|
|
||||||
WKS_FILE="image.wks.in"
|
WKS_FILE="image.wks.in"
|
||||||
ROOT_HOME = "/root"
|
ROOT_HOME = "/run/root"
|
||||||
|
|
||||||
|
PREFERRED_PROVIDER_virtual/kernel:qemux86-64 = "linux-yocto"
|
||||||
|
EXTRA_IMAGE_FEATURES:qemux86-64 = " ssh-server-dropbear "
|
||||||
|
# DISTRO_FEATURES:append:qemux86-64 = " vulkan "
|
@ -5,15 +5,17 @@ do_install:append () {
|
|||||||
export GDK_BACKEND=wayland
|
export GDK_BACKEND=wayland
|
||||||
export XDG_RUNTIME_DIR=/home/$USER/.xdg
|
export XDG_RUNTIME_DIR=/home/$USER/.xdg
|
||||||
export XDG_CONFIG_HOME=/home/$USER/.config
|
export XDG_CONFIG_HOME=/home/$USER/.config
|
||||||
|
export XDG_CACHE_HOME=/home/$USER/.cache
|
||||||
export PATH=$PATH:/home/$USER/bin:/home/$USER/.local/bin
|
export PATH=$PATH:/home/$USER/bin:/home/$USER/.local/bin
|
||||||
export LD_LIBRARY_PATH=/home/$USER/lib:/home/$USER/.local/lib
|
export LD_LIBRARY_PATH=/home/$USER/lib:/home/$USER/.local/lib
|
||||||
|
export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
|
||||||
if [ ! -e "$XDG_RUNTIME_DIR" ]; then
|
if [ ! -e "$XDG_RUNTIME_DIR" ]; then
|
||||||
mkdir -p "$XDG_RUNTIME_DIR"
|
mkdir -p "$XDG_RUNTIME_DIR"
|
||||||
fi
|
fi
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
#if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||||
eval $(dbus-launch --auto-syntax)
|
# eval $(dbus-launch --auto-syntax)
|
||||||
fi
|
#fi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat << EOF >> "${D}${sysconfdir}/profile"
|
cat << EOF >> "${D}${sysconfdir}/profile"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
inherit extrausers
|
inherit extrausers
|
||||||
|
|
||||||
EXTRA_USERS_PARAMS = "usermod -p 2Pe/4xyFxsokE diya; \
|
EXTRA_USERS_PARAMS = "usermod -d /home/diya -p 2Pe/4xyFxsokE diya; \
|
||||||
usermod -a -G video diya; \
|
usermod -a -G video diya; \
|
||||||
usermod -a -G tty diya; \
|
usermod -a -G tty diya; \
|
||||||
usermod -a -G input diya; \
|
usermod -a -G input diya; \
|
||||||
@ -8,7 +8,7 @@ EXTRA_USERS_PARAMS = "usermod -p 2Pe/4xyFxsokE diya; \
|
|||||||
usermod -a -G audio diya; \
|
usermod -a -G audio diya; \
|
||||||
usermod -a -G sudo diya; \
|
usermod -a -G sudo diya; \
|
||||||
"
|
"
|
||||||
IMAGE_BOOT_FILES:append = "fs_resize config.txt recovery-${MACHINE}.cpio.gz Image "
|
IMAGE_BOOT_FILES:append = " fs_resize diya-config.txt recovery-${MACHINE}.cpio.gz Image "
|
||||||
|
|
||||||
IMAGE_INSTALL:append = "kernel-modules \
|
IMAGE_INSTALL:append = "kernel-modules \
|
||||||
e2fsprogs \
|
e2fsprogs \
|
||||||
@ -20,6 +20,7 @@ IMAGE_INSTALL:append = "kernel-modules \
|
|||||||
libglapi \
|
libglapi \
|
||||||
libudev \
|
libudev \
|
||||||
libinput \
|
libinput \
|
||||||
|
libpam \
|
||||||
diya-overlay \
|
diya-overlay \
|
||||||
seatd \
|
seatd \
|
||||||
libxkbcommon \
|
libxkbcommon \
|
||||||
|
@ -2,7 +2,13 @@ DISTRO_FEATURES:append = " wayland "
|
|||||||
|
|
||||||
require base-image.inc
|
require base-image.inc
|
||||||
|
|
||||||
EXTRA_USERS_PARAMS:append = "usermod -a -G avahi diya"
|
EXTRA_USERS_PARAMS:append = "useradd xdg; \
|
||||||
|
usermod -d /run/xdg xdg; \
|
||||||
|
usermod -a -G video xdg; \
|
||||||
|
usermod -a -G input xdg; \
|
||||||
|
usermod -a -G tty xdg; \
|
||||||
|
usermod -a -G avahi diya; \
|
||||||
|
usermod -a -G xdg diya;"
|
||||||
IMAGE_INSTALL:append = "pango \
|
IMAGE_INSTALL:append = "pango \
|
||||||
seatd \
|
seatd \
|
||||||
pixman \
|
pixman \
|
||||||
@ -14,14 +20,15 @@ IMAGE_INSTALL:append = "pango \
|
|||||||
gdk-pixbuf \
|
gdk-pixbuf \
|
||||||
gtk4 \
|
gtk4 \
|
||||||
gtk4-layer-shell \
|
gtk4-layer-shell \
|
||||||
|
libadwaita \
|
||||||
gobject-introspection \
|
gobject-introspection \
|
||||||
wayland wayland-protocols \
|
wayland wayland-protocols wlroots \
|
||||||
foot swaybg swayidle swaylock tofi wtype \
|
foot \
|
||||||
mc \
|
mc \
|
||||||
gdbserver gdb \
|
gdbserver gdb \
|
||||||
labwc \
|
|
||||||
wlr-randr \
|
wlr-randr \
|
||||||
|
diya-session-manager \
|
||||||
"
|
"
|
||||||
PACKAGE_EXCLUDE = " gtk+ gtk+3 adwaita-icon-theme "
|
PACKAGE_EXCLUDE = " gtk+ gtk+3 adwaita-icon-theme "
|
||||||
IMAGE_INSTALL:remove = " gtk+ gtk+3 adwaita-icon-theme "
|
IMAGE_INSTALL:remove = " gtk+ gtk+3 adwaita-icon-theme "
|
||||||
# wlr-randr l3afpad wlopm cairo-egl
|
# wlr-randr l3afpad wlopm cairo-egl webkitgtk
|
@ -41,12 +41,6 @@ IMAGE_PREPROCESS_COMMAND += "image_patch;"
|
|||||||
image_patch () {
|
image_patch () {
|
||||||
# delete unused image
|
# delete unused image
|
||||||
rm -rf ${IMAGE_ROOTFS}/boot/*
|
rm -rf ${IMAGE_ROOTFS}/boot/*
|
||||||
# create /etc/fstab
|
|
||||||
cat << EOF > ${IMAGE_ROOTFS}/etc/fstab
|
|
||||||
/dev/mmcblk1p1 /boot auto defaults 0 0
|
|
||||||
/dev/mmcblk1p4 /home auto defaults 0 0
|
|
||||||
|
|
||||||
EOF
|
|
||||||
cat << EOF > ${IMAGE_ROOTFS}/etc/hostname
|
cat << EOF > ${IMAGE_ROOTFS}/etc/hostname
|
||||||
diya-recovery
|
diya-recovery
|
||||||
EOF
|
EOF
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
DESCRIPTION = "Auto configuration deployment from media"
|
DESCRIPTION = "Auto configuration deployment from media"
|
||||||
DEPENDS = ""
|
DEPENDS = ""
|
||||||
|
RDEPENDS:${PN} = "bash"
|
||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||||
|
|
||||||
@ -7,7 +8,9 @@ SRC_URI += "file://confd \
|
|||||||
file://expandfs.sh \
|
file://expandfs.sh \
|
||||||
file://80_diya \
|
file://80_diya \
|
||||||
file://fs_resize \
|
file://fs_resize \
|
||||||
file://boot-to-recovery"
|
file://boot-to-recovery \
|
||||||
|
file://diya.pam \
|
||||||
|
file://xdg-terminal-exec"
|
||||||
|
|
||||||
|
|
||||||
inherit update-rc.d useradd
|
inherit update-rc.d useradd
|
||||||
@ -26,12 +29,15 @@ do_install() {
|
|||||||
install -m 0755 ${WORKDIR}/confd ${D}/${sysconfdir}/init.d/confd
|
install -m 0755 ${WORKDIR}/confd ${D}/${sysconfdir}/init.d/confd
|
||||||
install -d ${D}/sbin/
|
install -d ${D}/sbin/
|
||||||
install -d ${D}/etc/default/volatiles
|
install -d ${D}/etc/default/volatiles
|
||||||
# install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
|
install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
|
||||||
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/sbin/expandfs.sh
|
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/sbin/expandfs.sh
|
||||||
install -m 0755 ${WORKDIR}/boot-to-recovery ${D}/sbin/boot-to-recovery
|
install -m 0755 ${WORKDIR}/boot-to-recovery ${D}/sbin/boot-to-recovery
|
||||||
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
|
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
|
||||||
|
install -d ${D}/etc/pam.d
|
||||||
cat << EOF > ${DEPLOY_DIR_IMAGE}/config.txt
|
install -m 0644 ${WORKDIR}/diya.pam ${D}${sysconfdir}/pam.d/diya
|
||||||
|
install -d ${D}/usr/bin
|
||||||
|
install -m 0755 ${WORKDIR}/xdg-terminal-exec ${D}/usr/bin
|
||||||
|
cat << EOF > ${DEPLOY_DIR_IMAGE}/diya-config.txt
|
||||||
recovery=false
|
recovery=false
|
||||||
recovery_image=recovery-${MACHINE}.cpio.gz
|
recovery_image=recovery-${MACHINE}.cpio.gz
|
||||||
console=both
|
console=both
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
# d root root 0755 /var/etc/upper none
|
d root root 0755 /run/root none
|
||||||
# d root root 0755 /var/etc/work none
|
d xdg xdg 0755 /run/xdg none
|
||||||
# l root root 0644 /etc/dropbear /var/etc/dropbear
|
|
||||||
|
@ -6,16 +6,17 @@ if [[ $(/usr/bin/id -u) -ne 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
. /etc/profile
|
. /etc/profile
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
if [ ! -e /boot/config.txt ]; then
|
if [ ! -e /boot/diya-config.txt ]; then
|
||||||
# prepare env for recovery boot
|
# prepare env for recovery boot
|
||||||
cat << EOF > /boot/config.txt
|
cat << EOF > /boot/diya-config.txt
|
||||||
recovery=true
|
recovery=true
|
||||||
recovery_image=recovery-${MACHINE}.cpio.gz
|
recovery_image=recovery-${MACHINE}.cpio.gz
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
sed -i 's/^.*recovery.*/recovery=true/g' /boot/config.txt || \
|
sed -i 's/^.*recovery.*/recovery=true/g' /boot/diya-config.txt || \
|
||||||
echo "recovery=true" >> /boot/config.txt
|
echo "recovery=true" >> /boot/diya-config.txt
|
||||||
fi
|
fi
|
||||||
echo "Rebooting to recovery mode"
|
echo "Rebooting to recovery mode"
|
||||||
reboot
|
reboot
|
@ -1,10 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
DESC="Auto deployment configuration from media"
|
DESC="Auto deployment configuration from media"
|
||||||
|
|
||||||
|
. /etc/profile
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
if [ -z "$DISK" ]; then
|
if [ -z "$DISK" ]; then
|
||||||
DISK="mmcblk1"
|
DISK="mmcblk0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@ -26,9 +28,11 @@ case "$1" in
|
|||||||
umount /dev/${DISK}p4
|
umount /dev/${DISK}p4
|
||||||
yes | mkfs.ext4 /dev/${DISK}p4
|
yes | mkfs.ext4 /dev/${DISK}p4
|
||||||
mount /dev/${DISK}p4 /home
|
mount /dev/${DISK}p4 /home
|
||||||
|
rm /boot/home_partition_should_be_formated
|
||||||
|
fi
|
||||||
|
if [ ! -d "/home/diya" ]; then
|
||||||
mkdir -p /home/diya
|
mkdir -p /home/diya
|
||||||
chown -R diya:diya /home/diya
|
chown -R diya:diya /home/diya
|
||||||
rm /boot/home_partition_should_be_formated
|
|
||||||
fi
|
fi
|
||||||
if [ -e "/boot/wpa_supplicant.conf" ];then
|
if [ -e "/boot/wpa_supplicant.conf" ];then
|
||||||
mv /boot/wpa_supplicant.conf /etc/network/
|
mv /boot/wpa_supplicant.conf /etc/network/
|
||||||
|
5
recipes-diya/diya-overlay/files/diya.pam
Normal file
5
recipes-diya/diya-overlay/files/diya.pam
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#%PAM-1.0
|
||||||
|
|
||||||
|
auth include common-auth
|
||||||
|
account include common-account
|
||||||
|
session include common-session
|
@ -1,7 +1,9 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
. /etc/profile
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
if [ -z "$DISK" ]; then
|
if [ -z "$DISK" ]; then
|
||||||
DISK="mmcblk1"
|
DISK="mmcblk0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(/usr/bin/id -u)" -ne 0 ]; then
|
if [ "$(/usr/bin/id -u)" -ne 0 ]; then
|
||||||
|
2
recipes-diya/diya-overlay/files/xdg-terminal-exec
Normal file
2
recipes-diya/diya-overlay/files/xdg-terminal-exec
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
foot "$@"
|
@ -0,0 +1,40 @@
|
|||||||
|
DESCRIPTION = "Diya session manager"
|
||||||
|
DEPENDS = "glib-2.0"
|
||||||
|
LICENSE = "MIT"
|
||||||
|
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||||
|
|
||||||
|
SRC_URI += "git://git.iohub.dev/dany/diya-session-manager.git;protocol=https;branch=master \
|
||||||
|
file://daemon.conf \
|
||||||
|
file://dbus-diya.conf \
|
||||||
|
file://diya-session-launch \
|
||||||
|
file://diya-sessiond"
|
||||||
|
|
||||||
|
SRCREV = "${AUTOREV}"
|
||||||
|
PV = "0.1.1+git${SRCPV}"
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
inherit meson pkgconfig
|
||||||
|
|
||||||
|
# inherit update-rc.d
|
||||||
|
# INITSCRIPT_NAME = "diya-sessiond"
|
||||||
|
# INITSCRIPT_PARAMS = "start 30 5 . stop 10 0 1 6 ."
|
||||||
|
|
||||||
|
|
||||||
|
do_install:append() {
|
||||||
|
install -d ${D}/etc/diya
|
||||||
|
install -d ${D}/usr/bin
|
||||||
|
install -d ${D}/etc/dbus-1
|
||||||
|
install -d ${D}/etc/dbus-1/system.d
|
||||||
|
install -d ${D}/etc/init.d
|
||||||
|
install -m 0755 ${WORKDIR}/build/diya-session-manager ${D}/usr/bin/
|
||||||
|
install -m 0755 ${WORKDIR}/diya-sessiond ${D}/etc/init.d/
|
||||||
|
install -m 0755 ${WORKDIR}/diya-session-launch ${D}/usr/bin/
|
||||||
|
install -m 0644 ${WORKDIR}/daemon.conf ${D}/etc/diya/
|
||||||
|
install -m 0644 ${WORKDIR}/dbus-diya.conf ${D}/etc/dbus-1/system.d/
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES:${PN} = "/etc/diya \
|
||||||
|
/etc/dbus-1/system.d/dbus-diya.conf \
|
||||||
|
/usr/bin/diya-session-manager \
|
||||||
|
/usr/bin/diya-session-launch \
|
||||||
|
/etc/init.d/diya-sessiond"
|
27
recipes-diya/diya-session-manager/files/daemon.conf
Normal file
27
recipes-diya/diya-session-manager/files/daemon.conf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# this file is the configuration file for the SessionMaganer daemon
|
||||||
|
# daemon
|
||||||
|
# By default, the daemon will look for this file in the following locations
|
||||||
|
# /etc/diya/daemon.conf
|
||||||
|
# or it can be specified using the -c option
|
||||||
|
# example: diya-session-manager -c /path/to/daemon.conf
|
||||||
|
|
||||||
|
# Login session command
|
||||||
|
# The command to run to start a login session
|
||||||
|
# this command will handle the user input and send user
|
||||||
|
# credentials to the daemon via Dbus message
|
||||||
|
login_session_command = diya-session-launch diyac -x diya-login-shell
|
||||||
|
|
||||||
|
# login session user
|
||||||
|
# The user that owns the login session, root by default
|
||||||
|
# if this setting is not set
|
||||||
|
login_session_user = xdg
|
||||||
|
|
||||||
|
# User session command
|
||||||
|
# The command to run to start a user session after the
|
||||||
|
# login session is successful
|
||||||
|
# the logged in user will own this session
|
||||||
|
|
||||||
|
user_session_command = diya-session-launch diyac -x diya-shell
|
||||||
|
|
||||||
|
# PAM service used by the daemon for authentication
|
||||||
|
pam_service = diya
|
27
recipes-diya/diya-session-manager/files/dbus-diya.conf
Normal file
27
recipes-diya/diya-session-manager/files/dbus-diya.conf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<!DOCTYPE busconfig PUBLIC
|
||||||
|
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||||
|
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||||
|
<busconfig>
|
||||||
|
|
||||||
|
<!-- Only root can own the service -->
|
||||||
|
<policy user="root">
|
||||||
|
<allow own="dev.iohub.diya.SessionManager"/>
|
||||||
|
</policy>
|
||||||
|
|
||||||
|
<!--deny all access from another user-->
|
||||||
|
<policy context="default">
|
||||||
|
<deny send_destination="dev.iohub.diya.SessionManager"/>
|
||||||
|
<deny receive_sender="dev.iohub.diya.SessionManager"/>
|
||||||
|
</policy>
|
||||||
|
|
||||||
|
<policy user="xdg">
|
||||||
|
<allow send_destination="dev.iohub.diya.SessionManager"/>
|
||||||
|
<allow receive_sender="dev.iohub.diya.SessionManager"/>
|
||||||
|
</policy>
|
||||||
|
|
||||||
|
<policy user="root">
|
||||||
|
<allow send_destination="dev.iohub.diya.SessionManager"/>
|
||||||
|
<allow receive_sender="dev.iohub.diya.SessionManager"/>
|
||||||
|
</policy>
|
||||||
|
|
||||||
|
</busconfig>
|
26
recipes-diya/diya-session-manager/files/diya-session-launch
Executable file
26
recipes-diya/diya-session-manager/files/diya-session-launch
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
handle()
|
||||||
|
{
|
||||||
|
echo "SIGINT detected. continue."
|
||||||
|
}
|
||||||
|
|
||||||
|
# start dbus session and get env:
|
||||||
|
#
|
||||||
|
# DBUS_SESSION_BUS_ADDRESS='unix:path=/tmp/dbus-...
|
||||||
|
# export DBUS_SESSION_BUS_ADDRESS;
|
||||||
|
# DBUS_SESSION_BUS_PID=3598;
|
||||||
|
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
eval "$(dbus-launch --auto-syntax)"
|
||||||
|
|
||||||
|
# trap the sigint
|
||||||
|
trap 'handle' INT
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# stop the
|
||||||
|
kill -9 "$DBUS_SESSION_BUS_PID"
|
||||||
|
echo "Session closed"
|
78
recipes-diya/diya-session-manager/files/diya-sessiond
Normal file
78
recipes-diya/diya-session-manager/files/diya-sessiond
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: diya
|
||||||
|
# Short-Description: simple session manager
|
||||||
|
# Description: session manager that allows user login and
|
||||||
|
# start user session
|
||||||
|
### END INIT INFO
|
||||||
|
#
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# set -e
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. /etc/init.d/functions
|
||||||
|
|
||||||
|
DAEMON=/usr/bin/diya-session-manager
|
||||||
|
NAME=diya-sessiond
|
||||||
|
PIDFILE=/var/run/diya/sessiond.pid
|
||||||
|
DESC="Diya session manager"
|
||||||
|
DAEMONUSER="root"
|
||||||
|
PARAMS="-c /etc/diya/daemon.conf"
|
||||||
|
test -x $DAEMON || exit 0
|
||||||
|
|
||||||
|
start_it_up()
|
||||||
|
{
|
||||||
|
mkdir -p "$(dirname $PIDFILE)"
|
||||||
|
if [ -e $PIDFILE ]; then
|
||||||
|
PIDDIR=/proc/$(cat $PIDFILE)
|
||||||
|
if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
|
||||||
|
echo "$DESC already started; not starting."
|
||||||
|
else
|
||||||
|
echo "Removing stale PID file $PIDFILE."
|
||||||
|
rm -f $PIDFILE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Starting $DESC: "
|
||||||
|
start-stop-daemon -o --start --quiet --pidfile $PIDFILE \
|
||||||
|
--user $DAEMONUSER --exec $DAEMON -- $PARAMS
|
||||||
|
echo "$NAME."
|
||||||
|
}
|
||||||
|
|
||||||
|
shut_it_down()
|
||||||
|
{
|
||||||
|
echo -n "Stopping $DESC: "
|
||||||
|
start-stop-daemon -o --stop --quiet --pidfile $PIDFILE \
|
||||||
|
--user $DAEMONUSER
|
||||||
|
# We no longer include these arguments so that start-stop-daemon
|
||||||
|
# can do its job even given that we may have been upgraded.
|
||||||
|
# We rely on the pidfile being sanely managed
|
||||||
|
# --exec $DAEMON -- --system $PARAMS
|
||||||
|
echo "$NAME."
|
||||||
|
rm -f $PIDFILE
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start_it_up
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
shut_it_down
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status $DAEMON
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
shut_it_down
|
||||||
|
sleep 1
|
||||||
|
start_it_up
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: /etc/init.d/$NAME {start|stop|status|restart}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
@ -1,14 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
DESC="Custom configuration"
|
DESC="Custom configuration"
|
||||||
. /etc/profile
|
. /etc/profile
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Start $DESC: "
|
echo -n "Start $DESC: "
|
||||||
sed -i 's/^.*recovery.*/recovery=false/g' /boot/config.txt || \
|
sed -i 's/^.*recovery.*/recovery=false/g' /boot/diya-config.txt || \
|
||||||
echo "recovery=false" >> /boot/config.txt
|
echo "recovery=false" >> /boot/diya-config.txt
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
@ -1,16 +1,20 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
. /etc/profile
|
. /etc/profile
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
|
if [ -z "$DISK" ]; then
|
||||||
|
DISK="mmcblk0"
|
||||||
|
fi
|
||||||
|
|
||||||
DEFAULT_ROOTFS_NAME="rootfs-$MACHINE.tar.bz2"
|
DEFAULT_ROOTFS_NAME="rootfs-$MACHINE.tar.bz2"
|
||||||
DEFAULT_KERNEL_NAME="Image-$MACHINE.bin"
|
DEFAULT_KERNEL_NAME="Image-$MACHINE.bin"
|
||||||
DEFAULT_INITRAMFS_NAME="recovery-$MACHINE.cpio.gz"
|
DEFAULT_INITRAMFS_NAME="recovery-$MACHINE.cpio.gz"
|
||||||
UPDATE_SRC_PATH="/home/diya/.update"
|
UPDATE_SRC_PATH="/home/diya/.update"
|
||||||
ROOTFS_DEV="/dev/mmcblk1p2"
|
ROOTFS_DEV="/dev/${DISK}p2"
|
||||||
SUPPORTED_COMMAND="rootfs kernel initramfs all"
|
SUPPORTED_COMMAND="rootfs kernel initramfs all"
|
||||||
TMP_MOUNT="/tmp/rootfs"
|
TMP_MOUNT="/tmp/rootfs"
|
||||||
|
|
||||||
|
|
||||||
rootfs()
|
rootfs()
|
||||||
{
|
{
|
||||||
filename=$1
|
filename=$1
|
||||||
@ -54,9 +58,9 @@ rootfs()
|
|||||||
echo "Patch /etc/fstab"
|
echo "Patch /etc/fstab"
|
||||||
cat << EOF >> $TMP_MOUNT/etc/fstab
|
cat << EOF >> $TMP_MOUNT/etc/fstab
|
||||||
|
|
||||||
/dev/mmcblk1p1 /boot vfat defaults 0 0
|
/dev/${DISK}p1 /boot vfat defaults 0 0
|
||||||
/dev/mmcblk1p3 /var/etc ext4 defaults 0 0
|
/dev/${DISK}p3 /var/etc ext4 defaults 0 0
|
||||||
/dev/mmcblk1p4 /home ext4 defaults 0 0
|
/dev/${DISK}p4 /home ext4 defaults 0 0
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
sync
|
sync
|
||||||
|
1
recipes-graphics/mesa/mesa-gl_%.bbappend
Normal file
1
recipes-graphics/mesa/mesa-gl_%.bbappend
Normal file
@ -0,0 +1 @@
|
|||||||
|
PACKAGECONFIG:class-target = "opengl gallium"
|
4
recipes-graphics/mesa/mesa_%.bbappend
Normal file
4
recipes-graphics/mesa/mesa_%.bbappend
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Enable KMS renderonly Mesa support
|
||||||
|
# See https://cgit.freedesktop.org/mesa/mesa/commit/?id=2b780fe89300199f2334539aa1678e9b68f0434f
|
||||||
|
GALLIUMDRIVERS:append = ",kmsro"
|
||||||
|
GALLIUMDRIVERS:append:qemux86-64 = ",virgl"
|
@ -1,4 +1,4 @@
|
|||||||
PV = "1.1.0"
|
PV = "1.1.1"
|
||||||
SRCREV = "v1.1.0"
|
SRCREV = "v1.1.1"
|
||||||
|
|
||||||
INSANE_SKIP:${PN}-dev += "dev-elf"
|
INSANE_SKIP:${PN}-dev += "dev-elf"
|
1
recipes-sato/webkit/webkitgtk_%.bbapend
Normal file
1
recipes-sato/webkit/webkitgtk_%.bbapend
Normal file
@ -0,0 +1 @@
|
|||||||
|
PACKAGECONFIG:remove = "x11 systemd"
|
@ -1,12 +0,0 @@
|
|||||||
# short-description: Create Raspberry Pi SD card image
|
|
||||||
# long-description: Creates a partitioned SD card image for use with
|
|
||||||
|
|
||||||
part u-boot --source rawcopy --sourceparams="file=${SPL_BINARY}" --ondisk mmcblk1 --no-table --align 8
|
|
||||||
part /boot --source bootimg-partition --ondisk mmcblk1 --fstype=vfat --label boot --active --align 4096 --size 32
|
|
||||||
# read only roofs
|
|
||||||
part / --source rootfs --ondisk mmcblk1 --fstype=ext4 --label root --align 4096 --size 150 --exclude-path home/ --exclude-path var/etc/ --exclude-path boot/
|
|
||||||
# modifiable configurations stored in /var/etc
|
|
||||||
part /var/etc --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var/etc --ondisk mmcblk1 --fstype=ext4 --label diya --align 1024 --size 32
|
|
||||||
# home partition
|
|
||||||
part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk mmcblk1 --fstype=ext4 --label home --align 1024 --size 16
|
|
||||||
# part /home --ondisk mmcblk1 --fstype=vfat --label music --active --align 1024 --size 16
|
|
Reference in New Issue
Block a user