Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit branch/2017.02.x] postgresql: bump version to 9.6.2
From: Peter Korsgaard @ 2017-05-15 11:37 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=5149066e594a7c7f1f0bbe195f371309c0c5bc07
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.02.x

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit cd3d6c32ca515d5fb8dcc47cb17b2677fd480948)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/postgresql/postgresql.hash | 4 ++--
 package/postgresql/postgresql.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/postgresql/postgresql.hash b/package/postgresql/postgresql.hash
index 900a55a..1524a34 100644
--- a/package/postgresql/postgresql.hash
+++ b/package/postgresql/postgresql.hash
@@ -1,2 +1,2 @@
-# From https://ftp.postgresql.org/pub/source/v9.6.1/postgresql-9.6.1.tar.bz2.sha256
-sha256 e5101e0a49141fc12a7018c6dad594694d3a3325f5ab71e93e0e51bd94e51fcd  postgresql-9.6.1.tar.bz2
+# From https://ftp.postgresql.org/pub/source/v9.6.2/postgresql-9.6.2.tar.bz2.sha256
+sha256 0187b5184be1c09034e74e44761505e52357248451b0c854dddec6c231fe50c9  postgresql-9.6.2.tar.bz2
diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index bc2bf47..e07afc9 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-POSTGRESQL_VERSION = 9.6.1
+POSTGRESQL_VERSION = 9.6.2
 POSTGRESQL_SOURCE = postgresql-$(POSTGRESQL_VERSION).tar.bz2
 POSTGRESQL_SITE = http://ftp.postgresql.org/pub/source/v$(POSTGRESQL_VERSION)
 POSTGRESQL_LICENSE = PostgreSQL

^ permalink raw reply related

* [Buildroot] [PATCH] sudo: fix static linking with openldap having openssl support
From: Peter Korsgaard @ 2017-05-15 11:36 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170511130040.26036-1-Vincent.Riera@imgtec.com>

>>>>> "Vicente" == Vicente Olivert Riera <Vincent.Riera@imgtec.com> writes:

 > If we are building sudo statically and openldap was linked with openssl,
 > then when we link sudo with openldap we need to specify the openssl
 > libs, otherwise it will fail with "undefined reference" errors.

 > Fixes:
 >   http://autobuild.buildroot.net/results/ebb/ebbb4c3138b5023a0c8bd938db1932a25ba5b6fb/
 >   http://autobuild.buildroot.net/results/58e/58ee4fddea85f0c79b26582b04a573258e27eb47/
 >   http://autobuild.buildroot.net/results/051/05151c4ef7f0b3702a6cd5e6df4888d826a37431/
 >   http://autobuild.buildroot.net/results/b1d/b1dfae81985daee106700191fcb82387833c2e3f/
 >   http://autobuild.buildroot.net/results/5b4/5b42e8505856156389d480d0da19f6982cf120d8/
 >   http://autobuild.buildroot.net/results/30a/30a76190428f902f03bcf54ba9f1f4f4377c6fc9/
 >   http://autobuild.buildroot.net/results/e8c/e8c6bdc314b9a8d5de303633a3abd7b7e44beb2e/
 >   http://autobuild.buildroot.net/results/483/4830c69cc6a62080e1516f0d9009c2ba619c23c1/

 > Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
 > ---
 >  package/sudo/sudo.mk | 7 +++++++
 >  1 file changed, 7 insertions(+)

 > diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk
 > index 0fcd740..56f83ea 100644
 > --- a/package/sudo/sudo.mk
 > +++ b/package/sudo/sudo.mk
 > @@ -40,6 +40,13 @@ endif
 >  ifeq ($(BR2_PACKAGE_OPENLDAP),y)
 >  SUDO_DEPENDENCIES += openldap
 >  SUDO_CONF_OPTS += --with-ldap
 > +# If we are building sudo statically and openldap was linked with openssl, then
 > +# when we link sudo with openldap we need to specify the openssl libs, otherwise
 > +# it will fail with "undefined reference" errors.
 > +ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_OPENSSL),yy)
 > +SUDO_DEPENDENCIES += host-pkgconf
 > +SUDO_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
 > +endif

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit branch/2017.02.x] sudo: fix static linking with openldap having openssl support
From: Peter Korsgaard @ 2017-05-15 11:36 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=fe43fddcfc91b5d9e4f4463930ae424bb48281e3
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.02.x

If we are building sudo statically and openldap was linked with openssl,
then when we link sudo with openldap we need to specify the openssl
libs, otherwise it will fail with "undefined reference" errors.

Fixes:
  http://autobuild.buildroot.net/results/ebb/ebbb4c3138b5023a0c8bd938db1932a25ba5b6fb/
  http://autobuild.buildroot.net/results/58e/58ee4fddea85f0c79b26582b04a573258e27eb47/
  http://autobuild.buildroot.net/results/051/05151c4ef7f0b3702a6cd5e6df4888d826a37431/
  http://autobuild.buildroot.net/results/b1d/b1dfae81985daee106700191fcb82387833c2e3f/
  http://autobuild.buildroot.net/results/5b4/5b42e8505856156389d480d0da19f6982cf120d8/
  http://autobuild.buildroot.net/results/30a/30a76190428f902f03bcf54ba9f1f4f4377c6fc9/
  http://autobuild.buildroot.net/results/e8c/e8c6bdc314b9a8d5de303633a3abd7b7e44beb2e/
  http://autobuild.buildroot.net/results/483/4830c69cc6a62080e1516f0d9009c2ba619c23c1/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit bf899e50d89439b1a1bdf22bc933075958ffc108)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/sudo/sudo.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk
index bb0a2b5..7f0b132 100644
--- a/package/sudo/sudo.mk
+++ b/package/sudo/sudo.mk
@@ -40,6 +40,13 @@ endif
 ifeq ($(BR2_PACKAGE_OPENLDAP),y)
 SUDO_DEPENDENCIES += openldap
 SUDO_CONF_OPTS += --with-ldap
+# If we are building sudo statically and openldap was linked with openssl, then
+# when we link sudo with openldap we need to specify the openssl libs, otherwise
+# it will fail with "undefined reference" errors.
+ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_OPENSSL),yy)
+SUDO_DEPENDENCIES += host-pkgconf
+SUDO_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
+endif
 else
 SUDO_CONF_OPTS += --without-ldap
 endif

^ permalink raw reply related

* [Buildroot] [PATCH master 2/2] linux: bump default version to 4.11.1
From: Vicente Olivert Riera @ 2017-05-15 11:36 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170515113612.45653-1-Vincent.Riera@imgtec.com>

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 linux/Config.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux/Config.in b/linux/Config.in
index ace007cc9..41545f778 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -26,7 +26,7 @@ choice
 	prompt "Kernel version"
 
 config BR2_LINUX_KERNEL_LATEST_VERSION
-	bool "Latest version (4.11)"
+	bool "Latest version (4.11.1)"
 
 config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
 	bool "Latest CIP SLTS version (v4.4.55-cip3)"
@@ -116,7 +116,7 @@ endif
 
 config BR2_LINUX_KERNEL_VERSION
 	string
-	default "4.11" if BR2_LINUX_KERNEL_LATEST_VERSION
+	default "4.11.1" if BR2_LINUX_KERNEL_LATEST_VERSION
 	default "v4.4.55-cip3" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
 	default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
 		if BR2_LINUX_KERNEL_CUSTOM_VERSION
-- 
2.13.0

^ permalink raw reply related

* [Buildroot] [PATCH master 1/2] linux-headers: bump 4.{4, 9, 10, 11}.x series
From: Vicente Olivert Riera @ 2017-05-15 11:36 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 package/linux-headers/Config.in.host | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
index f851271cc..014ae70b5 100644
--- a/package/linux-headers/Config.in.host
+++ b/package/linux-headers/Config.in.host
@@ -227,8 +227,8 @@ config BR2_DEFAULT_KERNEL_HEADERS
 	default "3.10.105"	if BR2_KERNEL_HEADERS_3_10
 	default "3.12.74"	if BR2_KERNEL_HEADERS_3_12
 	default "4.1.39"	if BR2_KERNEL_HEADERS_4_1
-	default "4.4.67"	if BR2_KERNEL_HEADERS_4_4
-	default "4.9.27"	if BR2_KERNEL_HEADERS_4_9
-	default "4.10.15"	if BR2_KERNEL_HEADERS_4_10
-	default "4.11"		if BR2_KERNEL_HEADERS_4_11
+	default "4.4.68"	if BR2_KERNEL_HEADERS_4_4
+	default "4.9.28"	if BR2_KERNEL_HEADERS_4_9
+	default "4.10.16"	if BR2_KERNEL_HEADERS_4_10
+	default "4.11.1"	if BR2_KERNEL_HEADERS_4_11
 	default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION
