Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] rtmpdump: security bump to current HEAD
From: Thomas Petazzoni @ 2017-05-16  7:25 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=4ebd2fa277fdffecca146d07c78954653517eff4
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes:

- CVE-2015-8271: The AMF3CD_AddProp function in amf.c in RTMPDump 2.4 allows
  remote RTMP Media servers to execute arbitrary code
  https://www.talosintelligence.com/reports/TALOS-2016-0067/

- CVE-2015-8272: RTMPDump 2.4 allows remote attackers to trigger a denial of
  service (NULL pointer dereference and process crash).
  https://www.talosintelligence.com/reports/TALOS-2016-0068/

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/rtmpdump/rtmpdump.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/rtmpdump/rtmpdump.mk b/package/rtmpdump/rtmpdump.mk
index 19d9b04..f5d430c 100644
--- a/package/rtmpdump/rtmpdump.mk
+++ b/package/rtmpdump/rtmpdump.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-RTMPDUMP_VERSION = a107cef9b392616dff54fabfd37f985ee2190a6f
+RTMPDUMP_VERSION = fa8646daeb19dfd12c181f7d19de708d623704c0
 RTMPDUMP_SITE = git://git.ffmpeg.org/rtmpdump
 RTMPDUMP_INSTALL_STAGING = YES
 # Note that rtmpdump is GPL-2.0 but librtmp has its own license and since we only

^ permalink raw reply related

* [Buildroot] [git commit] git: security bump to version 2.12.3
From: Thomas Petazzoni @ 2017-05-16  7:25 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=4a146b933e7ab9c6d1b353f61a610c69bc95bc55
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes CVE-2017-8386 - Git Shell Bypass By Abusing Less

For more details, see:
https://insinuator.net/2017/05/git-shell-bypass-by-abusing-less-cve-2017-8386/
http://www.mail-archive.com/git at vger.kernel.org/msg120982.html

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/git/git.hash | 2 +-
 package/git/git.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/git/git.hash b/package/git/git.hash
index 9af360e..4782dcb 100644
--- a/package/git/git.hash
+++ b/package/git/git.hash
@@ -1,2 +1,2 @@
 # From: https://www.kernel.org/pub/software/scm/git/sha256sums.asc
-sha256 d21a9e23506e618d561fb25a8a7bd6134f927b86147930103487117a7a678c4a  git-2.12.2.tar.xz
+sha256 016124c54ce2db7a4c2bd26b0de21fbf8f6bcaee04842aa221c7243141df4e42  git-2.12.3.tar.xz
diff --git a/package/git/git.mk b/package/git/git.mk
index c2e4b8d..9cea8de 100644
--- a/package/git/git.mk
+++ b/package/git/git.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GIT_VERSION = 2.12.2
+GIT_VERSION = 2.12.3
 GIT_SOURCE = git-$(GIT_VERSION).tar.xz
 GIT_SITE = https://www.kernel.org/pub/software/scm/git
 GIT_LICENSE = GPL-2.0, LGPL-2.1+

^ permalink raw reply related

* [Buildroot] [PATCH] rpcbind: add upstream security fix for CVE-2017-8779
From: Thomas Petazzoni @ 2017-05-16  7:25 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170515210124.6657-1-peter@korsgaard.com>

Hello,

On Mon, 15 May 2017 23:01:24 +0200, Peter Korsgaard wrote:
> CVE-2017-8779: rpcbind through 0.2.4, LIBTIRPC through 1.0.1 and 1.0.2-rc
> through 1.0.2-rc3, and NTIRPC through 1.4.3 do not consider the maximum RPC
> data size during memory allocation for XDR strings, which allows remote
> attackers to cause a denial of service (memory consumption with no
> subsequent free) via a crafted UDP packet to port 111, aka rpcbomb.
> 
> For more details, see:
> https://guidovranken.wordpress.com/2017/05/03/rpcbomb-remote-rpcbind-denial-of-service-patches/
> 
> Backport upstream fix to version 0.2.3 and unconditionally include syslog.h
> to fix a build issue when RPCBIND_DEBUG is disabled (which it is in
> Buildroot).
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
>  ...r-all-svc_getargs-calls-with-svc_freeargs.patch | 231 +++++++++++++++++++++
>  1 file changed, 231 insertions(+)
>  create mode 100644 package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch

Applied to master, thanks.

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

^ permalink raw reply

* [Buildroot] [PATCH] package/x11vnc: fix build issue with --without-ssl
From: Thomas Petazzoni @ 2017-05-16  7:24 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170515202850.17653-1-romain.naour@gmail.com>

Hello,

On Mon, 15 May 2017 22:28:50 +0200, Romain Naour wrote:
> Fixes:
> http://autobuild.buildroot.net/results/873/873ed8f2ade1d969abdff15b7b6d63e04819af9a
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
>  ...r-detection-when-using-without-crypt-cryp.patch | 27 ++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 package/x11vnc/0001-Fix-compiler-detection-when-using-without-crypt-cryp.patch

Applied to master, thanks.

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

^ permalink raw reply

* [Buildroot] [git commit] rpcbind: add upstream security fix for CVE-2017-8779
From: Thomas Petazzoni @ 2017-05-16  7:24 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=954509fb84cfbcf50a2f3020d817a118f7357d3a
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

CVE-2017-8779: rpcbind through 0.2.4, LIBTIRPC through 1.0.1 and 1.0.2-rc
through 1.0.2-rc3, and NTIRPC through 1.4.3 do not consider the maximum RPC
data size during memory allocation for XDR strings, which allows remote
attackers to cause a denial of service (memory consumption with no
subsequent free) via a crafted UDP packet to port 111, aka rpcbomb.

For more details, see:
https://guidovranken.wordpress.com/2017/05/03/rpcbomb-remote-rpcbind-denial-of-service-patches/

Backport upstream fix to version 0.2.3 and unconditionally include syslog.h
to fix a build issue when RPCBIND_DEBUG is disabled (which it is in
Buildroot).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...r-all-svc_getargs-calls-with-svc_freeargs.patch | 231 +++++++++++++++++++++
 1 file changed, 231 insertions(+)

