meta-digi: update home path to "/root" in our recipes
Due to a change in systemd the default home directory is now "/root". Modify our recipes to match with this change. Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
This commit is contained in:
parent
6a7e9fa9e4
commit
839e0d4ebb
|
|
@ -110,3 +110,8 @@ CCCS_PKGS ?= "cccs-gs-demo dey-examples-cccs"
|
||||||
|
|
||||||
# Default 1k-bloks seek in boot partition.
|
# Default 1k-bloks seek in boot partition.
|
||||||
BOOTLOADER_SEEK_BOOTPART ?= "0"
|
BOOTLOADER_SEEK_BOOTPART ?= "0"
|
||||||
|
|
||||||
|
# Default all platforms to use /root as the home root folder.
|
||||||
|
# This is otherwise forced by systemd because of hard-coded paths
|
||||||
|
# in systemd source code.
|
||||||
|
ROOT_HOME ?= "/root"
|
||||||
|
|
@ -25,7 +25,7 @@ FILES:${PN} += " ${datadir}/weston \
|
||||||
${sysconfdir}/etc/default \
|
${sysconfdir}/etc/default \
|
||||||
${sysconfdir}/etc/profile.d \
|
${sysconfdir}/etc/profile.d \
|
||||||
${sysconfdir}/xdg/weston/weston.ini \
|
${sysconfdir}/xdg/weston/weston.ini \
|
||||||
/home/root \
|
${ROOT_HOME} \
|
||||||
${systemd_user_unitdir} \
|
${systemd_user_unitdir} \
|
||||||
${systemd_system_unitdir} \
|
${systemd_system_unitdir} \
|
||||||
"
|
"
|
||||||
|
|
@ -78,8 +78,8 @@ do_install() {
|
||||||
echo "WESTON_USER=root" > ${D}${sysconfdir}/default/weston
|
echo "WESTON_USER=root" > ${D}${sysconfdir}/default/weston
|
||||||
|
|
||||||
# check GPU
|
# check GPU
|
||||||
install -d ${D}/home/root/
|
install -d ${D}${ROOT_HOME}
|
||||||
install -m 644 ${WORKDIR}/README-CHECK-GPU ${D}/home/root/
|
install -m 644 ${WORKDIR}/README-CHECK-GPU ${D}${ROOT_HOME}
|
||||||
if ! test -f ${D}${base_sbindir}/check-gpu; then
|
if ! test -f ${D}${base_sbindir}/check-gpu; then
|
||||||
install -d ${D}${base_sbindir}
|
install -d ${D}${base_sbindir}
|
||||||
echo '#!/bin/sh' > ${WORKDIR}/check-gpu.empty
|
echo '#!/bin/sh' > ${WORKDIR}/check-gpu.empty
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ ConditionPathExists=/dev/tty0
|
||||||
# Requires systemd-notify.so Weston plugin.
|
# Requires systemd-notify.so Weston plugin.
|
||||||
#Type=notify
|
#Type=notify
|
||||||
EnvironmentFile=-/etc/default/weston
|
EnvironmentFile=-/etc/default/weston
|
||||||
Environment="XDG_RUNTIME_DIR=/home/root"
|
Environment="XDG_RUNTIME_DIR=%h"
|
||||||
Environment="WESTON_USER=root"
|
Environment="WESTON_USER=root"
|
||||||
Environment="WL_EGL_GBM_FENCE=0"
|
Environment="WL_EGL_GBM_FENCE=0"
|
||||||
#ExecStart=/usr/bin/weston-launch -- --modules=systemd-notify.so --log=/tmp/weston.log $OPTARGS
|
#ExecStart=/usr/bin/weston-launch -- --modules=systemd-notify.so --log=/tmp/weston.log $OPTARGS
|
||||||
|
|
@ -46,7 +46,7 @@ User=root
|
||||||
Group=root
|
Group=root
|
||||||
|
|
||||||
# Make sure the working directory is the users home directory
|
# Make sure the working directory is the users home directory
|
||||||
WorkingDirectory=/home/root
|
WorkingDirectory=%h
|
||||||
|
|
||||||
# Set up a full user session for the user, required by Weston.
|
# Set up a full user session for the user, required by Weston.
|
||||||
PAMName=weston-autologin
|
PAMName=weston-autologin
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@ index 35b8bea..68d554b 100644
|
||||||
img = img.resize(size)
|
img = img.resize(size)
|
||||||
img_alpha = img.copy()
|
img_alpha = img.copy()
|
||||||
- img_alpha.save("/home/weston/bitmap.png","PNG")
|
- img_alpha.save("/home/weston/bitmap.png","PNG")
|
||||||
+ img_alpha.save("/home/root/bitmap.png","PNG")
|
+ img_alpha.save(os.path.join(os.path.expanduser("~"), "bitmap.png"), "PNG")
|
||||||
|
|
||||||
#load the bitmap to display it as overlay
|
#load the bitmap to display it as overlay
|
||||||
- pixbuf = GdkPixbuf.Pixbuf.new_from_file('/home/weston/bitmap.png')
|
- pixbuf = GdkPixbuf.Pixbuf.new_from_file('/home/weston/bitmap.png')
|
||||||
+ pixbuf = GdkPixbuf.Pixbuf.new_from_file('/home/root/bitmap.png')
|
+ pixbuf = GdkPixbuf.Pixbuf.new_from_file(os.path.join(os.path.expanduser("~"), "bitmap.png"))
|
||||||
img = Gdk.cairo_set_source_pixbuf(cr, pixbuf.copy(),int(offset), int(vertical_offset))
|
img = Gdk.cairo_set_source_pixbuf(cr, pixbuf.copy(),int(offset), int(vertical_offset))
|
||||||
cr.paint()
|
cr.paint()
|
||||||
if (self.app.enable_camera_preview == False):
|
if (self.app.enable_camera_preview == False):
|
||||||
|
|
@ -29,7 +29,7 @@ index 35b8bea..68d554b 100644
|
||||||
#remove bitmap.png file before closing app
|
#remove bitmap.png file before closing app
|
||||||
file = 'bitmap.png'
|
file = 'bitmap.png'
|
||||||
- location = "/home/weston"
|
- location = "/home/weston"
|
||||||
+ location = "/home/root"
|
+ location = os.path.expanduser("~")
|
||||||
path = os.path.join(location,file)
|
path = os.path.join(location,file)
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
print("gtk main finished")
|
print("gtk main finished")
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ do_install:append:ccimx6ul() {
|
||||||
pkg_postinst_ontarget:${PN}-daemon() {
|
pkg_postinst_ontarget:${PN}-daemon() {
|
||||||
# If dualboot is enabled, change the CCCSD download path and set on the fly to yes on the first boot
|
# If dualboot is enabled, change the CCCSD download path and set on the fly to yes on the first boot
|
||||||
if [ "$(fw_printenv -n dualboot 2>/dev/null)" = "yes" ]; then
|
if [ "$(fw_printenv -n dualboot 2>/dev/null)" = "yes" ]; then
|
||||||
sed -i "/firmware_download_path = \/mnt\/update/c\firmware_download_path = \/home\/root" /etc/cccs.conf
|
sed -i "/firmware_download_path = \/mnt\/update/c\firmware_download_path = %h" /etc/cccs.conf
|
||||||
sed -i "/on_the_fly = false/c\on_the_fly = true" /etc/cccs.conf
|
sed -i "/on_the_fly = false/c\on_the_fly = true" /etc/cccs.conf
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue