From 62377d9f62cf26ff6473be38f7dfd3b66bf40cb0 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Sat, 28 Sep 2024 17:33:55 +0800 Subject: linuxptp: upgrade 4.1 -> 4.4 * Update SRC_URI * Drop backport patches * Drop redundant UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX Signed-off-by: Yi Zhao Signed-off-by: Khem Raj --- .../0001-include-string.h-for-strncpy.patch | 26 --------- .../0002-linuxptp-Use-CC-in-incdefs.sh.patch | 48 ----------------- .../recipes-connectivity/linuxptp/linuxptp_4.1.bb | 62 ---------------------- .../recipes-connectivity/linuxptp/linuxptp_4.4.bb | 54 +++++++++++++++++++ 4 files changed, 54 insertions(+), 136 deletions(-) delete mode 100644 meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch delete mode 100644 meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch delete mode 100644 meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb create mode 100644 meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch deleted file mode 100644 index b117dcf670..0000000000 --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0001-include-string.h-for-strncpy.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 6120cee594c543d17ae015bc601012debcf57177 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 23 Oct 2023 10:43:42 +0100 -Subject: [PATCH] include string.h for strncpy() - -Signed-off-by: Khem Raj -Upstream-Status: Backport [master: 6120cee594c543d17ae015bc601012debcf57177] ---- - interface.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/interface.c b/interface.c -index 29229ad6f53d..9a83c36933e7 100644 ---- a/interface.c -+++ b/interface.c -@@ -5,6 +5,7 @@ - * @note SPDX-License-Identifier: GPL-2.0+ - */ - #include -+#include - #include "interface.h" - - struct interface { --- -2.34.1 - diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch b/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch deleted file mode 100644 index 3cf3a63b94..0000000000 --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp/0002-linuxptp-Use-CC-in-incdefs.sh.patch +++ /dev/null @@ -1,48 +0,0 @@ -From cffb4807ac0b9ff7aea2aa4f3842985b5363d184 Mon Sep 17 00:00:00 2001 -From: Luca Fancellu -Date: Mon, 23 Oct 2023 10:43:43 +0100 -Subject: [PATCH] linuxptp: Use ${CC} in incdefs.sh - -The Makefile is defining CC and incdefs.sh is using -${CROSS_COMPILE}cpp inside it, allowing both to use different -compilers depending on what the user pass during make invocation -as CC. - -Align them using ${CC} also inside incdefs.sh. - -Signed-off-by: Luca Fancellu -Upstream-Status: Backport [master: cffb4807ac0b9ff7aea2aa4f3842985b5363d184] ---- - incdefs.sh | 2 +- - makefile | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/incdefs.sh b/incdefs.sh -index a9e94f777f6b..391e63c7fac6 100755 ---- a/incdefs.sh -+++ b/incdefs.sh -@@ -27,7 +27,7 @@ user_flags() - printf " -D_GNU_SOURCE" - - # Get list of directories searched for header files. -- dirs=$(echo "" | ${CROSS_COMPILE}cpp -Wp,-v 2>&1 >/dev/null | grep ^" /") -+ dirs=$(${CC} -E -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /") - - # Look for clock_adjtime(). - for d in $dirs; do -diff --git a/makefile b/makefile -index 3e3b8b35fc96..7fc5f6fb8fa8 100644 ---- a/makefile -+++ b/makefile -@@ -39,7 +39,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o nsm.o phc2sys.o phc_ctl.o pmc.o pmc_agent.o \ - SRC = $(OBJECTS:.o=.c) - DEPEND = $(OBJECTS:.o=.d) - srcdir := $(dir $(lastword $(MAKEFILE_LIST))) --incdefs := $(shell $(srcdir)/incdefs.sh) -+incdefs := $(shell CC="$(CC)" $(srcdir)/incdefs.sh) - version := $(shell $(srcdir)/version.sh $(srcdir)) - VPATH = $(srcdir) - --- -2.34.1 - diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb deleted file mode 100644 index d1a73841a1..0000000000 --- a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.1.bb +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY = "linuxptp package for linux" -DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 \ -for Linux" -HOMEPAGE = "http://linuxptp.sourceforge.net/" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -LINUXPTP_SRC_URI = "http://sourceforge.net/projects/linuxptp" - -SRC_URI = "${LINUXPTP_SRC_URI}/files/v4.1/linuxptp-${PV}.tgz \ - file://0001-include-string.h-for-strncpy.patch \ - file://0002-linuxptp-Use-CC-in-incdefs.sh.patch \ - file://systemd/phc2sys@.service.in \ - file://systemd/ptp4l@.service.in \ - " - -SRC_URI[md5sum] = "1db8699fc155965341759be5e5aad938" -SRC_URI[sha256sum] = "e1743d44f8208897e30895da3579e670ff919b914feb4b5a949f3e421ddde535" - -inherit systemd - -UPSTREAM_CHECK_URI = "${LINUXPTP_SRC_URI}/files/" -UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)/" - -EXTRA_OEMAKE = "CC='${CC}' EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}' \ - sbindir='${sbindir}'" - -export KBUILD_OUTPUT="${RECIPE_SYSROOT}" - -LINUXPTP_SYSTEMD_SERVICES = "phc2sys@.service ptp4l@.service" - -do_install() { - oe_runmake install DESTDIR=${D} - - # Install example configs from source tree - install -d ${D}${docdir}/${PN} - cp -R --no-dereference --preserve=mode,links ${S}/configs \ - ${D}${docdir}/${PN} - - # Install default configuration files - install -d ${D}/${sysconfdir}/linuxptp/ - install -m 644 ${S}/configs/default.cfg \ - ${D}${sysconfdir}/linuxptp/ptp4l.conf - - # Install systemd services - install -d ${D}/${systemd_unitdir}/system/ - for service in ${LINUXPTP_SYSTEMD_SERVICES}; do - sed -i -e 's,@SBINDIR@,${sbindir},g' \ - ${UNPACKDIR}/systemd/$service.in - sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - ${UNPACKDIR}/systemd/$service.in - install -m 644 ${UNPACKDIR}/systemd/$service.in \ - ${D}/${systemd_unitdir}/system/$service - done -} - -SYSTEMD_SERVICE:${PN} = "${LINUXPTP_SYSTEMD_SERVICES}" -SYSTEMD_AUTO_ENABLE:${PN} = "disable" - -PACKAGES =+ "${PN}-configs" - -FILES:${PN}-configs += "${docdir}" diff --git a/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb new file mode 100644 index 0000000000..84b3af8c56 --- /dev/null +++ b/meta-oe/recipes-connectivity/linuxptp/linuxptp_4.4.bb @@ -0,0 +1,54 @@ +SUMMARY = "linuxptp package for linux" +DESCRIPTION = "Precision Time Protocol (PTP) according to IEEE standard 1588 \ +for Linux" +HOMEPAGE = "http://linuxptp.sourceforge.net/" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "https://downloads.nwtime.org/linuxptp/linuxptp-${PV}.tgz \ + file://systemd/phc2sys@.service.in \ + file://systemd/ptp4l@.service.in \ + " + +SRC_URI[sha256sum] = "61757bc0a58d789b8fcbdddf56c88a0230597184a70dcb2ac05b4c6b619f7d5c" + +inherit systemd + +EXTRA_OEMAKE = "CC='${CC}' EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}' \ + sbindir='${sbindir}'" + +export KBUILD_OUTPUT="${RECIPE_SYSROOT}" + +LINUXPTP_SYSTEMD_SERVICES = "phc2sys@.service ptp4l@.service" + +do_install() { + oe_runmake install DESTDIR=${D} + + # Install example configs from source tree + install -d ${D}${docdir}/${PN} + cp -R --no-dereference --preserve=mode,links ${S}/configs \ + ${D}${docdir}/${PN} + + # Install default configuration files + install -d ${D}/${sysconfdir}/linuxptp/ + install -m 644 ${S}/configs/default.cfg \ + ${D}${sysconfdir}/linuxptp/ptp4l.conf + + # Install systemd services + install -d ${D}/${systemd_unitdir}/system/ + for service in ${LINUXPTP_SYSTEMD_SERVICES}; do + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + ${UNPACKDIR}/systemd/$service.in + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${UNPACKDIR}/systemd/$service.in + install -m 644 ${UNPACKDIR}/systemd/$service.in \ + ${D}/${systemd_unitdir}/system/$service + done +} + +SYSTEMD_SERVICE:${PN} = "${LINUXPTP_SYSTEMD_SERVICES}" +SYSTEMD_AUTO_ENABLE:${PN} = "disable" + +PACKAGES =+ "${PN}-configs" + +FILES:${PN}-configs += "${docdir}" -- cgit v1.2.3-54-g00ecf