diff --git a/package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch b/package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch
new file mode 100644
index 0000000..130e5d7
--- /dev/null
+++ b/package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch
@@ -0,0 +1,231 @@
+From 093bf65c79af417cffa09d6475f58923540eebcc Mon Sep 17 00:00:00 2001
+From: Doran Moppert <dmoppert@redhat.com>
+Date: Thu, 11 May 2017 11:42:54 -0400
+Subject: [PATCH] rpcbind: pair all svc_getargs() calls with svc_freeargs() to
+ avoid memory leak
+
+This patch is to address CVE-2017-8779 "rpcbomb" in rpcbind, discussed
+at [1], [2], [3].  The last link suggests this issue is actually a bug
+in rpcbind, which led me here.
+
+The leak caused by the reproducer at [4] appears to come from
+rpcb_service_4(), in the case where svc_getargs() returns false and the
+function had an early return, rather than passing through the cleanup
+path at done:, as would otherwise occur.
+
+It also addresses a couple of other locations where the same fault seems
+to exist, though I haven't been able to exercise those.  I hope someone
+more intimate with rpc(3) can confirm my understanding is correct, and
+that I haven't introduced any new bugs.
+
+Without this patch, using the reproducer (and variants) repeatedly
+against rpcbind with a numBytes argument of 1_000_000_000, /proc/$(pidof
+rpcbind)/status reports VmSize increase of 976564 kB each call, and
+VmRSS increase of around 260 kB every 33 calls - the specific numbers
+are probably an artifact of my rhel/glibc version.  With the patch,
+there is a small (~50 kB) VmSize increase with the first message, but
+thereafter both VmSize and VmRSS remain steady.
+
+[1]: http://seclists.org/oss-sec/2017/q2/209
+[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1448124
+[3]: https://sourceware.org/ml/libc-alpha/2017-05/msg00129.html
+[4]: https://github.com/guidovranken/rpcbomb/
+
+Signed-off-by: Doran Moppert <dmoppert@redhat.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+(cherry picked from commit 7ea36eeece56b59f98e469934e4c20b4da043346)
+[Peter: unconditionally include syslog.h for LOG_DEBUG]
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ src/pmap_svc.c     | 58 ++++++++++++++++++++++++++++++++++++++++++++----------
+ src/rpcb_svc.c     |  2 +-
+ src/rpcb_svc_4.c   |  2 +-
+ src/rpcb_svc_com.c |  8 ++++++++
+ 4 files changed, 58 insertions(+), 12 deletions(-)
+
+diff --git a/src/pmap_svc.c b/src/pmap_svc.c
+index ad28b93..f730bed 100644
+--- a/src/pmap_svc.c
++++ b/src/pmap_svc.c
+@@ -53,8 +53,8 @@ static	char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro";
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_prot.h>
+ #include <rpc/rpcb_prot.h>
+-#ifdef RPCBIND_DEBUG
+ #include <syslog.h>
++#ifdef RPCBIND_DEBUG
+ #include <stdlib.h>
+ #endif
+ #include "rpcbind.h"
+@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long
+ 	long ans;
+ 	uid_t uid;
+ 	char uidbuf[32];
++	int rc = TRUE;
+ 
+ 	/*
+ 	 * Can't use getpwnam here. We might end up calling ourselves
+@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long
+ 
+ 	if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
+ 		svcerr_decode(xprt);
+-		return (FALSE);
++		rc = FALSE;
++		goto done;
+ 	}
+ #ifdef RPCBIND_DEBUG
+ 	if (debugging)
+@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long
+ 
+ 	if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) {
+ 		svcerr_weakauth(xprt);
+-		return (FALSE);
++		rc = (FALSE);
++		goto done;
+ 	}
+ 
+ 	rpcbreg.r_prog = reg.pm_prog;
+@@ -258,7 +261,16 @@ done_change:
+ 		rpcbs_set(RPCBVERS_2_STAT, ans);
+ 	else
+ 		rpcbs_unset(RPCBVERS_2_STAT, ans);
+-	return (TRUE);
++done:
++	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
++		if (debugging) {
++			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
++			if (doabort) {
++				rpcbind_abort();
++			}
++		}
++	}
++	return (rc);
+ }
+ 
+ /* ARGSUSED */
+@@ -272,15 +284,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ #ifdef RPCBIND_DEBUG
+ 	char *uaddr;
+ #endif
++	int rc = TRUE;
+ 
+ 	if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
+ 		svcerr_decode(xprt);
+-		return (FALSE);
++		rc = FALSE;
++		goto done;
+ 	}
+ 
+ 	if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) {
+ 		svcerr_weakauth(xprt);
+-		return FALSE;
++		rc = FALSE;
++		goto done;
+ 	}
+ 
+ #ifdef RPCBIND_DEBUG
+@@ -330,21 +345,34 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ 		pmap_ipprot2netid(reg.pm_prot) ?: "<unknown>",
+ 		port ? udptrans : "");
+ 
+-	return (TRUE);
++done:
++	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
++		if (debugging) {
++			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
++			if (doabort) {
++				rpcbind_abort();
++			}
++		}
++	}
++	return (rc);
+ }
+ 
+ /* ARGSUSED */
+ static bool_t
+ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ {
++	int rc = TRUE;
++
+ 	if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) {
+ 		svcerr_decode(xprt);
+-		return (FALSE);
++		rc = FALSE;
++		goto done;
+ 	}
+ 
+ 	if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) {
+ 		svcerr_weakauth(xprt);
+-		return FALSE;
++		rc = FALSE;
++		goto done;
+ 	}
+ 	
+ 	if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr,
+@@ -354,7 +382,17 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ 			rpcbind_abort();
+ 		}
+ 	}
+-	return (TRUE);
++
++done:
++	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) {
++		if (debugging) {
++			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
++			if (doabort) {
++				rpcbind_abort();
++			}
++		}
++	}
++	return (rc);
+ }
+ 
+ int pmap_netid2ipprot(const char *netid)
+diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c
+index bd92201..0c22a9d 100644
+--- a/src/rpcb_svc.c
++++ b/src/rpcb_svc.c
+@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp)
+ 		svcerr_decode(transp);
+ 		if (debugging)
+ 			(void) xlog(LOG_DEBUG, "rpcbind: could not decode");
+-		return;
++		goto done;
+ 	}
+ 
+ 	if (rqstp->rq_proc == RPCBPROC_SET
+diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c
+index b673452..3e37b54 100644
+--- a/src/rpcb_svc_4.c
++++ b/src/rpcb_svc_4.c
+@@ -220,7 +220,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp)
+ 		svcerr_decode(transp);
+ 		if (debugging)
+ 			(void) xlog(LOG_DEBUG, "rpcbind: could not decode\n");
+-		return;
++		goto done;
+ 	}
+ 
+ 	if (rqstp->rq_proc == RPCBPROC_SET
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index ff9ce6b..98ede61 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -931,6 +931,14 @@ error:
+ 	if (call_msg.rm_xid != 0)
+ 		(void) free_slot_by_xid(call_msg.rm_xid);
+ out:
++	if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) {
++		if (debugging) {
++			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
++			if (doabort) {
++				rpcbind_abort();
++			}
++		}
++	}
+ 	if (local_uaddr)
+ 		free(local_uaddr);
+ 	if (buf_alloc)
+-- 
+2.11.0
+

^ permalink raw reply related

* [Buildroot] [git commit] package/x11vnc: fix build issue with --without-ssl
From: Thomas Petazzoni @ 2017-05-16  7:23 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=1dd696ffe26fda96c315329e0dd3880273439e12
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Fixes:
http://autobuild.buildroot.net/results/873/873ed8f2ade1d969abdff15b7b6d63e04819af9a

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...r-detection-when-using-without-crypt-cryp.patch | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/package/x11vnc/0001-Fix-compiler-detection-when-using-without-crypt-cryp.patch b/package/x11vnc/0001-Fix-compiler-detection-when-using-without-crypt-cryp.patch
new file mode 100644
index 0000000..31b5cfe
--- /dev/null
+++ b/package/x11vnc/0001-Fix-compiler-detection-when-using-without-crypt-cryp.patch
@@ -0,0 +1,27 @@
+From d6919c0be7f531b20cbfcb9929d697ac3c132c40 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= <github@kempniu.pl>
+Date: Wed, 12 Oct 2016 15:17:51 +0200
+Subject: [PATCH] Fix compiler detection when using
+ --without-{crypt,crypto,ssl}
+
+(cherry picked from commit d6919c0be7f531b20cbfcb9929d697ac3c132c40)
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 55724bc..bdfff94 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -5,6 +5,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ AM_CONFIG_HEADER(config.h)
+ AC_CONFIG_MACRO_DIR([m4])
+ 
++AC_PROG_CC
+ AC_PROG_SED
+ 
+ # some OS's need both -lssl and -lcrypto on link line:
+-- 
+2.9.3
+

^ permalink raw reply related

* [Buildroot] Analysis of build results for 2017-05-15
From: Thomas Petazzoni @ 2017-05-16  7:22 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170516063043.79C252213B@mail.free-electrons.com>

Hello,

On Tue, 16 May 2017 08:30:43 +0200 (CEST), Thomas Petazzoni wrote:

>          arm |                   boost-1.63.0 | NOK | http://autobuild.buildroot.net/results/e77695bccb2fac76b4b56bf4cc37102cb983d00e |     

Still the static linking issue. I did some testing yesterday, and
discussed it with Romain Naour. I think we now understand the
conditions under which this occurs. You need the following combination:

 - static linking configuration
 - icu enabled
 - BOOST_LOCALE=y
 - another BOOST_xyz sub-options enabled which is not a header only
   feature of Boost, but requires libboost_system to be built

In this case, Boost will try to build libboost_system as a shared
library. If you remove BOOST_LOCALE=y, it works fine, libboost_system.a
is properly built as a static library. If you remove icu, it works
fine. If you remove static linking, it works fine.

I'll apply a patch today that disables BOOST_LOCALE in static linking +
icu scenarios (somewhat a combination of what Romain and Yegor
proposed).

>         bfin |                  ibrdtnd-1.0.1 | NOK | http://autobuild.buildroot.net/results/2344e3faf056166205f049dc44e799d45b9335bf | ORPH

