5 Commits

Author SHA1 Message Date
Luca Fancellu
2c42ae3b36 linuxptp: Use templates for the systemd services
Use templates for the systemd services so that sbindir
and sysconfdir can be written into them, improving
portability.

Pass sbindir with EXTRA_OEMAKE and remove 'prefix' which
is redundant since we pass sbindir and mandir already.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit c66ec8776ec6f467937918a114bdefa28ac036a9)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-10-30 07:14:02 -04:00
Luca Fancellu
ed6b4bb292 linuxptp: Drop unneeded downstream patches
Drop Use-cross-cpp-in-incdefs.patch which is "Inappropriate"
but what is fixing can be done in an "Upstreamable" way
by the new downstream patch
0002-linuxptp-Use-CC-in-incdefs.sh.patch.

Drop build-Allow-CC-and-prefix-to-be-overriden.patch that can
be removed by passing CC='${CC}' in EXTRA_OEMAKE and, as already
the case, passing prefix=${prefix} in the oe_runmake command line.

While there, drop ARCH from EXTRA_OEMAKE because it's not used in
the codebase.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit c8316b49ff4de3e4048cc9ec5dd467e593265b6b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-10-30 07:14:02 -04:00
Luca Fancellu
3e1b5753c7 linuxptp: add systemd services
Add systemd services phc2sys@.service and ptp4l@.service,
these services are taken from the Ubuntu/Debian linuxptp
package.

Update the recipe to install them when needed using the
systemd bbclass, the services are disabled by default.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 35bcd8c6ddfb6bc8729d0006dab887afcc772ec9)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-10-17 08:23:02 -04:00
Luca Fancellu
2893fbcaf5 linuxptp: install default configuration file in sysconfdir
Install a default configuration files to be used in
${sysconfdir}/linuxptp, the default.cfg file from linuxptp
is used.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 34c5bea19d67b36e572cb71c11fd553ac9f35a28)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-10-17 08:23:02 -04:00
Luca Fancellu
bd0b9a017b linuxptp: update linuxptp recipe to 4.1
Update linuxptp recipe to the new version, from 3.1.1 to 4.1.

Remove one downstream patch that is already applied and
update the remaining to remove merge issues.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit da5aaaa1d7fad44017c6814b6459c77598a5779d)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-10-17 08:23:02 -04:00