meta-sysmocom-bsp/recipes-bsp/early-date/early-date_1.bb

24 lines
707 B
BlitzBasic

DESCRIPTION = "Set an early date on RTC less systems"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
SRC_URI = "\
file://early-date \
file://early-date.service"
FILES_${PN} = "${systemd_unitdir}/system /sbin"
RDPEPENDS_${PN} = "systemd"
do_install() {
install -d ${D}/sbin
install -d ${D}${systemd_unitdir}/system/basic.target.wants
# Copy the service file and link it
install -m 0644 ${WORKDIR}/early-date.service ${D}${systemd_unitdir}/system
ln -sf ../early-date.service ${D}${systemd_unitdir}/system/basic.target.wants/
# Hardcode to /sbin
# TODO: Set the date as of the build time..
install -m 0755 ${WORKDIR}/early-date ${D}/sbin
}