LINKER BUG: .rofixup section size mismatch

Waldemar, we already have a patch for binutils that is supposed to get
rid of this issue, package/binutils/2.27/0905-bfin-rofixup-bug.patch.
However, it doesn't seem to work completely. Do you have an idea?

>          arm |                 libepoxy-1.4.1 | NOK | http://autobuild.buildroot.net/results/14134c73cf4fc478554211a4c72b81f0176442ec |     

I have submitted a pull request upstream
(https://github.com/anholt/libepoxy/pull/119) which fixes this.

>          arm |            modem-manager-1.6.4 | NOK | http://autobuild.buildroot.net/results/533f2cc996f0a2b83e2a05d61045ba1920eb181e |     

Would be fixed by https://patchwork.ozlabs.org/patch/762195/

>         i686 |                  mplayer-1.3.0 | NOK | http://autobuild.buildroot.net/results/31c37d436a4482e3595990420e9eec95135a2787 |     
>         i686 |                  mplayer-1.3.0 | NOK | http://autobuild.buildroot.net/results/552dd83d1de7e84694008f599eab69041e0b7407 |     

Still the i686 issue. Bernd has submitted patches. I'm not too happy
with them, but oh well, since nobody cares in providing better patches,
so be it.

>       x86_64 |                pulseview-0.3.0 | NOK | http://autobuild.buildroot.net/results/e9f3f175e203529c44ecf92a34b82a0b3a473e34 |     

This has been occurring for a while. Anybody to have a look?

>        sparc |                  qt5base-5.8.0 | NOK | http://autobuild.buildroot.net/results/49bc9345b9849c9c3c53ace290c534ff7bb98683 |     

Lacks linking against libatomic. Yann started looking
yesterday, not sure what the status is. Peter (Seiderer), if you can
help in terms of qmake knowledge, it would be nice.

>          arc |                   quagga-1.1.1 | NOK | http://autobuild.buildroot.net/results/d81b0ae5821d525261347a66507a190733d625f0 | ORPH
>          arc |                   quagga-1.1.1 | NOK | http://autobuild.buildroot.net/results/8589823e3da092ca25e6ee82e4fb199136c8e770 | ORPH

Toolchain issue:

ospf_ri.c:839:1: internal compiler error: in extract_insn, at recog.c:2287

>          arm |              rabbitmq-c-v0.8.0 | NOK | http://autobuild.buildroot.net/results/fa3c0bd55a34c32ef48449641296aa04470fbf71 |     
>          arm |              rabbitmq-c-v0.8.0 | NOK | http://autobuild.buildroot.net/results/f5bcf69ce18c9c1d221b0f4f10c67a7454a5bc12 |     

Static linking issue, I've proposed
https://patchwork.ozlabs.org/patch/762183/ to work around this.

>          arm |                  x11vnc-0.9.14 | NOK | http://autobuild.buildroot.net/results/873ed8f2ade1d969abdff15b7b6d63e04819af9a |     

Would be fixed by https://patchwork.ozlabs.org/patch/762700/.

>         or1k |                    zmqpp-4.1.2 | NOK | http://autobuild.buildroot.net/results/8319e8ad660839b6617f08a0639aab8d6391fc51 |     

Compiler issue:

src/client/options.cpp:139:1: internal compiler error: in merge_overlapping_regs, at regrename.c:304

Best regards,

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

^ permalink raw reply

* [Buildroot] [PATCH] x11r7: xf86-input-tslib: upgrade to 1.0.0
From: Martin Kepplinger @ 2017-05-16  6:59 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <7b39e63f-791f-2999-8fc2-e2e7c0df7ffc@posteo.de>



On 2017-05-15 08:28, Martin Kepplinger wrote:
> Am 2017-05-14 um 14:37 schrieb Thomas Petazzoni:
>> Hello,
>>
>> On Sun, 14 May 2017 09:50:26 +0200, Martin Kepplinger wrote:
>>> As the update from 0.0.X to 1.0.0 suggests, this is a major update. The driver
>>> uses X11's touch API now, instead of motion with button emulation. Furthermore
>>> it supports multitouch when a recent version of tslib is installed.
>>>
>>> It is not backwards compatible for very old versions of the X server. See
>>> https://github.com/merge/xf86-input-tslib/releases for some details.
>>
>> What do you call "very old versions of the X server" ?
>>
>> Buildroot still supports the X server in version 1.14.7. Does this
>> qualify as a "very old version" ?
>>
> 
> While, to be honest I'm still digging for the definitive answer here,
> I'm pretty sure 1.12 is the minimum X.org xserver version supported for
> 1.0.0 here.
> 
> 1.14 and up is supported.

yes. 1.12 it is. So 1.11 is "very old" :)

thanks
                      martin

^ permalink raw reply

* [Buildroot] [PATCH] fxload: do not pass -g on Microblaze
From: Thomas Petazzoni @ 2017-05-16  6:55 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <871srp9x9f.fsf@dell.be.48ers.dk>

Hello,

On Tue, 16 May 2017 07:38:36 +0200, Peter Korsgaard wrote:

>  > A possible alternate solution is to disable fxload on Microblaze
>  > entirely. If you prefer this option, let me know, and I'll send a
>  > different patch.  
> 
> I wouldn't mind just disabling fxload. I personally haven't seen any hw
> with the cypress 8051's needing fxload in the last 10 years or so, and
> there are no reverse dependencies.

OK, I'll send a patch disabling fxload entirely then.

> I see that the bug is very old :/ I wonder why we don't have a lot of
> other fallout from it - Is fxload really the only package passing -g or
> is the fxload source code so special that the bug only triggers there?

We don't seem to see it with other packages, so there must be something
special in fxload's code that triggers the bug. But I must say I
haven't looked too deeply, fixing Microblaze gcc issues is not really my
top priority.

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

^ permalink raw reply

* [Buildroot] [PATCH] package/faketime: fix build with gcc >= 6
From: Peter Korsgaard @ 2017-05-16  6:41 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <60001b91-3306-48fb-4973-bf16d3b02f01@gmail.com>

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

Hi,

 >> > +[Romain: rebase on 0.9.6]
 >> > +Signed-off-by: Romain Naour <romain.naour@gmail.com>
 >> 
 >> It is nice if you use the -x option to git cherry-pick so it adds a
 >> comment about the original git commit id. I've now manually added it.

 > Well, sometime I just use git format-patch -1 HASH when the patch apply cleanly
 > without creating a new branch and cherry-picking. In that case there is no -x
 > option...

No, but in that case you are not rebasing, so the git hash listed in the
commit is the correct one. The -x option is only when you rebase /
cherry-pick for traceability.

>>> +---
 >> > + src/Makefile | 2 +-
 >> > + 1 file changed, 1 insertion(+), 1 deletion(-)
 >> > +
 >> > +diff --git a/src/Makefile b/src/Makefile
 >> > +index 51634b0..bbbd476 100644
 >> > +--- a/src/Makefile
 >> > ++++ b/src/Makefile
 >> > +@@ -67,7 +67,7 @@ INSTALL ?= install
 >> > + PREFIX ?= /usr/local
 >> > + LIBDIRNAME ?= /lib/faketime
 >> > + 
 >> > +-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -DFAKE_STAT
 >> > -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC
 >> > -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"'
 >> > ++CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare
 >> > -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS
 >> > -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"'
 >> 
 >> The -Wall -Werror flags are not so nice, but oh well.

 > ha yes... do you want I send a new patch removing Werror instead ?

So far we don't seem to have any build failures from it (besides this
one), so it isn't strictly needed - Just a potential problem.

I would leave it as is for now, unless if we can convince upstream to
accept such a patch.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [autobuild.buildroot.net] Build results for 2017-05-15
From: Thomas Petazzoni @ 2017-05-16  6:30 UTC (permalink / raw)
  To: buildroot

Hello,

Build statistics for 2017-05-15
================================

      successes : 239
       failures : 14 
       timeouts : 1  
          TOTAL : 254

