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 <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Yi Zhao 2024-09-28 17:33:55 +08:00 committed by Khem Raj
parent 1a6683bf47
commit 62377d9f62
No known key found for this signature in database
GPG Key ID: BB053355919D3314
3 changed files with 2 additions and 84 deletions

View File

@ -1,26 +0,0 @@
From 6120cee594c543d17ae015bc601012debcf57177 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 23 Oct 2023 10:43:42 +0100
Subject: [PATCH] include string.h for strncpy()
Signed-off-by: Khem Raj <raj.khem@gmail.com>
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 <stdlib.h>
+#include <string.h>
#include "interface.h"
struct interface {
--
2.34.1

View File

@ -1,48 +0,0 @@
From cffb4807ac0b9ff7aea2aa4f3842985b5363d184 Mon Sep 17 00:00:00 2001
From: Luca Fancellu <luca.fancellu@arm.com>
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 <luca.fancellu@arm.com>
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

View File

@ -5,23 +5,15 @@ 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 \
SRC_URI = "https://downloads.nwtime.org/linuxptp/linuxptp-${PV}.tgz \
file://systemd/phc2sys@.service.in \
file://systemd/ptp4l@.service.in \
"
SRC_URI[md5sum] = "1db8699fc155965341759be5e5aad938"
SRC_URI[sha256sum] = "e1743d44f8208897e30895da3579e670ff919b914feb4b5a949f3e421ddde535"
SRC_URI[sha256sum] = "61757bc0a58d789b8fcbdddf56c88a0230597184a70dcb2ac05b4c6b619f7d5c"
inherit systemd
UPSTREAM_CHECK_URI = "${LINUXPTP_SRC_URI}/files/"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
EXTRA_OEMAKE = "CC='${CC}' EXTRA_CFLAGS='${CFLAGS}' mandir='${mandir}' \
sbindir='${sbindir}'"