blob: eb0bb8811515f500c834b565618b8ab0a378ce16 [file] [log] [blame]
developer2bf53a92022-06-06 12:08:58 +08001FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3SRC_URI += "\
4file://enabling_dhcp_lease_resync.patch;apply=no \
5file://meshagent-enable-ovs-default.patch;apply=no \
6"
7
developer2bf53a92022-06-06 12:08:58 +08008# we need to patch to code for mesh-agent
9do_turris_meshagent_patches() {
10 cd ${S}
11 if [ ! -e patch_applied ]; then
12 bbnote "Patching enabling_dhcp_lease_resync.patch"
13 patch -p1 < ${WORKDIR}/enabling_dhcp_lease_resync.patch ${S}/source/MeshAgentSsp/cosa_mesh_apis.c
14
15 bbnote "Patching meshagent-enable-ovs-default.patch"
16 patch -p1 < ${WORKDIR}/meshagent-enable-ovs-default.patch ${S}/source/MeshAgentSsp/cosa_mesh_apis.c
17
18 touch patch_applied
19 fi
20}
21addtask turris_meshagent_patches after do_unpack before do_configure
22
23do_install_append () {
24 install -D -m 0644 ${S}/systemd_units/meshAgent.service ${D}${systemd_unitdir}/system/meshAgent.service
25}
26
27FILES_${PN}_append = "${systemd_unitdir}/system/meshAgent.service"
28
29CFLAGS_append = " -D_PLATFORM_TURRIS_"