Classification of failures by reason
====================================

                 mplayer-1.3.0 | 2 
                  quagga-1.1.1 | 2 
             rabbitmq-c-v0.8.0 | 2 
                  boost-1.63.0 | 1 
            gst-ffmpeg-0.10.13 | 1 
                 ibrdtnd-1.0.1 | 1 
                libepoxy-1.4.1 | 1 
           modem-manager-1.6.4 | 1 
               pulseview-0.3.0 | 1 
                 qt5base-5.8.0 | 1 
                 x11vnc-0.9.14 | 1 
                   zmqpp-4.1.2 | 1 


Detail of failures
===================

         arm |                   boost-1.63.0 | NOK | http://autobuild.buildroot.net/results/e77695bccb2fac76b4b56bf4cc37102cb983d00e |     
microblazeel |             gst-ffmpeg-0.10.13 | TIM | http://autobuild.buildroot.net/results/05022c15a54c9ed2c1e13483c389df4ada2e4682 |     
        bfin |                  ibrdtnd-1.0.1 | NOK | http://autobuild.buildroot.net/results/2344e3faf056166205f049dc44e799d45b9335bf | ORPH
         arm |                 libepoxy-1.4.1 | NOK | http://autobuild.buildroot.net/results/14134c73cf4fc478554211a4c72b81f0176442ec |     
         arm |            modem-manager-1.6.4 | NOK | http://autobuild.buildroot.net/results/533f2cc996f0a2b83e2a05d61045ba1920eb181e |     
        i686 |                  mplayer-1.3.0 | NOK | http://autobuild.buildroot.net/results/31c37d436a4482e3595990420e9eec95135a2787 |     
        i686 |                  mplayer-1.3.0 | NOK | http://autobuild.buildroot.net/results/552dd83d1de7e84694008f599eab69041e0b7407 |     
      x86_64 |                pulseview-0.3.0 | NOK | http://autobuild.buildroot.net/results/e9f3f175e203529c44ecf92a34b82a0b3a473e34 |     
       sparc |                  qt5base-5.8.0 | NOK | http://autobuild.buildroot.net/results/49bc9345b9849c9c3c53ace290c534ff7bb98683 |     
         arc |                   quagga-1.1.1 | NOK | http://autobuild.buildroot.net/results/d81b0ae5821d525261347a66507a190733d625f0 | ORPH
         arc |                   quagga-1.1.1 | NOK | http://autobuild.buildroot.net/results/8589823e3da092ca25e6ee82e4fb199136c8e770 | ORPH
         arm |              rabbitmq-c-v0.8.0 | NOK | http://autobuild.buildroot.net/results/fa3c0bd55a34c32ef48449641296aa04470fbf71 |     
         arm |              rabbitmq-c-v0.8.0 | NOK | http://autobuild.buildroot.net/results/f5bcf69ce18c9c1d221b0f4f10c67a7454a5bc12 |     
         arm |                  x11vnc-0.9.14 | NOK | http://autobuild.buildroot.net/results/873ed8f2ade1d969abdff15b7b6d63e04819af9a |     
        or1k |                    zmqpp-4.1.2 | NOK | http://autobuild.buildroot.net/results/8319e8ad660839b6617f08a0639aab8d6391fc51 |     

-- 
http://autobuild.buildroot.net

^ permalink raw reply

* [Buildroot] [PATCH] fxload: do not pass -g on Microblaze
From: Peter Korsgaard @ 2017-05-16  5:38 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1494878505-27111-1-git-send-email-thomas.petazzoni@free-electrons.com>

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

 > gcc on Microblaze is affected by PR63261, which causes a build failure
 > when optimization *and* debugging symbols are enabled. As a
 > work-around, do not build fxload with debugging symbols.

 > Fixes:

 >   http://autobuild.buildroot.net/results/24640a042d84f45339246c0a18e10905494b2199/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 > ---
 > A possible alternate solution is to disable fxload on Microblaze
 > entirely. If you prefer this option, let me know, and I'll send a
 > different patch.

I wouldn't mind just disabling fxload. I personally haven't seen any hw
with the cypress 8051's needing fxload in the last 10 years or so, and
there are no reverse dependencies.

I see that the bug is very old :/ I wonder why we don't have a lot of
other fallout from it - Is fxload really the only package passing -g or
is the fxload source code so special that the bug only triggers there?

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] how to install package ltp-testsuite outside of target directory
From: YUAN Linyu @ 2017-05-16  2:23 UTC (permalink / raw)
  To: buildroot

Hi,

When I build ltp-testsuite into a ARM initramfs image, it's very big, 
so system can't load module which can load without ltp-testsuite built.

section 3 reloc 1 sym 'vmalloc_to_page': relocation 28 out of range
 (0xbf000034 -> 0xc1a18f1c)

I try to build ltp-testsuite outside the target rootfs.,
for example, $(BASE_DIR)/ ltp-testsuite, 
it need change below configuration in pkg-autotools.mk,
and add one configuration item to enable user define a directory for install.

$(2)_INSTALL_TARGET_OPTS                ?= DESTDIR=$$(TARGET_DIR) install
==>
$(2)_TARGET_DIR		?= $$(TARGET_DIR)
$(2)_INSTALL_TARGET_OPTS                ?= DESTDIR=$$($(2)_TARGET_DIR) install

anyone have a better solution?

thanks

^ permalink raw reply

* [Buildroot] NetworkManager ignores conf file
From: Brent Sink @ 2017-05-16  2:16 UTC (permalink / raw)
  To: buildroot

Hello,


It seems that NetworkManager does not create a /etc/NetworkManager/NetworkManager.conf file.  I tried adding it but it seems to ignore it.  I'm trying to prevent NetworkManager from taking control of eth0, but everything I've tried has not worked.  Would Buildroot be building NM to look for the .conf file in a different location?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170516/4dcafd10/attachment.html>

^ permalink raw reply

* [Buildroot] dts: compiling aarch64 vendored dts files?
From: Christian Stewart @ 2017-05-16  2:15 UTC (permalink / raw)
  To: buildroot

Hi Thomas, All,

I can't figure out a correct way of configuring Buildroot to compile a
DTS under a vendor directory in the kernel:

/arch/arm64/boot/dts/nexell/s5p6818-artik710-raptor-rev03.dts
                                       ^

The source I'm trying to build is here:

https://github.com/SamsungARTIK/linux-artik/tree/A710/v4.4/arch/arm64/boot/dts/nexell

The issue is that unlike most arches, arm64 has the dts files under
subdirectories - in this case, nexell. I've tried:

 - BR2_LINUX_KERNEL_INTREE_DTS_NAME="s5p6818-artik710-raptor-rev03"
 - BR2_LINUX_KERNEL_INTREE_DTS_NAME="nexell-s5p6818-artik710-raptor-rev03"
 - BR2_LINUX_KERNEL_INTREE_DTS_NAME="nexell/s5p6818-artik710-raptor-rev03"

The developers recommend using "make dtbs" in the kernel, which
probably finds these automatically. AFAIK there is no mechanism in
Buildroot to allow running something like this.

Thanks for the help.

~ Christian Stewart

^ permalink raw reply

* [Buildroot] [PATCH 1/1] lego: ev3: use mainline kernel
From: David Lechner @ 2017-05-15 23:21 UTC (permalink / raw)
  To: buildroot

It is finally possible to boot LEGO MINDSTORMS EV3 from the mainline
Linux kernel. This patch updates the defconfg to use the mainline kernel
instead of the custom ev3dev kernel.

Signed-off-by: David Lechner <david@lechnology.com>
---
 board/lego/ev3/busybox.fragment                    |  3 +
 board/lego/ev3/genimage.cfg                        |  2 +-
 board/lego/ev3/linux.fragment                      | 49 +++++++++++++
 .../patches/linux/0001-adc-device-tree-node.patch  | 56 ++++++++++++++
 .../linux/0002-sound-device-tree-node.patch        | 85 ++++++++++++++++++++++
 board/lego/ev3/post-image.sh                       |  2 +
 board/lego/ev3/readme.txt                          |  9 +--
 configs/lego_ev3_defconfig                         | 20 +++--
 8 files changed, 210 insertions(+), 16 deletions(-)
 create mode 100644 board/lego/ev3/busybox.fragment
 create mode 100644 board/lego/ev3/patches/linux/0001-adc-device-tree-node.patch
 create mode 100644 board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch

diff --git a/board/lego/ev3/busybox.fragment b/board/lego/ev3/busybox.fragment
new file mode 100644
index 0000000..901274d
--- /dev/null
+++ b/board/lego/ev3/busybox.fragment
@@ -0,0 +1,3 @@
+CONFIG_BEEP=y
+CONFIG_FEATURE_BEEP_FREQ=440
+CONFIG_FEATURE_BEEP_LENGTH_MS=250
diff --git a/board/lego/ev3/genimage.cfg b/board/lego/ev3/genimage.cfg
index 6b8546c..3568295 100644
--- a/board/lego/ev3/genimage.cfg
+++ b/board/lego/ev3/genimage.cfg
@@ -19,7 +19,7 @@ image flash.bin {
 		size = 320K
 	}
 	partition uimage {
-		image = "uImage"
+		image = "uImage.da850-lego-ev3"
 		size = 3M
 		offset = 0x50000
 	}
diff --git a/board/lego/ev3/linux.fragment b/board/lego/ev3/linux.fragment
index 5593636..439cccf 100644
--- a/board/lego/ev3/linux.fragment
+++ b/board/lego/ev3/linux.fragment
@@ -1,6 +1,55 @@
+CONFIG_ARCH_DAVINCI_DM644x=n
+CONFIG_ARCH_DAVINCI_DM355=n
+CONFIG_ARCH_DAVINCI_DM646x=n
+CONFIG_ARCH_DAVINCI_DA830=n
+CONFIG_ARCH_DAVINCI_DM365=n
+CONFIG_MACH_SFFSDR=n
+CONFIG_MACH_NEUROS_OSD2=n
+CONFIG_MACH_DM355_LEOPARD=n
+CONFIG_MACH_MITYOMAPL138=n
+CONFIG_MACH_OMAPL138_HAWKBOARD=n
+CONFIG_MACH_DAVINCI_DA850_EVM=n
+CONFIG_ATA=n
+CONFIG_MTD=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=1
 CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_PWM_BEEPER=y
+CONFIG_SPI_DAVINCI=y
+CONFIG_PINCTRL_DA850_PUPD=y
+CONFIG_V4L_PLATFORM_DRIVERS=n
+CONFIG_SOUND=n
+CONFIG_SND=n
+CONFIG_SND_SOC=n
+CONFIG_SND_EDMA_SOC=n
+CONFIG_SND_DAVINCI_SOC_MCASP=n
+CONFIG_SND_SOC_TLV320AIC3X=n
+CONFIG_SND_SIMPLE_CARD=n
+CONFIG_DAVINCI_WATCHDOG=y
+CONFIG_USB=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_DAVINCI=y
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_USB_MUSB_DA8XX=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_USB_GADGET=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGER_MTD=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+CONFIG_RTC_DRV_OMAP=y
+CONFIG_IIO=y
+CONFIG_TI_ADS7950=y
+CONFIG_PWM_TIECAP=y
+CONFIG_PWM_TIEHRPWM=y
 CONFIG_SQUASHFS=y
 CONFIG_SQUASHFS_LZ4=y
 CONFIG_SQUASHFS_LZO=y
diff --git a/board/lego/ev3/patches/linux/0001-adc-device-tree-node.patch b/board/lego/ev3/patches/linux/0001-adc-device-tree-node.patch
new file mode 100644
index 0000000..dabda1e
--- /dev/null
+++ b/board/lego/ev3/patches/linux/0001-adc-device-tree-node.patch
@@ -0,0 +1,56 @@
+From 8a81ff173c5c9a0ab1df84fab17971dbcce8490a Mon Sep 17 00:00:00 2001
+From: David Lechner <david@lechnology.com>
+Date: Tue, 7 Feb 2017 13:22:07 -0600
+Subject: ARM: da850-lego-ev3: Add device tree node for A/DC
+
+This adds a node for the TI ADS7957 analog/digital converter on LEGO
+MINDSTORMS EV3 as well as a regulator node that is used by the A/DC node.
+
+Signed-off-by: David Lechner <david@lechnology.com>
+Signed-off-by: Sekhar Nori <nsekhar@ti.com>
+---
+ arch/arm/boot/dts/da850-lego-ev3.dts | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
+index 112ec92..0309537 100644
+--- a/arch/arm/boot/dts/da850-lego-ev3.dts
++++ b/arch/arm/boot/dts/da850-lego-ev3.dts
+@@ -139,6 +139,19 @@
+ 		enable-active-high;
+ 		regulator-boot-on;
+ 	};
++
++	/*
++	 * This is a simple voltage divider on VCC5V to provide a 2.5V
++	 * reference signal to the ADC.
++	 */
++	adc_ref: regulator2 {
++		compatible = "regulator-fixed";
++		regulator-name = "adc ref";
++		regulator-min-microvolt = <2500000>;
++		regulator-max-microvolt = <2500000>;
++		regulator-boot-on;
++		vin-supply = <&vcc5v>;
++	};
+ };
+ 
+ &pmx_core {
+@@ -293,6 +306,14 @@
+ 			};
+ 		};
+ 	};
++
++	adc: adc at 3 {
++		compatible = "ti,ads7957";
++		reg = <3>;
++		#io-channel-cells = <1>;
++		spi-max-frequency = <10000000>;
++		vref-supply = <&adc_ref>;
++	};
+ };
+ 
+ &gpio {
+-- 
+cgit v1.1
+
diff --git a/board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch b/board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch
new file mode 100644
index 0000000..a095222
--- /dev/null
+++ b/board/lego/ev3/patches/linux/0002-sound-device-tree-node.patch
@@ -0,0 +1,85 @@
+From 7723d70bebd749ef24fef19db52d827c7fd7f858 Mon Sep 17 00:00:00 2001
+From: David Lechner <david@lechnology.com>
+Date: Tue, 7 Feb 2017 13:22:09 -0600
+Subject: ARM: da850-lego-ev3: Add device tree node for sound
+
+This adds a device tree node for sound on LEGO MINDSTORMS EV3. The EV3
+uses one of the SoC PWMs connected to an amplifier to create sound from
+a speaker.
+
+The PWM is passed through a low-pass filter, so it is actually possible
+to do PCM playback, but there is no existing driver, so just using
+pwm-beeper for now, since it is also a compatible mode of operation.
+
+Signed-off-by: David Lechner <david@lechnology.com>
+Signed-off-by: Sekhar Nori <nsekhar@ti.com>
+---
+ arch/arm/boot/dts/da850-lego-ev3.dts | 31 +++++++++++++++++++++++++++++++
+ 1 file changed, 31 insertions(+)
+
+diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
+index 0309537..c20580a 100644
+--- a/arch/arm/boot/dts/da850-lego-ev3.dts
++++ b/arch/arm/boot/dts/da850-lego-ev3.dts
+@@ -123,6 +123,14 @@
+ 		pinctrl-0 = <&system_power_pin>;
+ 	};
+ 
++	sound {
++		compatible = "pwm-beeper";
++		pinctrl-names = "default";
++		pinctrl-0 = <&ehrpwm0b_pins>;
++		pwms = <&ehrpwm0 1 1000000 0>;
++		amp-supply = <&amp>;
++	};
++
+ 	/*
+ 	 * This is a 5V current limiting regulator that is shared by USB,
+ 	 * the sensor (input) ports, the motor (output) ports and the A/DC.
+@@ -152,6 +160,18 @@
+ 		regulator-boot-on;
+ 		vin-supply = <&vcc5v>;
+ 	};
++
++	/*
++	 * This is the amplifier for the speaker.
++	 */
++	amp: regulator3 {
++		pinctrl-names = "default";
++		pinctrl-0 = <&amp_pins>;
++		compatible = "regulator-fixed";
++		regulator-name = "amp";
++		gpio = <&gpio 111 GPIO_ACTIVE_HIGH>;
++		enable-active-high;
++	};
+ };
+ 
+ &pmx_core {
+@@ -208,6 +228,13 @@
+ 			0x4c 0x00008000 0x0000f000
+ 		>;
+ 	};
++
++	amp_pins: pinmux_amp_pins {
++		pinctrl-single,bits = <
++			/* GP6[15] */
++			0x34 0x00000008 0x0000000f
++		>;
++	};
+ };
+ 
+ &pinconf {
+@@ -316,6 +343,10 @@
+ 	};
+ };
+ 
++&ehrpwm0 {
++	status = "okay";
++};
++
+ &gpio {
+ 	status = "okay";
+ };
+-- 
+cgit v1.1
+
diff --git a/board/lego/ev3/post-image.sh b/board/lego/ev3/post-image.sh
index 81626dc..553d27a 100755
--- a/board/lego/ev3/post-image.sh
+++ b/board/lego/ev3/post-image.sh
@@ -4,6 +4,8 @@ BOARD_DIR="$(dirname $0)"
 GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
 GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
 
