Skip to content

Commit e0e9e5d

Browse files
committed
ti: Add more packages and make weston the OOB
Default and officially supported TI images will be the console image with emptty (display manager) running weston on top of it. Therefore add weston and emptty in the list of packages to install. Also, for emptty, change the conffile `/etc/pam.d/emptty`. Debian allows editing these files [0]. Further, add an explicit step to bind dkms packages to kernel. Currently the dkms package gets installed before the kernel, therefore if this step is excluded, the binding would occur on first boot, which would cause the first boot time to get longer. Therefore add the "dkms autoinstall" step. Additionally, add firmware, gstreamer, chromium etc packages. [0] https://www.debian.org/doc/manuals/maint-guide/dother.en.html#conffiles Signed-off-by: Suhaas Joshi <[email protected]>
1 parent 996e934 commit e0e9e5d

File tree

7 files changed

+150
-1
lines changed

7 files changed

+150
-1
lines changed

config/boards/sk-am62b.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ ATF_BOARD="lite"
1616
OPTEE_ARGS="CFG_TEE_CORE_LOG_LEVEL=1"
1717
OPTEE_PLATFORM="k3-am62x"
1818
CC33XX_SUPPORT="yes"
19+
GPU_SUPPORT="yes"
20+
SOC_ID="am62"
21+
DISPLAY_SUPPORT="yes"
22+
CHROMIUM_SUPPORT="yes"

config/boards/sk-am64b.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ SERIALCON="ttyS2"
1616
ATF_BOARD="lite"
1717
OPTEE_ARGS=""
1818
OPTEE_PLATFORM="k3-am64x"
19+
SOC_ID="am64"
20+
EXTRA_BOARD_PACKAGES=("firmware-ti-prueth-am64" "firmware-ti-pruhsr-am64" "firmware-ti-prusw-am64")

config/sources/families/k3.conf

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,33 @@ declare -g SPD_OPTEED="SPD=opteed"
2020

2121
declare -g INSTALL_HEADERS="yes"
2222

23-
declare -g TI_PACKAGES=()
23+
declare -g TI_PACKAGES=("k3conf" "vim")
2424
if [[ "${CC33XX_SUPPORT}" == "yes" ]] ; then
2525
if [[ "${RELEASE}" == "trixie" || "${RELEASE}" == "noble" ]] ; then
2626
TI_PACKAGES+=("cc33xx-fw" "cc33xx-target-scripts" "cc33conf" "cc33calibrator")
2727
fi
2828
fi
2929

30+
if [[ "${GPU_SUPPORT}" == "yes" ]] ; then
31+
TI_PACKAGES+=("ti-img-rogue-driver-${SOC_ID}-dkms" "ti-img-rogue-umlibs-${SOC_ID}" "ti-img-rogue-tools-${SOC_ID}" "ti-img-rogue-firmware-${SOC_ID}")
32+
TI_PACKAGES+=("mesa-vulkan-drivers" "libgl1-mesa-dri")
33+
TI_PACKAGES+=("gstreamer1.0-tools" "gstreamer1.0-plugins-good" "gstreamer1.0-plugins-bad" "gstreamer1.0-plugins-base")
34+
fi
35+
36+
if [[ "${DISPLAY_SUPPORT}" == "yes" ]] ; then
37+
TI_PACKAGES+=("weston" "emptty")
38+
fi
39+
40+
if [[ "${CHROMIUM_SUPPORT}" == "yes" ]] ; then
41+
TI_PACKAGES+=("chromium")
42+
fi
43+
44+
TI_PACKAGES+=("firmware-cnm-wave" "firmware-ti-ipc-${SOC_ID}" "firmware-ti-connectivity")
45+
46+
if [[ ! -z ${EXTRA_BOARD_PACKAGES} ]] ; then
47+
TI_PACKAGES+=("${EXTRA_BOARD_PACKAGES[@]}")
48+
fi
49+
3050
enable_extension "ti-debpkgs"
3151

3252
case "${BRANCH}" in

extensions/ti-debpkgs.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,26 @@ function custom_apt_repo__install_ti_packages() {
3535
display_alert "Valid Options Would Have Been: ${valid_suites[@]}"
3636
fi
3737
}
38+
39+
function pre_customize_image__enable_services() {
40+
chroot_sdcard "groupadd nopasswdlogin"
41+
chroot_sdcard "useradd -m -s /bin/bash weston"
42+
chroot_sdcard "usermod -aG video,render,input,nopasswdlogin weston"
43+
44+
run_host_command_logged "mkdir -p $SDCARD/etc/xdg/weston/"
45+
run_host_command_logged "cp -v $SRC/packages/bsp/ti/emptty/weston.ini $SDCARD/etc/xdg/weston/"
46+
run_host_command_logged "mkdir -p $SDCARD/etc/pam.d/"
47+
run_host_command_logged "cp -v $SRC/packages/bsp/ti/emptty/pamconf $SDCARD/etc/pam.d/emptty"
48+
run_host_command_logged "mkdir -p $SDCARD/etc/emptty/"
49+
run_host_command_logged "cp -v $SRC/packages/bsp/ti/emptty/emptty.conf $SDCARD/etc/emptty/conf"
50+
51+
chroot_sdcard "systemctl enable [email protected]" || display_alert "systemctl enable failed for [email protected]"
52+
}
53+
54+
function post_install_kernel_debs__activate_dkms() {
55+
if [[ ${GPU_SUPPORT} == "yes" ]] ; then
56+
kernel_version=$(grab_version "${SRC}/cache/sources/${LINUXSOURCEDIR}")
57+
kernel_version_family="${kernel_version}-${BRANCH}-${LINUXFAMILY}"
58+
chroot_sdcard "dkms autoinstall --verbose --kernelver ${kernel_version_family}"
59+
fi
60+
}