-- 
2.13.0

^ permalink raw reply related

* [Buildroot] [PATCH] efibootmgr: backport upstream patch to fix build with gcc 6.x
From: Peter Korsgaard @ 2017-05-15 11:35 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1494488882-32282-1-git-send-email-thomas.petazzoni@free-electrons.com>

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > efibootmgr was built with -fshort-wchar, which causes gcc to use
 > 2-byte wchar_t instead of the normal 4-byte wchar_t. But this doesn't
 > work anymore with gcc 6.x, as it causes a build failure:

 > /home/test/autobuild/run/instance-3/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/6.3.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: warning: efibootmgr.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
 > /home/test/autobuild/run/instance-3/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/6.3.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: warning: efi.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
 > /home/test/autobuild/run/instance-3/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/6.3.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: warning: unparse_path.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

 > Upstream solution was do simply drop -fshort-wchar:

 >   https://github.com/rhinstaller/efibootmgr/commit/3466fd05c8c6f1052e0426d64eed40f8a88fd78f

 > So this commit simply backports this upstream patch.

 > Fixes:

 >   http://autobuild.buildroot.net/results/87c3ff2427331eb9ab31c9eb685fe80954a0a98f/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit branch/2017.02.x] efibootmgr: backport upstream patch to fix build with gcc 6.x
From: Peter Korsgaard @ 2017-05-15 11:24 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=8f3915ef79a161e24fe47c2ad83d0ab761fa7eab
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.02.x

efibootmgr was built with -fshort-wchar, which causes gcc to use
2-byte wchar_t instead of the normal 4-byte wchar_t. But this doesn't
work anymore with gcc 6.x, as it causes a build failure:

/home/test/autobuild/run/instance-3/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/6.3.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: warning: efibootmgr.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/home/test/autobuild/run/instance-3/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/6.3.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: warning: efi.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail
/home/test/autobuild/run/instance-3/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/6.3.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: warning: unparse_path.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail

Upstream solution was do simply drop -fshort-wchar:

  https://github.com/rhinstaller/efibootmgr/commit/3466fd05c8c6f1052e0426d64eed40f8a88fd78f

So this commit simply backports this upstream patch.

Fixes:

  http://autobuild.buildroot.net/results/87c3ff2427331eb9ab31c9eb685fe80954a0a98f/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit 3e254b82c77f5b91907ee96e9cb053ac65cca00b)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/efibootmgr/efibootmgr.hash | 1 +
 package/efibootmgr/efibootmgr.mk   | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/package/efibootmgr/efibootmgr.hash b/package/efibootmgr/efibootmgr.hash
index f71dced..3f934ba 100644
--- a/package/efibootmgr/efibootmgr.hash
+++ b/package/efibootmgr/efibootmgr.hash
@@ -1,2 +1,3 @@
 # locally computed hash
 sha256 3f260491e2c62e93cb6347ea6f21aaa5f93152e9e7f0269d314623769d82e473 efibootmgr-14.tar.gz
+sha256 8e91f16927d296ffebd4f7fafda2f84c0f6201aba089a35e8090abd5aacdc58e	3466fd05c8c6f1052e0426d64eed40f8a88fd78f.patch
diff --git a/package/efibootmgr/efibootmgr.mk b/package/efibootmgr/efibootmgr.mk
index 487c8ca..7f5f494 100644
--- a/package/efibootmgr/efibootmgr.mk
+++ b/package/efibootmgr/efibootmgr.mk
@@ -6,6 +6,9 @@
 
 EFIBOOTMGR_VERSION = 14
 EFIBOOTMGR_SITE = $(call github,rhinstaller,efibootmgr,$(EFIBOOTMGR_VERSION))
+# Patch fixes the build with gcc 6.x.
+EFIBOOTMGR_PATCH = \
+	https://github.com/rhinstaller/efibootmgr/commit/3466fd05c8c6f1052e0426d64eed40f8a88fd78f.patch
 EFIBOOTMGR_LICENSE = GPLv2+
 EFIBOOTMGR_LICENSE_FILES = COPYING
 EFIBOOTMGR_DEPENDENCIES = efivar $(if $(BR2_NEEDS_GETTEXT),gettext)

^ permalink raw reply related

* [Buildroot] [PATCH v1] qt5base: fix examples compile with disabled gui module
From: Peter Korsgaard @ 2017-05-15 11:22 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170507221823.4e2f3285@free-electrons.com>

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > On Thu, 27 Apr 2017 23:01:50 +0200, Peter Seiderer wrote:
 >> Fixes [1]:
 >> 
 >> Project ERROR: Could not find feature opengl.
 >> 
 >> [1] http://autobuild.buildroot.net/results/040/040ab283dbbec623fe5ff4eaece754d9701fafc5
 >> 
 >> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
 >> ---
 >> ...4-examples-fix-compile-without-gui-module.patch | 42 ++++++++++++++++++++++
 >> 1 file changed, 42 insertions(+)
 >> create mode 100644 package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 1/1] configs: beaglebone: bump kernel version to 4.4.41
From: Lothar Felten @ 2017-05-15 11:12 UTC (permalink / raw)
  To: buildroot

Switch to Linux kernel version 4.4.41 from the TI SDK 03.03.00.04
(TI SDK release date: 29.03.2017)

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 configs/beaglebone_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/beaglebone_defconfig b/configs/beaglebone_defconfig
index b74ffbc..611b694 100644
--- a/configs/beaglebone_defconfig
+++ b/configs/beaglebone_defconfig
@@ -7,7 +7,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.ti.com/processor-sdk/processor-sdk-linux.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="adde2ca9f86797071f6e7b2b9e779fa5e4a8f3cd"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="f9f6f0db2d5e4f9d2ff46eb31a5a05276a92ed7d"
 BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="am335x-evm am335x-bone am335x-boneblack am335x-bonegreen am335x-evmsk"
-- 
1.9.1

^ permalink raw reply related

* [Buildroot] [PATCH v3 1/1] linuxptp: new package
From: Petr Kulhavy @ 2017-05-15 11:05 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170515114030.0e40ace0@free-electrons.com>

Thanks, Thomas. I have corrected the issues and sent a new version.

Petr

On 15/05/17 11:40, Thomas Petazzoni wrote:
> Hello,
>
> On Mon, 15 May 2017 10:26:29 +0200, Petr Kulhavy wrote:
>> Add the Linux PTP Project package.
>> http://linuxptp.sourceforge.net/
>>
>> The sysV and systemd init scripts start the daemon in automatic mode on eth0.
>>
>> Signed-off-by: Petr Kulhavy <brain@jikos.cz>
> Thanks for this new iteration! A few comments below.
>
>
>>   package/linuxptp/0001-adjtime-fix.patch         | 12 ++++
>>   package/linuxptp/0002-ethhdr-fix.patch          | 10 ++++
>>   package/linuxptp/0003-time_t-fix.patch          | 10 ++++
>>   package/linuxptp/0004-clock_nanosleep-fix.patch | 74 +++++++++++++++++++++++++
>>   package/linuxptp/Config.in                      | 13 +++++
>>   package/linuxptp/S65ptp4l                       | 36 ++++++++++++
> Everything should be named linuxptp.
>
>>   package/linuxptp/linuxptp.hash                  |  2 +
>>   package/linuxptp/linuxptp.mk                    | 38 +++++++++++++
>>   package/linuxptp/ptp4l.service                  | 10 ++++
> Ditto. Please search globally for every occurrence of ptp4l in your
> patch, and fix the different instances to be linuxptp, i.e the name of
> the package.
>
>> diff --git a/package/linuxptp/0001-adjtime-fix.patch b/package/linuxptp/0001-adjtime-fix.patch
>> new file mode 100644
>> index 0000000..a892220
>> --- /dev/null
>> +++ b/package/linuxptp/0001-adjtime-fix.patch
> All patches should have a description + Signed-off-by. Since the
> upstream Linux PTP project uses Git, please create Git formatted
> patches (git format-patch -N).
>
>> +--- linuxptp-1.8/makefile.old	2017-05-15 00:41:33.370113834 +0200
>> ++++ linuxptp-1.8/makefile	2017-05-15 00:41:03.710283744 +0200
>> +@@ -20,7 +20,7 @@
>> + DEBUG	=
>> + CC	= $(CROSS_COMPILE)gcc
>> + VER     = -DVER=$(version)
>> +-CFLAGS	= -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)
>> ++CFLAGS	+= -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)
> How is this related to the clock_nanosleep() issue ?
>
>> diff --git a/package/linuxptp/Config.in b/package/linuxptp/Config.in
>> new file mode 100644
>> index 0000000..7e4a77b
>> --- /dev/null
>> +++ b/package/linuxptp/Config.in
>> @@ -0,0 +1,13 @@
>> +config BR2_PACKAGE_LINUXPTP
>> +	bool "Linux PTP"
> Please use just the name of the package, all lowercase:
>
> 	bool "linuxptp"
>
>> diff --git a/package/linuxptp/S65ptp4l b/package/linuxptp/S65ptp4l
>> new file mode 100755
>> index 0000000..50b9e96
>> --- /dev/null
>> +++ b/package/linuxptp/S65ptp4l
>> @@ -0,0 +1,36 @@
>> +#!/bin/sh
>> +#
>> +# Start ptp4l
> ptp4l -> linuxptp (everywhere).
>
> Thanks!
>
> Thomas