+ln -sf "uImage.da850-lego-ev3" "${BINARIES_DIR}/uImage"
+
 rm -rf "${GENIMAGE_TMP}"
 
 genimage \
diff --git a/board/lego/ev3/readme.txt b/board/lego/ev3/readme.txt
index c40907c..8df91ac 100644
--- a/board/lego/ev3/readme.txt
+++ b/board/lego/ev3/readme.txt
@@ -13,12 +13,6 @@ See:
 - http://www.lego.com/en-us/mindstorms/products/ev3/31313-mindstorms-ev3/
 - http://www.ti.com/product/am1808
 
-The buildroot configuration uses the Linux kernel of the ev3dev project.
-See:
-- https://github.com/ev3dev/ev3-kernel/
-- https://github.com/ev3dev/lego-linux-drivers/
-- http://www.ev3dev.org/
-
 How it works
 ============
 
@@ -65,7 +59,8 @@ After building, you should obtain this tree:
     ??? rootfs.squashfs
     ??? sdcard.img
     ??? u-boot.bin
-    ??? uImage
+    ??? uImage -> uImage.da850-lego-ev3
+    ??? uImage.da850-lego-ev3
 
 Installation
 ============
diff --git a/configs/lego_ev3_defconfig b/configs/lego_ev3_defconfig
index 543a227..0996b8c 100644
--- a/configs/lego_ev3_defconfig
+++ b/configs/lego_ev3_defconfig
@@ -2,22 +2,26 @@
 BR2_arm=y
 BR2_arm926t=y
 
+# Build options
+BR2_GLOBAL_PATCH_DIR="board/lego/ev3/patches"
+
 # system
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/lego/ev3/post-image.sh"
-# Linux headers same as kernel, a 4.4 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
 
 # Kernel
 BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_GIT=y
-BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/ev3dev/ev3dev-kernel.git"
-BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v4.4.19-15-ev3dev-ev3_1"
-BR2_LINUX_KERNEL_DEFCONFIG="ev3dev"
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11"
+BR2_LINUX_KERNEL_DEFCONFIG="davinci_all"
 BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/lego/ev3/linux.fragment"
-BR2_LINUX_KERNEL_UIMAGE=y
-BR2_LINUX_KERNEL_EXT_EV3DEV_LINUX_DRIVERS=y
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0xc0008000"
+BR2_LINUX_KERNEL_APPENDED_UIMAGE=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="da850-lego-ev3"
+
+# Target packages
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/lego/ev3/busybox.fragment"
 
 # filesystem
 BR2_TARGET_ROOTFS_EXT2=y
-- 
2.7.4

^ permalink raw reply related

* [Buildroot] [PATCH v5 1/1] linuxptp: new package
From: Petr Kulhavy @ 2017-05-15 21:47 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 slave-only mode on eth0
and synchronize the system clock to PTP.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
--
Changes v4 -> v5:
	- move ptp4l parameters into a config file /etc/linuxptp.cfg
	- add step threshold of 1 second into the configuration to quickly correct large errors
	- add systemd service for phc2sys to sync the system clock

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                       | 46 +++++++++++
 package/linuxptp/linuxptp-system-clock.service     | 11 +++
 package/linuxptp/linuxptp.cfg                      | 19 +++++
 package/linuxptp/linuxptp.hash                     |  2 +
 package/linuxptp/linuxptp.mk                       | 43 ++++++++++
 package/linuxptp/linuxptp.service                  | 11 +++
 13 files changed, 332 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-system-clock.service
 create mode 100644 package/linuxptp/linuxptp.cfg
 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..46b8921
