Add weston 11 for S922X, drop libmali-vulkan back to v40.

This commit is contained in:
fewtarius 2023-08-25 15:35:08 +00:00
parent c908f16fb2
commit c4f9d501a6
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
9 changed files with 255 additions and 2 deletions

View file

@ -2,7 +2,7 @@
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
PKG_NAME="libmali-vulkan"
PKG_VERSION="r44p0-01eac0"
PKG_VERSION="r40p0-01eac0"
PKG_LICENSE="mali_driver"
PKG_ARCH="arm aarch64"
PKG_SITE="https://developer.arm.com/downloads/-/mali-drivers/user-space"

View file

@ -48,7 +48,17 @@ else
[ "${PIPEWIRE_SUPPORT}" = "yes" ] && PKG_DEPENDS_TARGET+=" alsa pulseaudio pipewire wireplumber"
fi
[ "${DISPLAYSERVER}" = "wl" ] && PKG_DEPENDS_TARGET+=" weston"
if [ "${DISPLAYSERVER}" = "wl" ]
then
case ${DEVICE} in
S922X)
PKG_DEPENDS_TARGET+=" weston11"
;;
*)
PKG_DEPENDS_TARGET+=" weston"
;;
esac
fi
# Device is an emulation focused device
[ "${EMULATION_DEVICE}" = "yes" ] && PKG_DEPENDS_TARGET+=" emulators gamesupport"

View file

@ -0,0 +1,22 @@
[core]
idle-time=0
backend=/usr/lib/libweston-10/drm-backend.so
shell=kiosk-shell.so
xwayland=true
[xwayland]
path=/usr/bin/Xwayland
[terminal]
font-size=@WESTONFONTSIZE@
[shell]
background-image=/usr/config/splash/splash.png
background-type=scale-crop
background-color=0x00000000
clock-format=minutes-24h
locking=false
[autolaunch]
path=@STARTUP@
watch=true

View file

@ -0,0 +1,21 @@
[core]
idle-time=0
backend=/usr/lib/libweston-10/drm-backend.so
xwayland=true
[xwayland]
path=/usr/bin/Xwayland
[terminal]
font-size=@WESTONFONTSIZE@
[shell]
background-image=/usr/config/splash/splash.png
background-type=scale-crop
background-color=0x00000000
clock-format=minutes-24h
locking=false
[launcher]
path=/usr/bin/weston-terminal
icon=/usr/share/weston/terminal.png

View file