^ permalink raw reply

* [Buildroot] [PATCH v4 1/1] linuxptp: new package
From: Petr Kulhavy @ 2017-05-15 10:25 UTC (permalink / raw)
  To: buildroot

Add the Linux PTP Project package.
http://linuxptp.sourceforge.net/

The sysV and systemd init scripts start the daemon in automatic mode on eth0.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
--
Changes v3 -> v4:
	- rename init scripts to linuxptp
	- use git format of the additional patches
	- use the package name in menuconfig 
	- clean-up the clock_nanosleep patch

Changes v2 -> v3:
	- add patches to fix build issues and enable compilation on all targets

Changes v1 -> v2:
	- rename package from ptp4l to linuxptp
	- add EXTRA_LDFLAGS to the build cmd (suggested by Danomi Manchego)
	- sysV startup script: add restart/reload code, use PID file
	- clean-up empty lines and formatting issues
	- license uses SPDX license code
	- update DEVELOPERS file
---
 DEVELOPERS                                         |  3 +
 package/Config.in                                  |  1 +
 .../linuxptp/0001-Add-missing-time.h-header.patch  | 27 +++++++
 .../0002-Remove-conflicting-netinet-ether.h.patch  | 32 ++++++++
 .../0003-Fix-detection-of-clock_adjtime.patch      | 30 +++++++
 ...0004-Improve-detection-of-clock_nanosleep.patch | 94 ++++++++++++++++++++++
 package/linuxptp/Config.in                         | 13 +++
 package/linuxptp/S65linuxptp                       | 36 +++++++++
 package/linuxptp/linuxptp.hash                     |  2 +
 package/linuxptp/linuxptp.mk                       | 38 +++++++++
 package/linuxptp/linuxptp.service                  | 10 +++
 11 files changed, 286 insertions(+)
 create mode 100644 package/linuxptp/0001-Add-missing-time.h-header.patch
 create mode 100644 package/linuxptp/0002-Remove-conflicting-netinet-ether.h.patch
 create mode 100644 package/linuxptp/0003-Fix-detection-of-clock_adjtime.patch
 create mode 100644 package/linuxptp/0004-Improve-detection-of-clock_nanosleep.patch
 create mode 100644 package/linuxptp/Config.in
 create mode 100755 package/linuxptp/S65linuxptp
 create mode 100644 package/linuxptp/linuxptp.hash
 create mode 100644 package/linuxptp/linuxptp.mk
 create mode 100644 package/linuxptp/linuxptp.service

diff --git a/DEVELOPERS b/DEVELOPERS
index 8fbb69a..524a655 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1267,6 +1267,9 @@ F:	package/sdl2_gfx/
 F:	package/sdl2_image/
 F:	package/sdl2_ttf/
 
+N:	Petr Kulhavy <brain@jikos.cz>
+F:	package/linuxptp/
+
 N:	Petr Vorel <petr.vorel@gmail.com>
 F:	package/linux-backports/
 F:	package/ltp-testsuite/
diff --git a/package/Config.in b/package/Config.in
index d57813c..200ae00 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1597,6 +1597,7 @@ menu "Networking applications"
 	source "package/links/Config.in"
 	source "package/linphone/Config.in"
 	source "package/linux-zigbee/Config.in"
+	source "package/linuxptp/Config.in"
 	source "package/lldpd/Config.in"
 	source "package/lrzsz/Config.in"
 	source "package/macchanger/Config.in"
