Update LIN demo to use lin-config
[AGL/meta-agl-demo.git] / recipes-kernel / sllin / sllin.bb
1 DESCRIPTION = "slLIN driver module"
2 LICENSE = "GPLv2"
3 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
4
5 inherit module systemd
6
7 DEPENDS = "virtual/kernel"
8
9 SRC_URI = "git://github.com/trainman419/linux-lin.git;protocol=https"
10 SRCREV = "155d885e8ccc907a56f6c86c4b159fac27ef6fec"
11 S = "${WORKDIR}/git/sllin"
12
13 PV = "0.1+git${SRCPV}"
14
15 SRC_URI_append = " \
16         file://0001_update_makefile.patch;pnum=2 \
17         file://0002_fix_null_operation_check.patch;pnum=2 \
18         file://0003-Allow-recent-kernels-newer-4.11.x-to-build.patch;pnum=2 \
19         file://0001-Disable-sllin-driver-debug-log.patch;pnum=2 \
20         file://sllin-demo.service \
21         file://start_lin_demo.sh \
22         file://lin_config.conf \
23 "
24
25 KERNEL_MODULE_AUTOLOAD_append = " sllin"
26 KERNEL_MODULE_PROBECONF_append = " sllin"
27
28 SLLINBAUDRATE ??= "9600"
29 module_conf_sllin = "options sllin baudrate=${SLLINBAUDRATE}"
30
31 SYSTEMD_SERVICE_${PN} = "sllin-demo.service"
32
33 do_install_append () {
34         install -d 644 ${D}/${bindir}
35         install -m 755 ${WORKDIR}/start_lin_demo.sh ${D}/${bindir}/start_lin_demo.sh
36         install -d ${D}${systemd_system_unitdir}
37         install -m 0644 ${WORKDIR}/sllin-demo.service ${D}${systemd_system_unitdir}/
38         install -d ${D}${sysconfdir}
39         install -m 0644 ${WORKDIR}/lin_config.conf ${D}${sysconfdir}/
40 }
41
42 FILES_${PN} += "${bindir}/start_lin_demo.sh ${sysconfdir}/lin_config.conf"
43
44 RDEPENDS_${PN} += "lin-config"