@ -0,0 +1,79 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="weston11"
PKG_VERSION="11.0.3"
PKG_LICENSE="MIT"
PKG_SITE="https://wayland.freedesktop.org/"
PKG_URL="https://gitlab.freedesktop.org/wayland/weston/-/archive/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain wayland wayland-protocols libdrm libxkbcommon libinput cairo pango libjpeg-turbo dbus seatd glu ${OPENGL} libX11 xorg-server libXcursor xkbcomp setxkbmap cairo xterm splash"
PKG_LONGDESC="Reference implementation of a Wayland compositor"
PKG_MESON_OPTS_TARGET="-Dbackend-drm=true \
-Dbackend-drm-screencast-vaapi=false \
-Dbackend-headless=false \
-Dbackend-rdp=false \
-Dscreenshare=false \
-Dbackend-wayland=true \
-Dbackend-x11=false \
-Ddeprecated-backend-fbdev=false \
-Dbackend-default=drm \
-Drenderer-gl=true \
-Ddeprecated-weston-launch=false \
-Dxwayland=true \
-Dsystemd=true \
-Dremoting=false \
-Dpipewire=false \
-Dshell-desktop=true \
-Dshell-fullscreen=true \
-Dshell-ivi=false \
-Dshell-kiosk=true \
-Ddesktop-shell-client-default="weston-desktop-shell" \
-Ddeprecated-wl-shell=false \
-Dcolor-management-lcms=false \
-Dcolor-management-colord=false \
-Dlauncher-logind=false \
-Dlauncher-libseat=true \
-Dimage-jpeg=true \
-Dimage-webp=false \
-Dtools=['terminal']
-Ddemo-clients=false \
-Dsimple-clients=[] \
-Dresize-pool=false \
-Dwcap-decode=true \
-Dtest-junit-xml=false \
-Dtest-skip-is-failure=false \
-Dtest-gl-renderer=false \
-Ddoc=false"
pre_configure_target() {
# weston does not build with NDEBUG (requires assert for tests)
export TARGET_CFLAGS=$(echo ${TARGET_CFLAGS} | sed -e "s|-DNDEBUG||g")
}
post_makeinstall_target() {
mkdir -p ${INSTALL}/usr/lib/weston
cp ${PKG_DIR}/scripts/weston-config ${INSTALL}/usr/lib/weston
mkdir -p ${INSTALL}/usr/share/weston
cp ${PKG_DIR}/config/*ini ${INSTALL}/usr/share/weston
safe_remove ${INSTALL}/usr/share/wayland-sessions
for configfile in weston.ini kiosk.ini
do
sed -i -e "s|@WESTONFONTSIZE@|${WESTONFONTSIZE}|g" ${INSTALL}/usr/share/weston/${configfile}
done
if [ "${EMULATION_DEVICE}" = "yes" ] && \
[ ! "${BASE_ONLY}" == true ]
then
cat <<EOF >>${INSTALL}/usr/share/weston/weston.ini
[launcher]
path=/usr/bin/start_es.sh
icon=/usr/config/emulationstation/resources/window_icon_24.png
EOF
fi
}

View file

@ -0,0 +1,79 @@
diff -rupN weston-10.0.3.orig/clients/terminal.c weston-10.0.3/clients/terminal.c
--- weston-10.0.3.orig/clients/terminal.c 2023-04-22 14:24:55.619280680 +0000
+++ weston-10.0.3/clients/terminal.c 2023-04-22 16:10:53.929276891 +0000
@@ -56,6 +56,8 @@ static char *option_font;
static int option_font_size;
static char *option_term;
static char *option_shell;
+static char *option_cwd;
+static char *option_command;
static struct wl_list terminal_list;
@@ -3089,7 +3091,13 @@ terminal_run(struct terminal *terminal,
close(pipes[0]);
setenv("TERM", option_term, 1);
setenv("COLORTERM", option_term, 1);
- if (execl(path, path, NULL)) {
+ if (option_command) {
+ if (execl(path, path, "-c", option_command, NULL)) {
+ fprintf(stderr, "command '%s' couldn't executed: %m",
+ option_command);
+ }
+ }
+ if (execl(path, path, "-l")) {
printf("exec failed: %s\n", strerror(errno));
exit(EXIT_FAILURE);
}
@@ -3123,6 +3131,8 @@ static const struct weston_option termin
{ WESTON_OPTION_STRING, "font", 0, &option_font },
{ WESTON_OPTION_INTEGER, "font-size", 0, &option_font_size },
{ WESTON_OPTION_STRING, "shell", 0, &option_shell },
+ { WESTON_OPTION_STRING, "cwd", 0, &option_cwd },
+ { WESTON_OPTION_STRING, "command", 0, &option_command },
};
int main(int argc, char *argv[])
@@ -3140,14 +3150,15 @@ int main(int argc, char *argv[])
option_shell = getenv("SHELL");
if (!option_shell)
- option_shell = "/bin/sh";
+ option_shell = "/bin/bash";
config_file = weston_config_get_name_from_env();
config = weston_config_parse(config_file);
s = weston_config_get_section(config, "terminal", NULL, NULL);
weston_config_section_get_string(s, "font", &option_font, "monospace");
- weston_config_section_get_int(s, "font-size", &option_font_size, 14);
+ weston_config_section_get_int(s, "font-size", &option_font_size, 16);
weston_config_section_get_string(s, "term", &option_term, "xterm");
+ weston_config_section_get_string(s, "command", &option_command, NULL);
weston_config_destroy(config);
if (parse_options(terminal_options,
@@ -3157,7 +3168,9 @@ int main(int argc, char *argv[])
" --maximized or -m\n"
" --font=NAME\n"
" --font-size=SIZE\n"
- " --shell=NAME\n", argv[0]);
+ " --shell=NAME\n"
+ " --cwd=PATH\n"
+ " --command=CMDLINE\n", argv[0]);
return 1;
}
@@ -3178,6 +3191,13 @@ int main(int argc, char *argv[])
wl_list_init(&terminal_list);
terminal = terminal_create(d);
+
+ if (option_cwd) {
+ if(chdir(option_cwd) == -1)
+ fprintf(stderr, "failed to changing directory as %s: %m\n",
+ option_cwd);
+ }
+
if (terminal_run(terminal, option_shell))
exit(EXIT_FAILURE);

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
export SDL_AUDIODRIVER=alsa
export SDL_VIDEODRIVER=wayland
export WAYLAND_DISPLAY=wayland-1
export XKB_CONFIG_ROOT=/usr/share/X11/xkb
export XDG_RUNTIME_DIR=/var/run/0-runtime-dir

View file

@ -0,0 +1,15 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
export XDG_RUNTIME_DIR=/var/run/0-runtime-dir
if [ ! -d "$XDG_RUNTIME_DIR" ]; then
mkdir "$XDG_RUNTIME_DIR"
chmod 0700 "$XDG_RUNTIME_DIR"
fi
if [ ! -f /storage/.config/weston.ini ]; then
cp /usr/share/weston/kiosk.ini /storage/.config/weston.ini
fi

View file

@ -0,0 +1,19 @@
[Unit]
Description=Weston Launcher
Before=graphical.target
After=multi-user.target
ConditionKernelCommandLine=!installer
[Service]
Environment=HOME=/storage
Environment=LANG=C
Environment=XDG_RUNTIME_DIR=/var/run/0-runtime-dir
WorkingDirectory=/storage
ExecStartPre=-/usr/lib/weston/weston-config
ExecStart=/usr/bin/weston --tty=7 --log=/var/log/weston.log
Restart=always
RestartSec=2
[Install]
Alias=display-manager.service
WantedBy=graphical.target