--- /dev/null
+++ b/package/linuxptp/S65linuxptp
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# Start linuxptp
+#
+
+start() {
+	printf "Starting linuxptp daemon: "
+	start-stop-daemon -S -b -q -p /var/run/linuxptp-ptp4l.pid \
+		-x /usr/sbin/ptp4l -- -f /etc/linuxptp.cfg
+	[ $? = 0 ] && echo "OK" || echo "FAIL"
+
+	printf "Starting linuxptp system clock synchronization: "
+	start-stop-daemon -S -b -q -p /var/run/linuxptp-phc2sys.pid \
+		-x /usr/sbin/phc2sys -- -s eth0 -c CLOCK_REALTIME -w -S 1.0
+	[ $? = 0 ] && echo "OK" || echo "FAIL"
+}
+
+stop() {
+	printf "Stopping linuxptp system clock synchronization: "
+	start-stop-daemon -K -q -p /var/run/linuxptp-phc2sys.pid \
+		-x /usr/sbin/phc2sys
+	echo "OK"
+
+	printf "Stopping linuxptp daemon: "
+	start-stop-daemon -K -q -p /var/run/linuxptp-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-system-clock.service b/package/linuxptp/linuxptp-system-clock.service
new file mode 100644
index 0000000..7327254
--- /dev/null
+++ b/package/linuxptp/linuxptp-system-clock.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Precision Time Protocol system clock synchronization
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -w -S 1.0
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+WantedBy=linuxptp.service
diff --git a/package/linuxptp/linuxptp.cfg b/package/linuxptp/linuxptp.cfg
new file mode 100644
index 0000000..f9d02e8
--- /dev/null
+++ b/package/linuxptp/linuxptp.cfg
@@ -0,0 +1,19 @@
+# LinuxPTP configuration file for synchronizing the system clock to
+# a remote PTP master in slave-only mode.
+#
+# By default synchronize time in slave-only mode using UDP and hardware time
+# stamps on eth0. If the difference to master is >1.0 second correct by
+# stepping the clock instead of adjusting the frequency.
+#
+# If you change the configuration don't forget to update the phc2sys
+# parameters accordingly in linuxptp-system-clock.service (systemd)
+# or the linuxptp SysV init script.
+
+[global]
+slaveOnly		1
+delay_mechanism		Auto
+network_transport	UDPv4
+time_stamping		hardware
+step_threshold		1.0
+
+[eth0]
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..d7b470d
--- /dev/null
+++ b/package/linuxptp/linuxptp.mk
@@ -0,0 +1,43 @@
+################################################################################
+#
+# 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
+
+	$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp.cfg \
+		$(TARGET_DIR)/etc/linuxptp.cfg
+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
+	$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp-system-clock.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/linuxptp-system-clock.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..f690430
--- /dev/null
+++ b/package/linuxptp/linuxptp.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Precision Time Protocol daemon
+After=syslog.target network.target
+Wants=linuxptp-system-clock.service
+
+[Service]
+ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp.cfg
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
-- 
2.7.4

^ permalink raw reply related

* [Buildroot] libfakeroot problem - solved
From: Peter Korsgaard @ 2017-05-15 21:39 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <188f3de7-0bdc-4bda-0499-6127018e05c0@ou.edu>

>>>>> "Steve" == Steve Kenton <skenton@ou.edu> writes:

Hi,

 > OK, I found it. It was leakage from the build host. Testing something
 > for the embedded system I had run getcap to give /bin/tar some
 > capabilities and did not remove them afterwards. Somehow that
 > interacted badly with libfakeroot and the creation of
 > output/images/rootfs.tar at the end of the build. The reason I did not
 > see it on the 32-bit builds is that being intended for recovery and
 > reinstall they used initramfs linked into the kernel for the rootfs
 > instead of the  rootfs.tar file. When the libfakeroot issue
 > manifested, root did not own the root filesystem files in rootfs.tar
 > when it was expanded with "sudo tar xf  rootfs.tar ....." Which
 > resulted in a system which was bootable but would not run properly
 > because of the file ownership/permission problems.

Hmm, we've relatively recent had issues with filesystem capabilities /
acls and fakeroot, but I thought this was fixed (unless you did part of
your build with the old BR version):

https://git.buildroot.net/buildroot/commit/?id=2a222446b4614a38b4042df54b68b69b96939708

 > This was clearly a self inflicted problem, but the fact that tar is
 > not included in the output/host/* tools and thus the build system
 > /bin/tar was used certainly make it "interesting" to find.

Well, it is a bit of chicken and egg issue - Most package sources are
available in tarballs, so we need SOME utilities from the host (like gcc
and make), and we try to only add host packages when really needed
(E.G. uncommon SW or we need special versions, ..).

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH next 1/8] php: bump version to 7.1.5
From: Peter Korsgaard @ 2017-05-15 21:10 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170512124521.4619-1-Vincent.Riera@imgtec.com>

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

 > Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
 > ---
 >  package/php/php.hash | 2 +-
 >  package/php/php.mk   | 2 +-
 >  2 files changed, 2 insertions(+), 2 deletions(-)

 > diff --git a/package/php/php.hash b/package/php/php.hash
 > index 35c5925..d34242f 100644
 > --- a/package/php/php.hash
 > +++ b/package/php/php.hash
 > @@ -1,2 +1,2 @@
 >  # From http://php.net/downloads.php
 > -sha256 71514386adf3e963df087c2044a0b3747900b8b1fc8da3a99f0a0ae9180d300b  php-7.1.4.tar.xz
 > +sha256 d149a3c396c45611f5dc6bf14be190f464897145a76a8e5851cf18ff7094f6ac  php-7.1.5.tar.xz
 > diff --git a/package/php/php.mk b/package/php/php.mk
 > index 46f57e4..cfc6789 100644
 > --- a/package/php/php.mk
 > +++ b/package/php/php.mk
 > @@ -4,7 +4,7 @@
 >  #
 >  ################################################################################
 
 > -PHP_VERSION = 7.1.4
 > +PHP_VERSION = 7.1.5

Looking at the changelog:

http://www.php.net/ChangeLog-7.php#7.1.5

It seems to be purely fixes, and some of them quite serious (endless
loop, segfault, compile error, invalid free, ..) - So I've applied it to
master instead.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit] php: bump version to 7.1.5
From: Peter Korsgaard @ 2017-05-15 21:07 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=f9aee682f9db9ee367afb4e3876d20c6a7ca4dc3
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/php/php.hash | 2 +-
 package/php/php.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/php/php.hash b/package/php/php.hash
index 35c5925..d34242f 100644
--- a/package/php/php.hash
+++ b/package/php/php.hash
@@ -1,2 +1,2 @@
 # From http://php.net/downloads.php
-sha256 71514386adf3e963df087c2044a0b3747900b8b1fc8da3a99f0a0ae9180d300b  php-7.1.4.tar.xz
+sha256 d149a3c396c45611f5dc6bf14be190f464897145a76a8e5851cf18ff7094f6ac  php-7.1.5.tar.xz
diff --git a/package/php/php.mk b/package/php/php.mk
index 46f57e4..cfc6789 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PHP_VERSION = 7.1.4
+PHP_VERSION = 7.1.5
 PHP_SITE = http://www.php.net/distributions
 PHP_SOURCE = php-$(PHP_VERSION).tar.xz
 PHP_INSTALL_STAGING = YES

^ permalink raw reply related

* [Buildroot] [PATCH next] libgtk3: bump version to 3.22.15
From: Peter Korsgaard @ 2017-05-15 21:05 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20170512094411.22656-1-Vincent.Riera@imgtec.com>

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

 > Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Committed to next, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit branch/next] libgtk3: bump version to 3.22.15
From: Peter Korsgaard @ 2017-05-15 21:05 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=57f0f9d43f9427f5e64dc5dfea806716c81c4f2a
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/libgtk3/libgtk3.hash | 4 ++--
 package/libgtk3/libgtk3.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libgtk3/libgtk3.hash b/package/libgtk3/libgtk3.hash
index cbba7ca..0f259e9 100644
--- a/package/libgtk3/libgtk3.hash
+++ b/package/libgtk3/libgtk3.hash
@@ -1,2 +1,2 @@
-# From http://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-3.22.14.sha256sum
-sha256 d6120e4fd64e432b74a61e8abd972b1948cf54e4dc4f0e081c05ab625f087131  gtk+-3.22.14.tar.xz
+# From http://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-3.22.15.sha256sum
+sha256 c8a012c2a99132629ab043f764a2b7cb6388483a015cd15c7a4288bec3590fdb  gtk+-3.22.15.tar.xz
diff --git a/package/libgtk3/libgtk3.mk b/package/libgtk3/libgtk3.mk
index 7d8eecb..f3b1705 100644
--- a/package/libgtk3/libgtk3.mk
+++ b/package/libgtk3/libgtk3.mk
@@ -5,7 +5,7 @@
 ################################################################################
 
 LIBGTK3_VERSION_MAJOR = 3.22
-LIBGTK3_VERSION = $(LIBGTK3_VERSION_MAJOR).14
+LIBGTK3_VERSION = $(LIBGTK3_VERSION_MAJOR).15
 LIBGTK3_SOURCE = gtk+-$(LIBGTK3_VERSION).tar.xz
 LIBGTK3_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk+/$(LIBGTK3_VERSION_MAJOR)
 LIBGTK3_LICENSE = LGPL-2.0+

^ permalink raw reply related

* [Buildroot] [PATCH] tslib: update to 1.10
From: Peter Korsgaard @ 2017-05-15 21:04 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <3db12153-8a12-cc62-9a4c-bb7177d22bef@ginzinger.com>

>>>>> "Martin" == Martin Kepplinger <martin.kepplinger@ginzinger.com> writes:

 > On 2017-05-12 10:17, Martin Kepplinger wrote:
 >> If you're overly interested, check out the release notes at
 >> https://github.com/kergoth/tslib/releases
 >> 
 >> Signed-off-by: Martin Kepplinger <martink@posteo.de>
 >> ---

 > bump. Could have been lost on the weekend :)

;)

Committed to next, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit branch/next] tslib: update to 1.10
From: Peter Korsgaard @ 2017-05-15 21:02 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=af8fb485a91593d4ccfc3728df26230527b84292
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

If you're overly interested, check out the release notes at
https://github.com/kergoth/tslib/releases

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/tslib/tslib.hash | 4 ++--
 package/tslib/tslib.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/tslib/tslib.hash b/package/tslib/tslib.hash
index e8e72c8..1eeafd0 100644
--- a/package/tslib/tslib.hash
+++ b/package/tslib/tslib.hash
@@ -1,2 +1,2 @@
-# https://github.com/kergoth/tslib/releases/download/1.9/tslib-1.9.tar.xz.sha256
-sha256  af4e40a4cf2aa7a81f1602de1613190a101760689709103cc3590132266ac7b8  tslib-1.9.tar.xz
+# https://github.com/kergoth/tslib/releases/download/1.10/tslib-1.10.tar.xz.sha256
+sha256  26ce1df4647dc8d16f6247062f30a8a03c34165dd19e042d0b2df8860da265b2  tslib-1.10.tar.xz
diff --git a/package/tslib/tslib.mk b/package/tslib/tslib.mk
index 27d960d..9d7b926 100644
--- a/package/tslib/tslib.mk
+++ b/package/tslib/tslib.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-TSLIB_VERSION = 1.9
+TSLIB_VERSION = 1.10
 TSLIB_SITE = https://github.com/kergoth/tslib/releases/download/$(TSLIB_VERSION)
 TSLIB_SOURCE = tslib-$(TSLIB_VERSION).tar.xz
 TSLIB_LICENSE = GPL, LGPL

^ permalink raw reply related

* [Buildroot] [PATCH] rpcbind: add upstream security fix for CVE-2017-8779
From: Peter Korsgaard @ 2017-05-15 21:01 UTC (permalink / raw)
  To: buildroot

CVE-2017-8779: rpcbind through 0.2.4, LIBTIRPC through 1.0.1 and 1.0.2-rc
through 1.0.2-rc3, and NTIRPC through 1.4.3 do not consider the maximum RPC
data size during memory allocation for XDR strings, which allows remote
attackers to cause a denial of service (memory consumption with no
subsequent free) via a crafted UDP packet to port 111, aka rpcbomb.

For more details, see:
https://guidovranken.wordpress.com/2017/05/03/rpcbomb-remote-rpcbind-denial-of-service-patches/

Backport upstream fix to version 0.2.3 and unconditionally include syslog.h
to fix a build issue when RPCBIND_DEBUG is disabled (which it is in
Buildroot).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 ...r-all-svc_getargs-calls-with-svc_freeargs.patch | 231 +++++++++++++++++++++
 1 file changed, 231 insertions(+)
 create mode 100644 package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch

diff --git a/package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch b/package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch
new file mode 100644
index 000000000..130e5d77c
--- /dev/null
+++ b/package/rpcbind/0004-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch
@@ -0,0 +1,231 @@
+From 093bf65c79af417cffa09d6475f58923540eebcc Mon Sep 17 00:00:00 2001
+From: Doran Moppert <dmoppert@redhat.com>
+Date: Thu, 11 May 2017 11:42:54 -0400
+Subject: [PATCH] rpcbind: pair all svc_getargs() calls with svc_freeargs() to
+ avoid memory leak
+
+This patch is to address CVE-2017-8779 "rpcbomb" in rpcbind, discussed
+at [1], [2], [3].  The last link suggests this issue is actually a bug
+in rpcbind, which led me here.
+
+The leak caused by the reproducer at [4] appears to come from
+rpcb_service_4(), in the case where svc_getargs() returns false and the
+function had an early return, rather than passing through the cleanup
+path at done:, as would otherwise occur.
+
+It also addresses a couple of other locations where the same fault seems
+to exist, though I haven't been able to exercise those.  I hope someone
+more intimate with rpc(3) can confirm my understanding is correct, and
+that I haven't introduced any new bugs.
+
+Without this patch, using the reproducer (and variants) repeatedly
+against rpcbind with a numBytes argument of 1_000_000_000, /proc/$(pidof
+rpcbind)/status reports VmSize increase of 976564 kB each call, and
+VmRSS increase of around 260 kB every 33 calls - the specific numbers
+are probably an artifact of my rhel/glibc version.  With the patch,
+there is a small (~50 kB) VmSize increase with the first message, but
+thereafter both VmSize and VmRSS remain steady.
+
+[1]: http://seclists.org/oss-sec/2017/q2/209
+[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1448124
+[3]: https://sourceware.org/ml/libc-alpha/2017-05/msg00129.html
+[4]: https://github.com/guidovranken/rpcbomb/
+
+Signed-off-by: Doran Moppert <dmoppert@redhat.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+(cherry picked from commit 7ea36eeece56b59f98e469934e4c20b4da043346)
+[Peter: unconditionally include syslog.h for LOG_DEBUG]
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ src/pmap_svc.c     | 58 ++++++++++++++++++++++++++++++++++++++++++++----------
+ src/rpcb_svc.c     |  2 +-
+ src/rpcb_svc_4.c   |  2 +-
+ src/rpcb_svc_com.c |  8 ++++++++
+ 4 files changed, 58 insertions(+), 12 deletions(-)
+
+diff --git a/src/pmap_svc.c b/src/pmap_svc.c
+index ad28b93..f730bed 100644
+--- a/src/pmap_svc.c
++++ b/src/pmap_svc.c
+@@ -53,8 +53,8 @@ static	char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro";
+ #include <rpc/rpc.h>
+ #include <rpc/pmap_prot.h>
+ #include <rpc/rpcb_prot.h>
+-#ifdef RPCBIND_DEBUG
+ #include <syslog.h>
++#ifdef RPCBIND_DEBUG
+ #include <stdlib.h>
+ #endif
+ #include "rpcbind.h"
+@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long
+ 	long ans;
+ 	uid_t uid;
+ 	char uidbuf[32];
++	int rc = TRUE;
+ 
+ 	/*
+ 	 * Can't use getpwnam here. We might end up calling ourselves
+@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long
+ 
+ 	if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
+ 		svcerr_decode(xprt);
+-		return (FALSE);
++		rc = FALSE;
++		goto done;
+ 	}
+ #ifdef RPCBIND_DEBUG
+ 	if (debugging)
+@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long
+ 
+ 	if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) {
+ 		svcerr_weakauth(xprt);
+-		return (FALSE);
++		rc = (FALSE);
++		goto done;
+ 	}
+ 
+ 	rpcbreg.r_prog = reg.pm_prog;
+@@ -258,7 +261,16 @@ done_change:
+ 		rpcbs_set(RPCBVERS_2_STAT, ans);
+ 	else
+ 		rpcbs_unset(RPCBVERS_2_STAT, ans);
+-	return (TRUE);
++done:
++	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
++		if (debugging) {
++			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
++			if (doabort) {
++				rpcbind_abort();
++			}
++		}
++	}
++	return (rc);
+ }
+ 
+ /* ARGSUSED */
+@@ -272,15 +284,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ #ifdef RPCBIND_DEBUG
+ 	char *uaddr;
+ #endif
++	int rc = TRUE;
+ 
+ 	if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
+ 		svcerr_decode(xprt);
+-		return (FALSE);
++		rc = FALSE;
++		goto done;
+ 	}
+ 
+ 	if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) {
+ 		svcerr_weakauth(xprt);
+-		return FALSE;
++		rc = FALSE;
++		goto done;
+ 	}
+ 
+ #ifdef RPCBIND_DEBUG
+@@ -330,21 +345,34 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ 		pmap_ipprot2netid(reg.pm_prot) ?: "<unknown>",
+ 		port ? udptrans : "");
+ 
+-	return (TRUE);
++done:
++	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
++		if (debugging) {
++			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
++			if (doabort) {
++				rpcbind_abort();
++			}
++		}
++	}
++	return (rc);
+ }
+ 
+ /* ARGSUSED */
+ static bool_t
+ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ {
++	int rc = TRUE;
++
+ 	if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) {
+ 		svcerr_decode(xprt);
+-		return (FALSE);
++		rc = FALSE;
++		goto done;
+ 	}
+ 
+ 	if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) {
+ 		svcerr_weakauth(xprt);
+-		return FALSE;
++		rc = FALSE;
++		goto done;
+ 	}
+ 	
+ 	if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr,
+@@ -354,7 +382,17 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ 			rpcbind_abort();
+ 		}
+ 	}
+-	return (TRUE);
++
++done:
++	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) {
++		if (debugging) {
++			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
++			if (doabort) {
++				rpcbind_abort();
++			}
++		}
++	}
++	return (rc);
+ }
+ 
+ int pmap_netid2ipprot(const char *netid)
+diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c
+index bd92201..0c22a9d 100644
+--- a/src/rpcb_svc.c
++++ b/src/rpcb_svc.c
+@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp)
+ 		svcerr_decode(transp);
+ 		if (debugging)
+ 			(void) xlog(LOG_DEBUG, "rpcbind: could not decode");
+-		return;
++		goto done;
+ 	}
+ 
+ 	if (rqstp->rq_proc == RPCBPROC_SET
+diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c
+index b673452..3e37b54 100644
+--- a/src/rpcb_svc_4.c
++++ b/src/rpcb_svc_4.c
+@@ -220,7 +220,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp)
+ 		svcerr_decode(transp);
+ 		if (debugging)
+ 			(void) xlog(LOG_DEBUG, "rpcbind: could not decode\n");
+-		return;
++		goto done;
+ 	}
+ 
+ 	if (rqstp->rq_proc == RPCBPROC_SET
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index ff9ce6b..98ede61 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -931,6 +931,14 @@ error:
+ 	if (call_msg.rm_xid != 0)
+ 		(void) free_slot_by_xid(call_msg.rm_xid);
+ out:
++	if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) {
++		if (debugging) {
++			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
++			if (doabort) {
++				rpcbind_abort();
++			}
++		}
++	}
+ 	if (local_uaddr)
+ 		free(local_uaddr);
+ 	if (buf_alloc)
+-- 
+2.11.0
+
-- 
2.11.0

^ 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