diff options
| author | unitexe <unitexe70@gmail.com> | 2026-02-06 09:09:11 -0600 |
|---|---|---|
| committer | unitexe <unitexe70@gmail.com> | 2026-02-07 21:39:05 -0600 |
| commit | e9ef477e623a397c3cae8e1e2d676046069cbb01 (patch) | |
| tree | af57d5d245aa30e38013a05d50ddd1302f3ccd2f /meta-unit-graphics/recipes-users | |
| parent | 5c293149dbbf6e304a6934945cd602c43ab58c9e (diff) | |
Boot to flutter app using ivi-homescreen embedder
- Introduce meta-unit-graphics layer
- Flutter app is run under the kiosk user
- Added weston.ini specific to raspberrypi3-64 LCD screen
- Move linger class to meta-unit-users layer so it can be used by meta-unit-graphics and meta-unit-core
- Update svc and unitexe user UIDs so they dont clash with the weston user
Diffstat (limited to 'meta-unit-graphics/recipes-users')
| -rw-r--r-- | meta-unit-graphics/recipes-users/useradd/add-user-kiosk.bb | 38 | ||||
| -rw-r--r-- | meta-unit-graphics/recipes-users/useradd/add-user-kiosk/.profile | 3 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-unit-graphics/recipes-users/useradd/add-user-kiosk.bb b/meta-unit-graphics/recipes-users/useradd/add-user-kiosk.bb new file mode 100644 index 0000000..b18f9ce --- /dev/null +++ b/meta-unit-graphics/recipes-users/useradd/add-user-kiosk.bb @@ -0,0 +1,38 @@ +SUMMARY = "Add kiosk user" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${UNIT_GRAPHICS_LAYERDIR}/LICENSE;md5=a77c12e0c0e8a14cebb1494195720ccc" + +EXCLUDE_FROM_WORLD = "1" + +inherit useradd +inherit extrausers +inherit enable-linger + +RDEPENDS:${PN}:append = " systemd" +RDEPENDS:${PN}:append = " weston-init" + +SRC_URI = "file://.profile" + +USERADD_PACKAGES = "${PN}" +USER_TO_ADD_NAME ?= "kiosk" +USER_TO_ADD_UID ?= "50557" +USER_TO_ADD_PASSWORD_HASHED ?= "\$6\$oD8hxDdrL3h.n..p\$j2LvVlUqokdmPQGDQLKgy3oA5qg.l7Sy4cV4m6zrMu8A8Yc8WJD8Kn9BgYC.Y5iZiAEbMdpUyiuFCCo7Whvgq0" +COMMA_SEPARATED_LIST_OF_GROUPS_TO_ADD_USER_TO ?= "systemd-journal,video,input,render,seat,wayland" + +USERADD_PARAM:${PN} = "-u ${USER_TO_ADD_UID} -U -d /home/${USER_TO_ADD_NAME} -s ${base_bindir}/sh -G ${COMMA_SEPARATED_LIST_OF_GROUPS_TO_ADD_USER_TO} -p '${USER_TO_ADD_PASSWORD_HASHED}' ${USER_TO_ADD_NAME}" + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" + +S = "${UNPACKDIR}" + +do_install() { + install -D -m 0644 ${S}/.profile ${D}/home/${USER_TO_ADD_NAME}/.profile +} + +# Prior to useradd being performed on the sysroot a couple things must happen: +# 1. Need the systemd recipe to create the systemd-journal group +# 2. Need busybox shell present +# 3. Need the weston-init recipe to create the video,input,render and seat groups +do_prepare_recipe_sysroot[depends] += "systemd:do_populate_sysroot busybox:do_populate_sysroot weston-init:do_populate_sysroot" + +FILES:${PN} = "/home/${USER_TO_ADD_NAME}/.profile" diff --git a/meta-unit-graphics/recipes-users/useradd/add-user-kiosk/.profile b/meta-unit-graphics/recipes-users/useradd/add-user-kiosk/.profile new file mode 100644 index 0000000..8957ce2 --- /dev/null +++ b/meta-unit-graphics/recipes-users/useradd/add-user-kiosk/.profile @@ -0,0 +1,3 @@ +# User is not part of sudo group and therefore doesn't +# have sbin in path, add it for access to common commands. +export PATH="${sbindir}:/sbin:$PATH" |