packages/bsp/ti/emptty/emptty.conf

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# TTY, where emptty will start.
2+
TTY_NUMBER=7
3+
4+
# Enables switching to defined TTY number.
5+
SWITCH_TTY=true
6+
7+
# Enables printing of /etc/issue in daemon mode.
8+
PRINT_ISSUE=true
9+
10+
# Enables printing of default motd, /etc/emptty/motd or /etc/emptty/motd-gen.sh.
11+
PRINT_MOTD=true
12+
13+
# Preselected user, if AUTOLOGIN is enabled, this user is logged in.
14+
DEFAULT_USER=weston
15+
16+
# Enables Autologin, if DEFAULT_USER is defined and part of nopasswdlogin group. Possible values are "true" or "false".
17+
AUTOLOGIN=true
18+
19+
# The default session used, if Autologin is enabled. If session is not found in list of session, it proceeds to manual selection.
20+
AUTOLOGIN_SESSION=Weston
21+
22+
# If Autologin is enabled and session does not start correctly, the number of retries in short period is kept to eventually stop the infinite loop of restarts. -1 is for infinite retries, 0 is for no retry.
23+
AUTOLOGIN_MAX_RETRY=-1
24+
25+
# Default LANG, if user does not have set own in init script.
26+
#LANG=en_US.UTF-8
27+
28+
# Starts desktop with calling "dbus-launch".
29+
DBUS_LAUNCH=true
30+
31+
# Starts Xorg desktop with calling "~/.xinitrc" script, if is true, file exists and selected WM/DE is Xorg session, it overrides DBUS_LAUNCH.
32+
XINITRC_LAUNCH=false
33+
34+
# Prints available WM/DE each on new line instead of printing on single line.
35+
VERTICAL_SELECTION=false
36+
37+
# Defines the way, how is logging handled. Possible values are "rotate", "appending" or "disabled".
38+
#LOGGING=rotate
39+
40+
# Overrides path of log file
41+
#LOGGING_FILE=/var/log/emptty/[TTY_NUMBER].log
42+
43+
# Arguments passed to Xorg server.
44+
#XORG_ARGS=
45+
46+
# Allows to use dynamic motd script to generate custom MOTD.
47+
#DYNAMIC_MOTD=false
48+
49+
# Allows to override default path to dynamic motd.
50+
#DYNAMIC_MOTD_PATH=/etc/emptty/motd-gen.sh
51+
52+
# Allows to override default path to static motd.
53+
#MOTD_PATH=/etc/emptty/motd
54+
55+
# Foreground color, available only in daemon mode.
56+
#FG_COLOR=LIGHT_BLACK
57+
58+
# Background color, available only in daemon mode.
59+
#BG_COLOR=BLACK
60+
61+
# Enables numlock in daemon mode. Possible values are "true" or "false".
62+
#ENABLE_NUMLOCK=false
63+
64+
# Defines the way, how is logging of session errors handled. Possible values are "rotate", "appending" or "disabled".
65+
SESSION_ERROR_LOGGING=rotate
66+
67+
# Overrides path of session errors log file
68+
#SESSION_ERROR_LOGGING_FILE=/var/log/emptty/session-errors.[TTY_NUMBER].log
69+
70+
# If set true, it will not use `.emptty-xauth` file, but the standard `~/.Xauthority` file. This allows to handle xauth issues.
71+
#DEFAULT_XAUTHORITY=false
72+
73+
#If set true, Xorg will be started as rootless, if system allows and emptty is running in daemon mode.
74+
#ROOTLESS_XORG=false
75+
76+
#If set true, environmental groups are printed to differ Xorg/Wayland/Custom/UserCustom desktops.
77+
IDENTIFY_ENVS=false

packages/bsp/ti/emptty/pamconf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#%PAM-1.0
2+
auth sufficient pam_succeed_if.so user ingroup nopasswdlogin
3+
auth include common-auth
4+
-auth optional pam_gnome_keyring.so
5+
-auth optional pam_kwallet5.so
6+
account include common-account
7+
session include common-session
8+
-session optional pam_gnome_keyring.so auto_start
9+
-session optional pam_kwallet5.so auto_start force_run
10+
password include common-password

packages/bsp/ti/emptty/weston.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[core]
2+
idle-time=0
3+
require-input=false
4+
require-outputs=none
5+
6+
[shell]
7+
locking=false
8+
animation=zoom
9+
panel-position=top
10+
startup-animation=fade
11+
12+
[libinput]
13+
touchscreen_calibrator=true

0 commit comments

Comments
 (0)