Prepare master for new framework integration
[AGL/meta-agl.git] / meta-agl-bsp / meta-rcar-gen3-adas / recipes-bsp / si-tools / si-init_1.0.bb
1 SUMMARY     = "Systemd service unit for Si468x radio initialization"
2 LICENSE     = "MIT"
3 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
4
5 inherit systemd
6
7 SRC_URI = "file://si-init.service"
8
9 do_configure[noexec] = "1"
10 do_compile[noexec] = "1"
11
12 do_install() {
13     install -d ${D}${systemd_system_unitdir}
14     install -m 0644 ${WORKDIR}/si-init.service ${D}${systemd_system_unitdir}
15
16     # Add symlink to sysinit.target.wants
17     install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
18     ln -s ${systemd_system_unitdir}/si-init.service ${D}${sysconfdir}/systemd/system/sysinit.target.wants/
19
20     # Add a rule to ensure the 'audio' user has permission to access
21     # the Si468x device via i2c
22     install -d ${D}${sysconfdir}/udev/rules.d
23     cat >${D}${sysconfdir}/udev/rules.d/zz-radio-si.rules <<'EOF'
24 KERNEL=="i2c-12", MODE="0660", GROUP="audio"
25 EOF
26 }
27
28 FILES:${PN} += "${systemd_system_unitdir}"