a64b0f91983c1e6f525e2cad3e524edaf885680e
[AGL/meta-agl-demo.git] / recipes-kernel / sllin / sllin.bb
1 DESCRIPTION = "slLIN driver module"
2 LICENSE = "GPLv2"
3 LIC_FILES_CHKSUM = "file://sllin.c;beginline=7;endline=37;md5=6408e14dba951f8cbe3c2a003a0d89d2"
4
5 inherit module systemd
6
7 DEPENDS = "virtual/kernel"
8
9 SRC_URI = "git://github.com/trainman419/linux-lin.git;protocol=https;branch=master"
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://0004-Fix-build-with-5.9-kernel.patch;pnum=2 \
21         file://0005-Fix-build-with-5.13-kernel.patch;pnum=2 \
22         file://0006-Fix-build-with-5.14-kernel.patch;pnum=2 \
23         file://sllin-demo.service \
24         file://start_lin_demo.sh \
25         file://lin_config.conf \
26 "
27
28 KERNEL_MODULE_AUTOLOAD:append = " sllin"
29 KERNEL_MODULE_PROBECONF:append = " sllin"
30
31 SLLINBAUDRATE ??= "9600"
32 module_conf_sllin = "options sllin baudrate=${SLLINBAUDRATE}"
33
34 SYSTEMD_SERVICE:${PN} = "sllin-demo.service"
35
36 do_install:append () {
37         install -d 644 ${D}/${bindir}
38         install -m 755 ${WORKDIR}/start_lin_demo.sh ${D}/${bindir}/start_lin_demo.sh
39         install -d ${D}${systemd_system_unitdir}
40         install -m 0644 ${WORKDIR}/sllin-demo.service ${D}${systemd_system_unitdir}/
41         install -d ${D}${sysconfdir}
42         install -m 0644 ${WORKDIR}/lin_config.conf ${D}${sysconfdir}/
43 }
44
45 FILES:${PN} += "${bindir}/start_lin_demo.sh ${sysconfdir}/lin_config.conf"
46
47 RDEPENDS:${PN} += "lin-config"