diff --git a/package/linuxptp/0001-Add-missing-time.h-header.patch b/package/linuxptp/0001-Add-missing-time.h-header.patch
new file mode 100644
index 0000000..35eeb0c
--- /dev/null
+++ b/package/linuxptp/0001-Add-missing-time.h-header.patch
@@ -0,0 +1,27 @@
+From f0288b9b29f7642c8d9dcaa90a382ede2ed7a1c4 Mon Sep 17 00:00:00 2001
+From: Petr Kulhavy <brain@jikos.cz>
+Date: Mon, 15 May 2017 09:34:12 +0200
+Subject: [PATCH] Add missing time.h header
+
+On some targets the time_t structure was missing and the compilation was failing.
+
+Signed-off-by: Petr Kulhavy <brain@jikos.cz>
+---
+ util.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/util.h b/util.h
+index e912f19..3efde5c 100644
+--- a/util.h
++++ b/util.h
+@@ -22,6 +22,7 @@
+ 
+ #include "ddt.h"
+ #include "ether.h"
++#include <time.h>
+ 
+ /**
+  * Table of human readable strings, one for each port state.
+-- 
+2.7.4
+
diff --git a/package/linuxptp/0002-Remove-conflicting-netinet-ether.h.patch b/package/linuxptp/0002-Remove-conflicting-netinet-ether.h.patch
new file mode 100644
index 0000000..28ddb15
--- /dev/null
+++ b/package/linuxptp/0002-Remove-conflicting-netinet-ether.h.patch
@@ -0,0 +1,32 @@
+From 8e8db2a5b90a611be39922694c7bdacbffbabcd5 Mon Sep 17 00:00:00 2001
+From: Petr Kulhavy <brain@jikos.cz>
+Date: Mon, 15 May 2017 09:36:30 +0200
+Subject: [PATCH] Remove conflicting netinet/ether.h
+
+On some platforms like br-arm-cortex-a9-musl struct ethhdr was defined twice
+due to including of both linux/if_ether.h and netinet/ether.h. Which lead
+to a compilation error.
+
+Remove netinet/ether.h as the official header for struct ethhdr is
+linux/if_ether.h
+
+Signed-off-by: Petr Kulhavy <brain@jikos.cz>
+---
+ raw.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/raw.c b/raw.c
+index f51c829..73e45b4 100644
+--- a/raw.c
++++ b/raw.c
+@@ -20,7 +20,6 @@
+ #include <fcntl.h>
+ #include <linux/filter.h>
+ #include <linux/if_ether.h>
+-#include <net/ethernet.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <netpacket/packet.h>
+-- 
+2.7.4
+
diff --git a/package/linuxptp/0003-Fix-detection-of-clock_adjtime.patch b/package/linuxptp/0003-Fix-detection-of-clock_adjtime.patch
new file mode 100644
index 0000000..d646344
--- /dev/null
+++ b/package/linuxptp/0003-Fix-detection-of-clock_adjtime.patch
@@ -0,0 +1,30 @@
+From bb4acc0411667e3250b874d987db502318e25d46 Mon Sep 17 00:00:00 2001
+From: Petr Kulhavy <brain@jikos.cz>
+Date: Mon, 15 May 2017 10:03:53 +0200
+Subject: [PATCH] Fix detection of clock_adjtime
+
+On some platforms clock_adjtime is defined in timex.h instead of time.h
+Due to this fact the detection in incdefs.sh was failing.
+Add timex.h into the list of searched files.
+
+Signed-off-by: Petr Kulhavy <brain@jikos.cz>
+---
+ incdefs.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/incdefs.sh b/incdefs.sh
+index 34e227f..8232b5c 100755
+--- a/incdefs.sh
++++ b/incdefs.sh
+@@ -31,7 +31,7 @@ user_flags()
+ 
+ 	# Look for clock_adjtime().
+ 	for d in $dirs; do
+-		files=$(find $d -type f -name time.h)
++		files=$(find $d -type f -name time.h -o -name timex.h)
+ 		for f in $files; do
+ 			if grep -q clock_adjtime $f; then
+ 				printf " -DHAVE_CLOCK_ADJTIME"
+-- 
+2.7.4
+
diff --git a/package/linuxptp/0004-Improve-detection-of-clock_nanosleep.patch b/package/linuxptp/0004-Improve-detection-of-clock_nanosleep.patch
new file mode 100644
index 0000000..7f106e1
--- /dev/null
+++ b/package/linuxptp/0004-Improve-detection-of-clock_nanosleep.patch
@@ -0,0 +1,94 @@
+From 66ef9389a7f22c922cb3eef3e5b0f85a6abb0345 Mon Sep 17 00:00:00 2001
+From: Petr Kulhavy <brain@jikos.cz>
+Date: Mon, 15 May 2017 10:07:18 +0200
+Subject: [PATCH] Improve detection of clock_nanosleep
+
+On some platforms compilation issues due to clock_nanosleep were occuring. The
+simple test for __uClinux__ was not sufficient.
+
+Implement full detection of clock_nanosleep in incdefs.sh by compiling a short C
+file.  incdefs.sh now sets a new HAVE_CLOCK_NANOSLEEP literal. missing.h is
+changed accordingly.
+
+For proper cross-compilation makefile passes the CC variable to incdefs.sh.
+
+Signed-off-by: Petr Kulhavy <brain@jikos.cz>
+---
+ incdefs.sh | 14 ++++++++++++++
+ makefile   |  2 +-
+ missing.h  | 15 +++++++++------
+ 3 files changed, 24 insertions(+), 7 deletions(-)
+
+diff --git a/incdefs.sh b/incdefs.sh
+index 8232b5c..9a870ac 100755
+--- a/incdefs.sh
++++ b/incdefs.sh
+@@ -40,6 +40,20 @@ user_flags()
+ 		done
+ 	done
+ 
++	# Look for clock_nanosleep().
++	echo '
++#include <time.h>
++
++void test(void)
++{
++        clock_nanosleep(CLOCK_REALTIME, 0, NULL, NULL);
++}
++	' > .incdefs-test.c
++	if ${CC} -c -Werror .incdefs-test.c 2> /dev/null ; then
++		printf " -DHAVE_CLOCK_NANOSLEEP"
++	fi
++	rm -f .incdefs-test.c .incdefs-test.o
++
+ 	# Look for posix_spawn().
+ 	for d in $dirs; do
+ 		files=$(find $d -type f -name spawn.h)
+diff --git a/makefile b/makefile
+index f898336..70d2651 100644
+--- a/makefile
++++ b/makefile
+@@ -33,7 +33,7 @@ OBJECTS	= $(OBJ) hwstamp_ctl.o phc2sys.o phc_ctl.o pmc.o pmc_common.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)
+ 
+diff --git a/missing.h b/missing.h
+index f7efd92..7279ece 100644
+--- a/missing.h
++++ b/missing.h
+@@ -69,18 +69,21 @@ static inline int clock_adjtime(clockid_t id, struct timex *tx)
+ }
+ #endif
+ 
+-#ifndef __uClinux__
+-
+-#include <sys/timerfd.h>
+-
+-#else
+-
++#if !defined ( HAVE_CLOCK_NANOSLEEP ) || defined ( __uClinux__ )
+ static inline int clock_nanosleep(clockid_t clock_id, int flags,
+ 				  const struct timespec *request,
+ 				  struct timespec *remain)
+ {
+ 	return syscall(__NR_clock_nanosleep, clock_id, flags, request, remain);
+ }
++#endif
++
++
++#ifndef __uClinux__
++
++#include <sys/timerfd.h>
++
++#else
+ 
+ static inline int timerfd_create(int clockid, int flags)
+ {
+-- 
+2.7.4
+
diff --git a/package/linuxptp/Config.in b/package/linuxptp/Config.in
new file mode 100644
index 0000000..a5604ed
--- /dev/null
+++ b/package/linuxptp/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LINUXPTP
+	bool "linuxptp"
+	help
+	  The Linux PTP Project is the Precision Time Protocol
+	  implementation according to IEEE standard 1588 for Linux.
+
+	  The dual design goals are to provide a robust implementation
+	  of the standard and to use the most relevant and modern
+	  Application Programming Interfaces (API) offered by the Linux
+	  kernel. Supporting legacy APIs and other platforms is not a
+	  goal.
+
+	  http://linuxptp.sourceforge.net/
diff --git a/package/linuxptp/S65linuxptp b/package/linuxptp/S65linuxptp
new file mode 100755
index 0000000..1ca307c
--- /dev/null
+++ b/package/linuxptp/S65linuxptp
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Start linuxptp
+#
+
+start() {
+	printf "Starting linuxptp: "
+	start-stop-daemon -S -b -q -p /var/run/linuxptp.pid \
+		-x /usr/sbin/ptp4l -- -A -i eth0
+	[ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+
+stop() {
+	printf "Stopping linuxptp: "
+	start-stop-daemon -K -q -p /var/run/linuxptp.pid \
+		-x /usr/sbin/ptp4l
+	echo "OK"
+}
+
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  restart|reload)
+	stop
+	start
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart}"
+	exit 1
+esac
+
+exit $?
diff --git a/package/linuxptp/linuxptp.hash b/package/linuxptp/linuxptp.hash
new file mode 100644
index 0000000..1ac9443
--- /dev/null
+++ b/package/linuxptp/linuxptp.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256	fa8e00f6ec73cefa7bb313dce7f60dfe5eb9e2bde3353594e9ac18edc93e5165  linuxptp-1.8.tgz
diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk
new file mode 100644
index 0000000..ac2b424
--- /dev/null
+++ b/package/linuxptp/linuxptp.mk
@@ -0,0 +1,38 @@
+################################################################################
+#
+# Linux PTP
+#
+################################################################################
+
+LINUXPTP_VERSION = 1.8
+LINUXPTP_SOURCE = linuxptp-$(LINUXPTP_VERSION).tgz
+LINUXPTP_SITE = http://sourceforge.net/projects/linuxptp/files/v$(LINUXPTP_VERSION)
+LINUXPTP_LICENSE = GPL-2.0+
+LINUXPTP_LICENSE_FILES = COPYING
+
+define LINUXPTP_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
+		EXTRA_CFLAGS="$(TARGET_CFLAGS)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
+		CC="$(TARGET_CC)" \
+		-C $(@D) all
+endef
+
+define LINUXPTP_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) prefix=/usr DESTDIR=$(TARGET_DIR) \
+		$(TARGET_CONFIGURE_OPTS) -C $(@D) install
+endef
+
+define LINUXPTP_INSTALL_INIT_SYSV
+	$(INSTALL) -m 755 -D $(@D)/package/linuxptp/S65linuxptp \
+		$(TARGET_DIR)/etc/init.d/S65linuxptp
+endef
+
+define LINUXPTP_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/linuxptp.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -sf ../../../../usr/lib/systemd/system/linuxptp.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/linuxptp.service
+endef
+
+$(eval $(generic-package))
diff --git a/package/linuxptp/linuxptp.service b/package/linuxptp/linuxptp.service
new file mode 100644
index 0000000..ec6bbc5
--- /dev/null
+++ b/package/linuxptp/linuxptp.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Precision Time Protocol daemon
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/ptp4l -A -i eth0
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
-- 
2.7.4

^ permalink raw reply related

* [Buildroot] [git commit branch/2017.02.x] qt5base: fix examples compile with disabled gui module
From: Peter Korsgaard @ 2017-05-15 10:15 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=ff1e2c2c0d3a9e5b806308325585994f43f2c858
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.02.x

Fixes [1]:

  Project ERROR: Could not find feature opengl.

[1] http://autobuild.buildroot.net/results/040/040ab283dbbec623fe5ff4eaece754d9701fafc5

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit 4860e05a63bf01156466a1a8007de38e2839501a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...4-examples-fix-compile-without-gui-module.patch | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch b/package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch
new file mode 100644
index 0000000..148ced8
--- /dev/null
+++ b/package/qt5/qt5base/5.8.0/0004-examples-fix-compile-without-gui-module.patch
@@ -0,0 +1,42 @@
+From fe8a9bacf781fcf290e04a08f2b8e37d881d58bb Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Thu, 27 Apr 2017 22:41:28 +0200
+Subject: [PATCH] examples: fix compile without gui module
+
+Fixes:
+
+  Project ERROR: Could not find feature opengl.
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ examples/gui/gui.pro         | 2 +-
+ examples/widgets/widgets.pro | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/examples/gui/gui.pro b/examples/gui/gui.pro
+index a4d960d3f5..b8080c2075 100644
+--- a/examples/gui/gui.pro
++++ b/examples/gui/gui.pro
+@@ -6,5 +6,5 @@ CONFIG += no_docs_target
+ 
+ SUBDIRS += analogclock
+ SUBDIRS += rasterwindow
+-qtConfig(opengl): \
++qtHaveModule(gui):qtConfig(opengl): \
+     SUBDIRS += openglwindow
+diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro
+index 513ddc91f2..cef4936d32 100644
+--- a/examples/widgets/widgets.pro
++++ b/examples/widgets/widgets.pro
+@@ -22,7 +22,7 @@ SUBDIRS       = \
+                 tutorials \
+                 widgets
+ 
+-qtConfig(opengl): \
++qtHaveModule(gui):qtConfig(opengl): \
+     SUBDIRS += windowcontainer
+ 
+ contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows
+-- 
+2.11.0
+

^ permalink raw reply related

* [Buildroot] [PATCH 1/1] libqmi: move canonicalize_file_name()
From: Vicente Olivert Riera @ 2017-05-15  9:59 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1494815160-53868-1-git-send-email-matthew.weber@rockwellcollins.com>

Hello Matt,

On 15/05/17 03:26, Matt Weber wrote:
> Previously was defined in qmi-util.h to fix musl
> compatibility.  It was missed that this is a shared
> header which causes other dependent package builds
> to fail, so the static definition was moved into the
> implementation where it was used.
> 
> Upstream bug report has been updated and this resolves
> the following autobuilder related failures.
> 
>  http://autobuild.buildroot.net/results/fe9b6b1b1399a4e8aafc6a326c81ec97c2480025
>  http://autobuild.buildroot.net/results/40eef797b4d8d53fc6e10f2048316d63549caf6d
> 
> test-pkg testing was performed against 10 random toolchains
> 
> ++ Config snippet ++
> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
> BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y
> BR2_PACKAGE_MODEM_MANAGER=y
> BR2_PACKAGE_LIBQMI=y
> 
> ++ Tested Toolchains ++ (Verified I hit all libc varients)
> br-arm-cortex-a9-musl
> br-arm-full-static
> br-m68k-68040-full    (uclibc)
> br-mips32r6-el-hf-glibc
> br-mips64-n64-full
> br-mips64r6-el-hf-glibc
> br-mipsel-o32-full
> br-sparc64-glibc
> linaro-arm
> sourcery-arm
> 
> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Tested with the following defconfig which was failing before this patch:

BR2_mipsel=y
BR2_mips_32r2=y
# BR2_MIPS_SOFT_FLOAT is not set
BR2_TOOLCHAIN_EXTERNAL=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_MODEM_MANAGER=y
BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y
# BR2_TARGET_ROOTFS_TAR is not set

Regards,

Vincent

> ---
>  .../0001-musl-compat-canonicalize_file_name.patch  | 37 +++++++++++-----------
>  1 file changed, 18 insertions(+), 19 deletions(-)
> 
> diff --git a/package/libqmi/0001-musl-compat-canonicalize_file_name.patch b/package/libqmi/0001-musl-compat-canonicalize_file_name.patch
> index fd606d8..3ae1c2e 100644
> --- a/package/libqmi/0001-musl-compat-canonicalize_file_name.patch
> +++ b/package/libqmi/0001-musl-compat-canonicalize_file_name.patch
> @@ -1,22 +1,24 @@
> -From 85863c9e051fe59add4e47dbfcb37072234f0110 Mon Sep 17 00:00:00 2001
> +From 8f6181b6f8dd82aa1ab1288cc7f2fd05d4a2519f Mon Sep 17 00:00:00 2001
>  From: Matt Weber <matthew.weber@rockwellcollins.com>
>  Date: Mon, 1 May 2017 19:55:07 -0500
>  Subject: [PATCH] musl compat canonicalize_file_name()
>  
> -Adds an inline equivalent of canonicalize_file_name
> +Adds an equivalent of canonicalize_file_name
>  using realpath().
>  
>  Bug report (origin of this patch):
>  https://bugs.freedesktop.org/show_bug.cgi?id=99944
>  
> +Bug report has been updated with suggestion to not use inline.
> +
>  Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
>  ---
>   configure.ac                |  2 ++
> - src/libqmi-glib/qmi-utils.h | 18 ++++++++++++++++++
> - 2 files changed, 20 insertions(+)
> + src/libqmi-glib/qmi-utils.c | 15 +++++++++++++++
> + 2 files changed, 17 insertions(+)
>  
>  diff --git a/configure.ac b/configure.ac
> -index 162d5ae..9cb82fd 100644
> +index c56fa3e..d835db4 100644
>  --- a/configure.ac
>  +++ b/configure.ac
>  @@ -80,6 +80,8 @@ AC_SUBST(GLIB_LIBS)
> @@ -28,19 +30,16 @@ index 162d5ae..9cb82fd 100644
>   dnl qmi-firmware-update is optional, enabled by default
>   AC_ARG_ENABLE([firmware-update],
>                 AS_HELP_STRING([--enable-firmware-update],
> -diff --git a/src/libqmi-glib/qmi-utils.h b/src/libqmi-glib/qmi-utils.h
> -index 4fd5199..4869da5 100644
> ---- a/src/libqmi-glib/qmi-utils.h
> -+++ b/src/libqmi-glib/qmi-utils.h
> -@@ -29,6 +29,24 @@
> - #error "Only <libqmi-glib.h> can be included directly."
> - #endif
> +diff --git a/src/libqmi-glib/qmi-utils.c b/src/libqmi-glib/qmi-utils.c
> +index 29e5f22..26aff9e 100644
> +--- a/src/libqmi-glib/qmi-utils.c
> ++++ b/src/libqmi-glib/qmi-utils.c
> +@@ -34,6 +34,21 @@
> + #include "qmi-utils.h"
> + #include "qmi-error-types.h"
>   
>  +#ifndef HAVE_CANONICALIZE_FILE_NAME
>  +#include <limits.h>
> -+#include <string.h>
> -+#include <stdlib.h>
> -+#include <stdio.h>
>  +static char * canonicalize_file_name(const char *path)
>  +{
>  +       char buf[PATH_MAX] = { };
> @@ -54,9 +53,9 @@ index 4fd5199..4869da5 100644
>  +}
>  +#endif
>  +
> - #include <glib.h>
> - 
> - G_BEGIN_DECLS
> + /**
> +  * SECTION:qmi-utils
> +  * @title: Common utilities
>  -- 
> -2.7.4
> +1.9.1
>  
> 

^ permalink raw reply

* [Buildroot] [PATCH] package/ltp-testsuite: needs threads NPTL
From: Peter Korsgaard @ 2017-05-15  9:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170507122324.31452-1-romain.naour@gmail.com>

>>>>> "Romain" == Romain Naour <romain.naour@gmail.com> writes:

 > Fixes:
 > http://autobuild.buildroot.net/results/3e0/3e0bbf41e339e62422463773bf07945f048a9501

 > Signed-off-by: Romain Naour <romain.naour@gmail.com>

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit branch/2017.02.x] package/ltp-testsuite: needs threads NPTL
From: Peter Korsgaard @ 2017-05-15  9:46 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=21724ff539da1be1788171fe7df216d300b6d228
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.02.x

Fixes:
http://autobuild.buildroot.net/results/3e0/3e0bbf41e339e62422463773bf07945f048a9501

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit 362d185b309a1634901d4cb35bc1778d58e2015a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/ltp-testsuite/Config.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/ltp-testsuite/Config.in b/package/ltp-testsuite/Config.in
index 274b03e..60e1922 100644
--- a/package/ltp-testsuite/Config.in
+++ b/package/ltp-testsuite/Config.in
@@ -5,7 +5,7 @@ comment "ltp-testsuite needs specific uClibc options, see help"
 config BR2_PACKAGE_LTP_TESTSUITE
 	bool "ltp-testsuite"
 	depends on BR2_USE_MMU # fork()
-	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on !BR2_TOOLCHAIN_USES_MUSL
 	select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	# does not build, cachectl.h issue
@@ -22,7 +22,7 @@ config BR2_PACKAGE_LTP_TESTSUITE
 
 	  http://linux-test-project.github.io
 
-comment "ltp-testsuite needs a glibc or uClibc toolchain w/ threads"
+comment "ltp-testsuite needs a glibc or uClibc toolchain w/ NPTL"
 	depends on !BR2_nios2
 	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_MUSL
+	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_TOOLCHAIN_USES_MUSL

^ permalink raw reply related

* [Buildroot] [PATCH] package/libubox: fix lua module install path
From: Peter Korsgaard @ 2017-05-15  9:45 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170506202610.19962-1-yann.morin.1998@free.fr>

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > The LUAPATH variable is only used when installing the lua module, and
 > cmake knows very well how to do out-of-tree isntalls, so there is no
 > reason to include the staging path in LUAPATH, which will cause our
 > post-install sanity checks to kick in and whine:

 >     libubox: installs files in /home/lhk/workspace/orangepi/host/usr/a
 >     rm-buildroot-linux-gnueabihf/sysroot//home/lhk/workspace/orangepi

 > As for libuci, just pass the runtime LUAPATH.

 > Fixes #9856

 > Reported-by: linhuikui at gmail.com
 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Yegor Yefremov <yegorslists@googlemail.com>

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit branch/2017.02.x] package/libubox: fix lua module install path
From: Peter Korsgaard @ 2017-05-15  9:44 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=f1d4f33bab7a6780b19f48482f53e8619b399799
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.02.x

The LUAPATH variable is only used when installing the lua module, and
cmake knows very well how to do out-of-tree isntalls, so there is no
reason to include the staging path in LUAPATH, which will cause our
post-install sanity checks to kick in and whine:

    libubox: installs files in /home/lhk/workspace/orangepi/host/usr/a
    rm-buildroot-linux-gnueabihf/sysroot//home/lhk/workspace/orangepi

As for libuci, just pass the runtime LUAPATH.

Fixes #9856

Reported-by: linhuikui at gmail.com
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(cherry picked from commit be3645a58ad1ee3961c4da1b2f72f5835629303a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/libubox/libubox.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libubox/libubox.mk b/package/libubox/libubox.mk
index 00392c3..2bde25f 100644
--- a/package/libubox/libubox.mk
+++ b/package/libubox/libubox.mk
@@ -13,7 +13,7 @@ LIBUBOX_DEPENDENCIES = $(if $(BR2_PACKAGE_JSON_C),json-c)
 ifeq ($(BR2_USE_MMU)$(BR2_PACKAGE_LUA_5_1),yy)
 LIBUBOX_DEPENDENCIES += lua
 LIBUBOX_CONF_OPTS += -DBUILD_LUA=ON \
-	-DLUAPATH=$(STAGING_DIR)/usr/lib/lua/5.1 \
+	-DLUAPATH=/usr/lib/lua/5.1 \
 	-DLUA_CFLAGS=-I$(STAGING_DIR)/usr/include
 else
 LIBUBOX_CONF_OPTS += -DBUILD_LUA=OFF

^ permalink raw reply related

* [Buildroot] [PATCH 1/1] dbus: fix dbus symlink removal
From: Peter Korsgaard @ 2017-05-15  9:43 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1494031878-2982-1-git-send-email-danomimanchego123@gmail.com>

>>>>> "Danomi" == Danomi Manchego <danomimanchego123@gmail.com> writes:

 > There was already a post-build hook to delete the /var/lib/dbus symlink
 > created by buildroot after the package's own installation, to prevent
 > a dbus installation error during "make dbus-rebuild".  However, this
 > misses the case for when one might delete the .stamp_target_installed
 > file manually, outside of dbus-rebuild.  This can be fixed by changing
 > the post-build hook to a pre-install hook.  This seems appropriate,
 > since it is really addressing an installation issue, not a build issue.

 > Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit branch/2017.02.x] dbus: fix dbus symlink removal
From: Peter Korsgaard @ 2017-05-15  9:43 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=3858b49e9302789bf70b7e49a69982a4c4a61162
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.02.x

There was already a post-build hook to delete the /var/lib/dbus symlink
created by buildroot after the package's own installation, to prevent
a dbus installation error during "make dbus-rebuild".  However, this
misses the case for when one might delete the .stamp_target_installed
file manually, outside of dbus-rebuild.  This can be fixed by changing
the post-build hook to a pre-install hook.  This seems appropriate,
since it is really addressing an installation issue, not a build issue.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit c2d6c4ac3277e545ef27b3d4f3e6d94e50d76256)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/dbus/dbus.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk
index 2d1583e..66b90bc 100644
--- a/package/dbus/dbus.mk
+++ b/package/dbus/dbus.mk
@@ -82,7 +82,7 @@ define DBUS_REMOVE_VAR_LIB_DBUS
 	rm -rf $(TARGET_DIR)/var/lib/dbus
 endef
 
-DBUS_POST_BUILD_HOOKS += DBUS_REMOVE_VAR_LIB_DBUS
+DBUS_PRE_INSTALL_TARGET_HOOKS += DBUS_REMOVE_VAR_LIB_DBUS
 
 define DBUS_REMOVE_DEVFILES
 	rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0

^ permalink raw reply related

* [Buildroot] [PATCH] package/kyua: fix unmet dependencies
From: Peter Korsgaard @ 2017-05-15  9:42 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170505190826.11902-1-yann.morin.1998@free.fr>

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > lutok is a lua module, so it depends on ! static libs. However, the
 > dependency is implicit, being done because the lua modules are sourced
 > globally under an if-block, and thus it is not easy to find that
 > dependency.

 > Propagate that dependency to kyua, which was missing it (because it is
 > not a lua module, so was missing the dependency).

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit branch/2017.02.x] package/kyua: fix unmet dependencies
From: Peter Korsgaard @ 2017-05-15  9:41 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=6df3dc343fd908f246c319782442282b71be89c0
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2017.02.x

lutok is a lua module, so it depends on ! static libs. However, the
dependency is implicit, being done because the lua modules are sourced
globally under an if-block, and thus it is not easy to find that
dependency.

Propagate that dependency to kyua, which was missing it (because it is
not a lua module, so was missing the dependency).

[Peter: also update toolchain comment]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

(cherry picked from commit a65da16f630cea87fd0527ce73df0b529b73946c)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/kyua/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/kyua/Config.in b/package/kyua/Config.in
index 4f887b0..4fc5e09 100644
--- a/package/kyua/Config.in
+++ b/package/kyua/Config.in
@@ -3,6 +3,7 @@ config BR2_PACKAGE_KYUA
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_PACKAGE_HAS_LUAINTERPRETER # lutok
 	depends on !BR2_PACKAGE_LUAJIT # lutok
+	depends on !BR2_STATIC_LIBS # lutok
 	depends on BR2_USE_MMU # atf
 	select BR2_PACKAGE_ATF
 	select BR2_PACKAGE_LUTOK
@@ -16,7 +17,7 @@ config BR2_PACKAGE_KYUA
 
 	  https://github.com/jmmv/kyua
 
-comment "kyua needs a toolchain w/ C++ and full Lua"
-	depends on !BR2_INSTALL_LIBSTDCPP || BR2_PACKAGE_LUAJIT
+comment "kyua needs a toolchain w/ C++, dynamic library and full Lua"
+	depends on !BR2_INSTALL_LIBSTDCPP || BR2_PACKAGE_LUAJIT || BR2_STATIC_LIBS
 	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	depends on BR2_USE_MMU

^ permalink raw reply related

* [Buildroot] [PATCH 1/1] Add separate genimage.cfg for beaglebone qt5
From: Lothar Felten @ 2017-05-15  9:41 UTC (permalink / raw)
  To: buildroot

The beaglebone_qt5_defconfig uses an older kernel version which does not
provide a devce tree for the beagle bone green.
post-image selects genimage_qt5.cfg for beaglebone_qt5_defconfig, genimage.cfg
otherwise

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 board/beaglebone/genimage_qt5.cfg | 32 ++++++++++++++++++++++++++++++++
 board/beaglebone/post-image.sh    | 10 +++++++++-
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 board/beaglebone/genimage_qt5.cfg

diff --git a/board/beaglebone/genimage_qt5.cfg b/board/beaglebone/genimage_qt5.cfg
new file mode 100644
index 0000000..ba60297
--- /dev/null
+++ b/board/beaglebone/genimage_qt5.cfg
@@ -0,0 +1,32 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"MLO",
+			"u-boot.img",
+			"zImage",
+			"uEnv.txt",
+			"am335x-evm.dtb",
+			"am335x-evmsk.dtb",
+			"am335x-bone.dtb",
+			"am335x-boneblack.dtb",
+		}
+	}
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+		bootable = "true"
+                image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 512M
+	}
+}
diff --git a/board/beaglebone/post-image.sh b/board/beaglebone/post-image.sh
index f0c2bc7..bfc41f2 100755
--- a/board/beaglebone/post-image.sh
+++ b/board/beaglebone/post-image.sh
@@ -8,7 +8,15 @@ BOARD_DIR="$(dirname $0)"
 # copy the uEnv.txt to the output/images directory
 cp board/beaglebone/uEnv.txt $BINARIES_DIR/uEnv.txt
 
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+# the qt5 defconfig does not provide a dt for beaglebone green
+# check if the qt5_defconfig was used:
+DEFCONFIG=$(grep BR2_DEFCONFIG ${BR2_CONFIG})
+
+case $DEFCONFIG in
+	*beaglebone_qt5_defconfig*) GENIMAGE_CFG="${BOARD_DIR}/genimage_qt5.cfg";;
+	*) GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg";;
+esac
+
 GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
 
 rm -rf "${GENIMAGE_TMP}"
-- 
1.9.1

^ permalink raw reply related

* [Buildroot] [PATCH v3 1/1] linuxptp: new package
From: Thomas Petazzoni @ 2017-05-15  9:40 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1494836789-26058-1-git-send-email-brain@jikos.cz>

Hello,

On Mon, 15 May 2017 10:26:29 +0200, Petr Kulhavy wrote:
> Add the Linux PTP Project package.
> http://linuxptp.sourceforge.net/
> 
> The sysV and systemd init scripts start the daemon in automatic mode on eth0.
> 
> Signed-off-by: Petr Kulhavy <brain@jikos.cz>

Thanks for this new iteration! A few comments below.


>  package/linuxptp/0001-adjtime-fix.patch         | 12 ++++
>  package/linuxptp/0002-ethhdr-fix.patch          | 10 ++++
>  package/linuxptp/0003-time_t-fix.patch          | 10 ++++
>  package/linuxptp/0004-clock_nanosleep-fix.patch | 74 +++++++++++++++++++++++++
>  package/linuxptp/Config.in                      | 13 +++++
>  package/linuxptp/S65ptp4l                       | 36 ++++++++++++

Everything should be named linuxptp.

>  package/linuxptp/linuxptp.hash                  |  2 +
>  package/linuxptp/linuxptp.mk                    | 38 +++++++++++++
>  package/linuxptp/ptp4l.service                  | 10 ++++

Ditto. Please search globally for every occurrence of ptp4l in your
patch, and fix the different instances to be linuxptp, i.e the name of
the package.

> diff --git a/package/linuxptp/0001-adjtime-fix.patch b/package/linuxptp/0001-adjtime-fix.patch
> new file mode 100644
> index 0000000..a892220
> --- /dev/null
> +++ b/package/linuxptp/0001-adjtime-fix.patch

All patches should have a description + Signed-off-by. Since the
upstream Linux PTP project uses Git, please create Git formatted
patches (git format-patch -N).

> +--- linuxptp-1.8/makefile.old	2017-05-15 00:41:33.370113834 +0200
> ++++ linuxptp-1.8/makefile	2017-05-15 00:41:03.710283744 +0200
> +@@ -20,7 +20,7 @@
> + DEBUG	=
> + CC	= $(CROSS_COMPILE)gcc
> + VER     = -DVER=$(version)
> +-CFLAGS	= -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)
> ++CFLAGS	+= -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)

How is this related to the clock_nanosleep() issue ?

> diff --git a/package/linuxptp/Config.in b/package/linuxptp/Config.in
> new file mode 100644
> index 0000000..7e4a77b
> --- /dev/null
> +++ b/package/linuxptp/Config.in
> @@ -0,0 +1,13 @@
> +config BR2_PACKAGE_LINUXPTP
> +	bool "Linux PTP"

Please use just the name of the package, all lowercase:

	bool "linuxptp"

> diff --git a/package/linuxptp/S65ptp4l b/package/linuxptp/S65ptp4l
> new file mode 100755
> index 0000000..50b9e96
> --- /dev/null
> +++ b/package/linuxptp/S65ptp4l
> @@ -0,0 +1,36 @@
> +#!/bin/sh
> +#
> +# Start ptp4l

ptp4l -> linuxptp (everywhere).

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply

* [Buildroot] [PATCH] package/boost: disable boost-locale for static only build
From: Yegor Yefremov @ 2017-05-15  8:30 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170515091516.0b3e6112@free-electrons.com>

Hi Romain,

On Mon, May 15, 2017 at 9:15 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Sun, 14 May 2017 23:45:56 +0200, Romain Naour wrote:
>
>> diff --git a/package/boost/Config.in b/package/boost/Config.in
>> index 9825c09..6ffa8f0 100644
>> --- a/package/boost/Config.in
>> +++ b/package/boost/Config.in
>> @@ -98,8 +98,15 @@ config BR2_PACKAGE_BOOST_IOSTREAMS
>>
>>  config BR2_PACKAGE_BOOST_LOCALE
>>       bool "boost-locale"
>> +     # boost-locale build system try to link dynamically with icu
>> +     # see <link>shared and <runtime-link>shared in locale/build/Jamfile.v2
>> +     # Related to https://svn.boost.org/trac/boost/ticket/9685
>> +     depends on !BR2_STATIC_LIBS
>>       select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
>
> OK, but doesn't the problem occurs only when icu is enabled? Do we want
> to prevent from using boost-locale in static linking situations in all
> cases, or only when combined with icu?
>
> Perhaps we should keep it simple and do like you suggest, i.e make it
> unavailable for all static linking configurations, regardless of icu
> availability. I'm just trying to figure out the best/right approach
> between yours and the one proposed by Yegor.

Have you also tested regex module? It seems to have the same
structure/dependencies as locale module.

Yegor

^ permalink raw reply

* [Buildroot] [PATCH v3 1/1] linuxptp: new package
From: Petr Kulhavy @ 2017-05-15  8:26 UTC (permalink / raw)
  To: buildroot

Add the Linux PTP Project package.
http://linuxptp.sourceforge.net/

The sysV and systemd init scripts start the daemon in automatic mode on eth0.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
--
Changes v2 -> v3:
	- add patches to fix build issues and enable compilation on all targets

Changes v1 -> v2:
	- rename package from ptp4l to linuxptp
	- add EXTRA_LDFLAGS to the build cmd (suggested by Danomi Manchego)
	- sysV startup script: add restart/reload code, use PID file
	- clean-up empty lines and formatting issues
	- license uses SPDX license code
	- update DEVELOPERS file
---
 DEVELOPERS                                      |  3 +
 package/Config.in                               |  1 +
 package/linuxptp/0001-adjtime-fix.patch         | 12 ++++
 package/linuxptp/0002-ethhdr-fix.patch          | 10 ++++
 package/linuxptp/0003-time_t-fix.patch          | 10 ++++
 package/linuxptp/0004-clock_nanosleep-fix.patch | 74 +++++++++++++++++++++++++
 package/linuxptp/Config.in                      | 13 +++++
 package/linuxptp/S65ptp4l                       | 36 ++++++++++++
 package/linuxptp/linuxptp.hash                  |  2 +
 package/linuxptp/linuxptp.mk                    | 38 +++++++++++++
 package/linuxptp/ptp4l.service                  | 10 ++++
 11 files changed, 209 insertions(+)
 create mode 100644 package/linuxptp/0001-adjtime-fix.patch
 create mode 100644 package/linuxptp/0002-ethhdr-fix.patch
 create mode 100644 package/linuxptp/0003-time_t-fix.patch
 create mode 100644 package/linuxptp/0004-clock_nanosleep-fix.patch
 create mode 100644 package/linuxptp/Config.in
 create mode 100755 package/linuxptp/S65ptp4l
 create mode 100644 package/linuxptp/linuxptp.hash
 create mode 100644 package/linuxptp/linuxptp.mk
 create mode 100644 package/linuxptp/ptp4l.service

diff --git a/DEVELOPERS b/DEVELOPERS
index 8fbb69a..524a655 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1267,6 +1267,9 @@ F:	package/sdl2_gfx/
 F:	package/sdl2_image/
 F:	package/sdl2_ttf/
 
+N:	Petr Kulhavy <brain@jikos.cz>
+F:	package/linuxptp/
+
 N:	Petr Vorel <petr.vorel@gmail.com>
 F:	package/linux-backports/
 F:	package/ltp-testsuite/
diff --git a/package/Config.in b/package/Config.in
index d57813c..200ae00 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1597,6 +1597,7 @@ menu "Networking applications"
 	source "package/links/Config.in"
 	source "package/linphone/Config.in"
 	source "package/linux-zigbee/Config.in"
+	source "package/linuxptp/Config.in"
 	source "package/lldpd/Config.in"
 	source "package/lrzsz/Config.in"
 	source "package/macchanger/Config.in"
diff --git a/package/linuxptp/0001-adjtime-fix.patch b/package/linuxptp/0001-adjtime-fix.patch
new file mode 100644
index 0000000..a892220
--- /dev/null
+++ b/package/linuxptp/0001-adjtime-fix.patch
@@ -0,0 +1,12 @@
+diff -u linuxptp-1.8.old/incdefs.sh linuxptp-1.8/incdefs.sh
+--- linuxptp-1.8.old/incdefs.sh	2017-05-14 22:19:25.526966749 +0200
++++ linuxptp-1.8/incdefs.sh	2017-05-14 22:22:19.185971919 +0200
+@@ -31,7 +31,7 @@
+ 
+ 	# Look for clock_adjtime().
+ 	for d in $dirs; do
+-		files=$(find $d -type f -name time.h)
++		files=$(find $d -type f -name time.h -o -name timex.h)
+ 		for f in $files; do
+ 			if grep -q clock_adjtime $f; then
+ 				printf " -DHAVE_CLOCK_ADJTIME"
diff --git a/package/linuxptp/0002-ethhdr-fix.patch b/package/linuxptp/0002-ethhdr-fix.patch
new file mode 100644
index 0000000..127384e
--- /dev/null
+++ b/package/linuxptp/0002-ethhdr-fix.patch
@@ -0,0 +1,10 @@
+--- linuxptp-1.8/raw.c.old	2016-11-04 19:38:56.000000000 +0100
++++ linuxptp-1.8/raw.c	2017-05-14 17:55:20.653736273 +0200
+@@ -20,7 +20,6 @@
+ #include <fcntl.h>
+ #include <linux/filter.h>
+ #include <linux/if_ether.h>
+-#include <net/ethernet.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <netpacket/packet.h>
diff --git a/package/linuxptp/0003-time_t-fix.patch b/package/linuxptp/0003-time_t-fix.patch
new file mode 100644
index 0000000..3fbc99b
--- /dev/null
+++ b/package/linuxptp/0003-time_t-fix.patch
@@ -0,0 +1,10 @@
+--- linuxptp-1.8/util.h.old	2017-05-14 17:22:52.228898091 +0200
++++ linuxptp-1.8/util.h	2017-05-14 17:23:15.988761979 +0200
+@@ -22,6 +22,7 @@
+ 
+ #include "ddt.h"
+ #include "ether.h"
++#include <time.h>
+ 
+ /**
+  * Table of human readable strings, one for each port state.
diff --git a/package/linuxptp/0004-clock_nanosleep-fix.patch b/package/linuxptp/0004-clock_nanosleep-fix.patch
new file mode 100644
index 0000000..c463293
--- /dev/null
+++ b/package/linuxptp/0004-clock_nanosleep-fix.patch
@@ -0,0 +1,74 @@
+diff -u -r linuxptp-1.8.old/incdefs.sh linuxptp-1.8/incdefs.sh
+--- linuxptp-1.8.old/incdefs.sh	2017-05-14 20:17:19.724933608 +0200
++++ linuxptp-1.8/incdefs.sh	2017-05-14 20:18:15.440614433 +0200
+@@ -40,6 +40,20 @@
+ 		done
+ 	done
+ 
++	# Look for clock_nanosleep().
++	echo '
++#include <time.h>
++
++void test(void)
++{
++        clock_nanosleep(CLOCK_REALTIME, 0, NULL, NULL);
++}
++	' > .incdefs-test.c
++	if ${CC} -c -Werror .incdefs-test.c 2> /dev/null ; then
++		printf " -DHAVE_CLOCK_NANOSLEEP"
++	fi
++	rm -f .incdefs-test.c .incdefs-test.o
++
+ 	# Look for posix_spawn().
+ 	for d in $dirs; do
+ 		files=$(find $d -type f -name spawn.h)
+--- linuxptp-1.8/missing.h.old	2017-05-14 22:58:55.000000000 +0200
++++ linuxptp-1.8/missing.h	2017-05-14 23:01:09.964619736 +0200
+@@ -69,18 +69,21 @@
+ }
+ #endif
+ 
+-#ifndef __uClinux__
+-
+-#include <sys/timerfd.h>
+-
+-#else
+-
++#if !defined ( HAVE_CLOCK_NANOSLEEP ) || defined ( __uClinux__ )
+ static inline int clock_nanosleep(clockid_t clock_id, int flags,
+ 				  const struct timespec *request,
+ 				  struct timespec *remain)
+ {
+ 	return syscall(__NR_clock_nanosleep, clock_id, flags, request, remain);
+ }
++#endif
++
++
++#ifndef __uClinux__
++
++#include <sys/timerfd.h>
++
++#else
+ 
+ static inline int timerfd_create(int clockid, int flags)
+ {
+--- linuxptp-1.8/makefile.old	2017-05-15 00:41:33.370113834 +0200
++++ linuxptp-1.8/makefile	2017-05-15 00:41:03.710283744 +0200
+@@ -20,7 +20,7 @@
+ DEBUG	=
+ CC	= $(CROSS_COMPILE)gcc
+ VER     = -DVER=$(version)
+-CFLAGS	= -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)
++CFLAGS	+= -Wall $(VER) $(incdefs) $(DEBUG) $(EXTRA_CFLAGS)
+ LDLIBS	= -lm -lrt $(EXTRA_LDFLAGS)
+ PRG	= ptp4l pmc phc2sys hwstamp_ctl phc_ctl timemaster
+ OBJ     = bmc.o clock.o clockadj.o clockcheck.o config.o fault.o \
+@@ -33,7 +33,7 @@
+ 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)
+ 
diff --git a/package/linuxptp/Config.in b/package/linuxptp/Config.in
new file mode 100644
index 0000000..7e4a77b
--- /dev/null
+++ b/package/linuxptp/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LINUXPTP
+	bool "Linux PTP"
+	help
+	  The Linux PTP Project is the Precision Time Protocol
+	  implementation according to IEEE standard 1588 for Linux.
+
+	  The dual design goals are to provide a robust implementation
+	  of the standard and to use the most relevant and modern
+	  Application Programming Interfaces (API) offered by the Linux
+	  kernel. Supporting legacy APIs and other platforms is not a
+	  goal.
+
+	  http://linuxptp.sourceforge.net/
diff --git a/package/linuxptp/S65ptp4l b/package/linuxptp/S65ptp4l
new file mode 100755
index 0000000..50b9e96
--- /dev/null
+++ b/package/linuxptp/S65ptp4l
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Start ptp4l
+#
+
+start() {
+	printf "Starting ptp4l: "
+	start-stop-daemon -S -b -q -p /var/run/ptp4l.pid \
+		-x /usr/sbin/ptp4l -- -A -i eth0
+	[ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+
+stop() {
+	printf "Stopping ptp4l: "
+	start-stop-daemon -K -q -p /var/run/ptp4l.pid \
+		-x /usr/sbin/ptp4l
+	echo "OK"
+}
+
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  restart|reload)
+	stop
+	start
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart}"
+	exit 1
+esac
+
+exit $?
diff --git a/package/linuxptp/linuxptp.hash b/package/linuxptp/linuxptp.hash
new file mode 100644
index 0000000..1ac9443
--- /dev/null
+++ b/package/linuxptp/linuxptp.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256	fa8e00f6ec73cefa7bb313dce7f60dfe5eb9e2bde3353594e9ac18edc93e5165  linuxptp-1.8.tgz
diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk
new file mode 100644
index 0000000..6f8094a
--- /dev/null
+++ b/package/linuxptp/linuxptp.mk
@@ -0,0 +1,38 @@
+################################################################################
+#
+# Linux PTP
+#
+################################################################################
+
+LINUXPTP_VERSION = 1.8
+LINUXPTP_SOURCE = linuxptp-$(LINUXPTP_VERSION).tgz
+LINUXPTP_SITE = http://sourceforge.net/projects/linuxptp/files/v$(LINUXPTP_VERSION)
+LINUXPTP_LICENSE = GPL-2.0+
+LINUXPTP_LICENSE_FILES = COPYING
+
+define LINUXPTP_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) KBUILD_OUTPUT=$(TARGET_DIR) \
+		EXTRA_CFLAGS="$(TARGET_CFLAGS)" EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
+		CC="$(TARGET_CC)" \
+		-C $(@D) all
+endef
+
+define LINUXPTP_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) prefix=/usr DESTDIR=$(TARGET_DIR) \
+		$(TARGET_CONFIGURE_OPTS) -C $(@D) install
+endef
+
+define LINUXPTP_INSTALL_INIT_SYSV
+	$(INSTALL) -m 755 -D $(@D)/package/linuxptp/S65ptp4l \
+		$(TARGET_DIR)/etc/init.d/S65ptp4l
+endef
+
+define LINUXPTP_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/ptp4l.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/ptp4l.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -sf ../../../../usr/lib/systemd/system/ptp4l.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ptp4l.service
+endef
+
+$(eval $(generic-package))
diff --git a/package/linuxptp/ptp4l.service b/package/linuxptp/ptp4l.service
new file mode 100644
index 0000000..ec6bbc5
--- /dev/null
+++ b/package/linuxptp/ptp4l.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Precision Time Protocol daemon
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/ptp4l -A -i eth0
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
-- 
2.7.4

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox