diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/recipes-core/psplash | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/poky/meta/recipes-core/psplash')
4 files changed, 57 insertions, 29 deletions
diff --git a/external/poky/meta/recipes-core/psplash/files/psplash-init b/external/poky/meta/recipes-core/psplash/files/psplash-init index 0bce1de5..f58e0437 100755 --- a/external/poky/meta/recipes-core/psplash/files/psplash-init +++ b/external/poky/meta/recipes-core/psplash/files/psplash-init @@ -23,8 +23,11 @@ for x in $CMDLINE; do esac done -export TMPDIR=/mnt/.psplash -mount tmpfs -t tmpfs $TMPDIR -o,size=40k +export PSPLASH_FIFO_DIR=/mnt/.psplash +[ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR +if ! mountpoint -q $PSPLASH_FIFO_DIR; then + mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k +fi rotation=0 if [ -e /etc/rotation ]; then diff --git a/external/poky/meta/recipes-core/psplash/files/psplash-start.service b/external/poky/meta/recipes-core/psplash/files/psplash-start.service new file mode 100644 index 00000000..36c2bb38 --- /dev/null +++ b/external/poky/meta/recipes-core/psplash/files/psplash-start.service @@ -0,0 +1,12 @@ +[Unit] +Description=Start psplash boot splash screen +DefaultDependencies=no +RequiresMountsFor=/run + +[Service] +Type=notify +ExecStart=/usr/bin/psplash +RemainAfterExit=yes + +[Install] +WantedBy=sysinit.target diff --git a/external/poky/meta/recipes-core/psplash/files/psplash-systemd.service b/external/poky/meta/recipes-core/psplash/files/psplash-systemd.service new file mode 100644 index 00000000..082207f2 --- /dev/null +++ b/external/poky/meta/recipes-core/psplash/files/psplash-systemd.service @@ -0,0 +1,13 @@ +[Unit] +Description=Start psplash-systemd progress communication helper +DefaultDependencies=no +After=psplash-start.service +Requires=psplash-start.service +RequiresMountsFor=/run + +[Service] +ExecStart=/usr/bin/psplash-systemd +RemainAfterExit=yes + +[Install] +WantedBy=sysinit.target diff --git a/external/poky/meta/recipes-core/psplash/psplash_git.bb b/external/poky/meta/recipes-core/psplash/psplash_git.bb index 3ad1ef48..22c71f09 100644 --- a/external/poky/meta/recipes-core/psplash/psplash_git.bb +++ b/external/poky/meta/recipes-core/psplash/psplash_git.bb @@ -3,14 +3,17 @@ DESCRIPTION = "PSplash is a userspace graphical boot splash screen for mainly em HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/psplash" SECTION = "base" LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6" +LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=8;md5=8f232c1e95929eacab37f00900580224" +DEPENDS = "gdk-pixbuf-native" -SRCREV = "2015f7073e98dd9562db0936a254af5ef56356cf" +SRCREV = "0a902f7cd875ccf018456451be369f05fa55f962" PV = "0.1+git${SRCPV}" PR = "r15" SRC_URI = "git://git.yoctoproject.org/${BPN} \ file://psplash-init \ + file://psplash-start.service \ + file://psplash-systemd.service \ ${SPLASH_IMAGES}" UPSTREAM_CHECK_COMMITS = "1" @@ -21,7 +24,6 @@ python __anonymous() { splashfiles = d.getVar('SPLASH_IMAGES').split() pkgs = [] localpaths = [] - haspng = False for uri in splashfiles: fetcher = bb.fetch2.Fetch([uri], d) flocal = os.path.basename(fetcher.localpath(uri)) @@ -39,17 +41,12 @@ python __anonymous() { bb.fatal("The output name '%s' derived from the URI %s is not valid, please specify the outsuffix parameter" % (outname, uri)) else: pkgs.append(outname) - if flocal.endswith(".png"): - haspng = True localpaths.append(flocal) # Set these so that we have less work to do in do_compile and do_install_append d.setVar("SPLASH_INSTALL", " ".join(pkgs)) d.setVar("SPLASH_LOCALPATHS", " ".join(localpaths)) - if haspng: - d.appendVar("DEPENDS", " gdk-pixbuf-native") - d.prependVar("PACKAGES", "%s " % (" ".join(pkgs))) mlprefix = d.getVar('MLPREFIX') or '' pn = d.getVar('PN') or '' @@ -66,7 +63,11 @@ python __anonymous() { S = "${WORKDIR}/git" -inherit autotools pkgconfig update-rc.d update-alternatives +inherit autotools pkgconfig update-rc.d update-alternatives systemd + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" + +PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" ALTERNATIVE_PRIORITY = "100" ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash" @@ -74,19 +75,19 @@ ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash" python do_compile () { import shutil import subprocess - import shlex # Build a separate executable for each splash image workdir = d.getVar('WORKDIR') convertscript = "%s/make-image-header.sh" % d.getVar('S') - destfile = "%s/psplash-poky-img.h" % d.getVar('S') + destfile = "%s/psplash-poky-img.h" % d.getVar('B') localfiles = d.getVar('SPLASH_LOCALPATHS').split() outputfiles = d.getVar('SPLASH_INSTALL').split() for localfile, outputfile in zip(localfiles, outputfiles): if localfile.endswith(".png"): - subprocess.call(shlex.split('%s %s POKY' % (convertscript, os.path.join(workdir, localfile)))) + if subprocess.call([ convertscript, os.path.join(workdir, localfile), 'POKY' ], cwd=workdir): + bb.fatal("Error calling convert script '%s'" % (convertscript)) fbase = os.path.splitext(localfile)[0] - shutil.copyfile("%s-img.h" % fbase, destfile) + shutil.copyfile(os.path.join(workdir, "%s-img.h" % fbase), destfile) else: shutil.copyfile(os.path.join(workdir, localfile), destfile) # For some reason just updating the header is not enough, we have to touch the .c @@ -97,9 +98,17 @@ python do_compile () { } do_install_append() { - install -d ${D}/mnt/.psplash/ - install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 644 ${WORKDIR}/psplash-start.service ${D}/${systemd_unitdir}/system + install -m 644 ${WORKDIR}/psplash-systemd.service ${D}/${systemd_unitdir}/system + fi + install -d ${D}${bindir} for i in ${SPLASH_INSTALL} ; do install -m 0755 $i ${D}${bindir}/$i @@ -107,17 +116,8 @@ do_install_append() { rm -f ${D}${bindir}/psplash } -FILES_${PN} += "/mnt/.psplash" +SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" +SYSTEMD_SERVICE_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'psplash-start.service psplash-systemd.service', '', d)}" INITSCRIPT_NAME = "psplash.sh" INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ." - -PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" -pkg_postinst_${PN} () { - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - if [ -n "$D" ]; then - OPTS="--root=$D" - fi - systemctl $OPTS mask psplash.service - fi -} |