Skip to content
Snippets Groups Projects
Commit fe9f9669 authored by Mikhail Vanyulin's avatar Mikhail Vanyulin
Browse files

Add script and service for seco-hmi postinstallation


Signed-off-by: default avatarMikhail Vanyulin <mikhail.vanyulin@rtsoft.de>
parent 31d085da
No related branches found
No related tags found
1 merge request!7Add script and service for seco-hmi postinstallation
Pipeline #75489 failed with stage
in 9 seconds
dist_sbin_SCRIPTS = \
yocto-postinstallation
yocto-postinstallation \
seco-hmi-postinstallation.sh
dist_libexec_SCRIPTS = \
prepare-bootpartition.sh \
......@@ -13,12 +14,16 @@ dist_libexec_SCRIPTS = \
prepare-xml2dto.sh \
prepare-rtc.sh
systemdsysdir = $(systemd_system_unitdir)
systemdsys_DATA = seco-hmi-postinstallation.service
# Keep the fnginstall-postinstallation as link for some time
# until we are sure that the old name can be removed
install-exec-hook:
cd ${DESTDIR}${sbindir}
$(LN_S) yocto-postinstallation ${DESTDIR}${sbindir}/fnginstall-postinstallation
install-data-hook:
cd ${DESTDIR}
mkdir -p ${DESTDIR}${sysconfdir}/fng-postinstall
......@@ -31,6 +36,3 @@ install-data-hook:
$(LN_S) ${libexecdir}/prepare-xml2dto.sh ${DESTDIR}${sysconfdir}/fng-postinstall/13-prepare-xml2dto
$(LN_S) ${libexecdir}/prepare-rtc.sh ${DESTDIR}${sysconfdir}/fng-postinstall/14-prepare-rtc
$(LN_S) ${libexecdir}/prepare-ethphy.sh ${DESTDIR}${sysconfdir}/fng-postinstall/15-prepare-ethphy
[Unit]
Description=Run fnginstall-postinstallation
Wants=systemd-udevd.service systemd-udev-trigger.service
After=systemd-remount-fs.service systemd-udevd.service
[Service]
Type=oneshot
ExecStartPre=-/bin/udevadm settle
ExecStart=-/usr/sbin/seco-hmi-postinstallation.sh
[Install]
WantedBy=basic.target
#!/bin/sh
SHARED_PART="/dev/mmcblk0boot1"
SHARED_MOUNT="/etc/shared"
BOOT_MOUNT="/tmp/boot_part"
OVERLAY_FILE="gfxml-overlay.dtbo"
umount -q $SHARED_MOUNT
umount -q $BOOT_MOUNT
rootfs_dev=$(findmnt -n -o SOURCE /)
prefix=$(echo $rootfs_dev | grep -o -e .*p)
rootfs_part_num=$(echo ${rootfs_dev: -1})
bootfs_part_num=`expr $rootfs_part_num - 1`
bootfs_dev=$prefix$bootfs_part_num
mkdir -p $SHARED_MOUNT
mkdir -p $BOOT_MOUNT
mount $SHARED_PART $SHARED_MOUNT
mount $bootfs_dev $BOOT_MOUNT
if ! test -f $BOOT_MOUNT/$OVERLAY_FILE
then
FSL=""
if grep -q -i mxcfb $BOOT_MOUNT/*.dtb
then
FSL="--fsl"
fi
export BOOTPARTITION="$bootfs_dev"
fnginstall-postinstallation
fi
umount $SHARED_MOUNT
umount $BOOT_MOUNT
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment