Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] PATCH [1/1] fix  building QT with uclibc 0.9.31
From: Sagaert Johan @ 2010-06-14 10:10 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <87bpbef1un.fsf@macbook.be.48ers.dk>

 
Hi Peter

Did you build the JavaScriptCore and Multimedia module ?

I had a build error : pthread_getattr_np is not defined in uclibc,
there was a workaround for uclibc 0.9.30.x but not for 0.9.31.

Snippet from the patch.

 #if __UCLIBC_MAJOR__ == 0 && \
     (__UCLIBC_MINOR__ < 9 || \
-    (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 30))
+    (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 31))
 #define UCLIBC_USE_PROC_SELF_MAPS 1
 #include <stdio_ext.h>

 

-----Oorspronkelijk bericht-----
Van: Peter Korsgaard [mailto:jacmet at gmail.com] Namens Peter Korsgaard
Verzonden: maandag 14 juni 2010 10:36
Aan: Sagaert Johan
CC: buildroot at busybox.net
Onderwerp: Re: PATCH [1/1] fix building QT with uclibc 0.9.31

>>>>> "Sagaert" == Sagaert Johan <sagaert.johan@skynet.be> writes:

 Sagaert> diff -rupN
buildroot-2010.05/package/qt/qt-4.6.2-pthread_getattr_np.patch

What does this fix? I've build qt-4.6.2 several times with uclibc 0.9.31 /
gcc 4.4.4 without problems?

--
Bye, Peter Korsgaard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt-4.6.2-pthread_getattr_np.patch
Type: application/octet-stream
Size: 3819 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100614/b970cfeb/attachment.obj>

^ permalink raw reply

* [Buildroot] [PATCH 3/4] ffmpeg: allow customization of codecs, (de)muxers and other components
From: Peter Korsgaard @ 2010-06-14 11:25 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <L40153$4B4F2698302B94CA4D89952637FD93F6@aruba.it>

>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:

Hi,

 >> Not the foreach, but the ifneq (....,"all") would break if the user
 >> ended up setting it to "all " or " all" or similar.

 Luca> Sorry, now I got what you mean.

 Luca> Why do you say qstrip+strip anyway? qstrip does strip itself:

Ahh yes, then just qstrip.

 Luca> So I would do:
 Luca> -ifneq ($(BR2_PACKAGE_FFMPEG_ENCODERS),"all")
 Luca> +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all)

 Luca> If that's ok, it will be in the re-submitted patches.

Yes please.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [pull request] Pull request for branch ext-toolchain-fixes
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot

Hello,

Here is a patch set improving the support for external toolchains,
after testing with Buildroot x86-64 toolchain, Crosstool-NG x86-64
toolchain, MIPS and PowerPC CodeSourcery toolchains.

The MIPS CodeSourcery toolchain is not fully supported yet: it is a
very smart multilib toolchain, which supports both glibc and uclibc in
a single toolchain, with -muclibc being the gcc flag to switch to
uClibc. For the moment, only the default variant (glibc) is supported.

This patchset only touches toolchain/external-toolchain/ext-tool.mk,
except for a patch that is added to uClibc to fix fcntl64() on 64 bits
targets. This patch is already upstream in the master branch, and a
bug has been filled into the uClibc bug tracker to ask for this patch
to be merged into the 0.9.31 branch.

Thomas

The following changes since commit 7c709f4affc44f3bbc9a09fec8d84ae3807e31e7:
  Peter Korsgaard (1):
        file: don't force _GNU_SOURCE in CFLAGS

are available in the git repository at:

  git://git.busybox.net/~tpetazzoni/git/buildroot ext-toolchain-fixes

Thomas Petazzoni (10):
      ext-toolchains: take into account other Glibc dynamic loader variants
      ext-toolchain: Fix ARCH_SYSROOT detection
      external-toolchain: only copy existing directories of the sysroot
      external-toolchain: support 64 bits glibc toolchains
      external-toolchain: create lib64 symlinks if needed
      external-toolchain: mention MIPS and PowerPC CodeSourcery toolchains
      external-toolchain: recognize uClibc 64 bits toolchains
      uclibc: add patch to fix fcntl64() on 64 bits targets
      external-toolchain: handle libstdc++/libgcc_s for BR toolchains
      external-toolchain: hardcode the destination directory for a library

 toolchain/external-toolchain/ext-tool.mk           |   92 +++++++++++++-------
 ...ibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch |   34 +++++++
 2 files changed, 96 insertions(+), 30 deletions(-)
 create mode 100644 toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch

Thanks,
-- 
Thomas Petazzoni

^ permalink raw reply

* [Buildroot] [PATCH 01/10] ext-toolchains: take into account other Glibc dynamic loader variants
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

External toolchains using Glibc have different names for the dynamic
loader. Some of them name it ld-linux.so.*, while some others (such as
the PowerPC and MIPS CodeSourcery toolchains) name it simply ld.so.*.

Therefore, we fix the glibc detection code to handle this case.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/external-toolchain/ext-tool.mk |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 8daae15..3943ceb 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -155,7 +155,7 @@ check_glibc_feature = \
 #
 check_glibc = \
 	SYSROOT_DIR="$(strip $1)"; \
-	if ! test -f $${SYSROOT_DIR}/lib/ld-linux.so.* ; then \
+	if ! test -f $${SYSROOT_DIR}/lib/ld-linux.so.* -o -f $${SYSROOT_DIR}/lib/ld.so.* ; then \
 		echo "Incorrect selection of the C library"; \
 		exit -1; \
 	fi; \
@@ -251,11 +251,9 @@ check_cross_compiler_exists = \
 
 uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed
 
-EXTERNAL_LIBS=libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
-EXTERNAL_LIBS+=ld-uClibc.so
-else
-EXTERNAL_LIBS+=ld-linux.so libnss_files.so libnss_dns.so
+EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GCLIBC),y)
+EXTERNAL_LIBS+=libnss_files.so libnss_dns.so
 endif
 
 ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 02/10] ext-toolchain: Fix ARCH_SYSROOT detection
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

For the detection of the ARCH_SYSROOT_DIR (which contains the C
library variant specific to the compiler flags), we used to pass only
the -march argument instead of the full TARGET_CFLAGS. This was done
because TARGET_CFLAGS contains --sysroot, and we don't want to tell
here the compiler which sysroot to use, because we're specifically
asking the compiler where the *normal* arch sysroot directory is.

Unfortunately, there are some multilib variants that aren't decided
only based on -march, but also on -msoft-float or other compiler
flags. Therefore, we take the opposite approach: pass the full
TARGET_CFLAGS, from which we have stripped the --sysroot option.

For example, this allows a PowerPC CodeSourcery toolchain, on which
we're using the soft-float multilib variant, to work properly as an
external toolchain.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/external-toolchain/ext-tool.mk |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 3943ceb..b1eee23 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -270,9 +270,10 @@ endif # ! no threads
 # SYSROOT_DIR selection. We first try the -print-sysroot option,
 # available in gcc 4.4.x and in some Codesourcery toolchains. If this
 # option is not available, we fallback to the value of --with-sysroot
-# as visible in CROSS-gcc -v. We don't pass the -march= option to gcc
-# as we want the "main" sysroot, which contains all variants of the C
-# library in the case of multilib toolchains.
+# as visible in CROSS-gcc -v. We don't pass any option to gcc that
+# could select a multilib variant as we want the "main" sysroot, which
+# contains all variants of the C library in the case of multilib
+# toolchains.
 SYSROOT_DIR=$(shell $(TARGET_CC) -print-sysroot 2>/dev/null)
 ifeq ($(SYSROOT_DIR),)
 SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC) -print-file-name=libc.a |sed -r -e 's:usr/lib/libc\.a::;'))
@@ -281,15 +282,14 @@ endif
 # Now, find if the toolchain specifies a sub-directory for the
 # specific architecture variant we're interested in. This is the case
 # with multilib toolchain, when the selected architecture variant is
-# not the default one. To do so, we ask the compiler by passing the
-# appropriate -march= flags. ARCH_SUBDIR will contain the
+# not the default one. To do so, we ask the compiler by passing all
+# flags, except the --sysroot flag since we want to the compiler to
+# tell us where its original sysroot is. ARCH_SUBDIR will contain the
 # subdirectory, in the main SYSROOT_DIR, that corresponds to the
 # selected architecture variant. ARCH_SYSROOT_DIR will contain the
 # full path to this location.
-ifneq ($(CC_TARGET_ARCH_),)
-TARGET_CC_ARCH_CFLAGS+=-march=$(CC_TARGET_ARCH_)
-endif
-ARCH_SUBDIR=$(shell $(TARGET_CC) $(TARGET_CC_ARCH_CFLAGS) -print-multi-directory)
+TARGET_CFLAGS_NO_SYSROOT=$(filter-out --sysroot=%,$(TARGET_CFLAGS))
+ARCH_SUBDIR=$(shell $(TARGET_CC) $(TARGET_CFLAGS_NO_SYSROOT) -print-multi-directory)
 ARCH_SYSROOT_DIR=$(SYSROOT_DIR)/$(ARCH_SUBDIR)
 
 $(STAMP_DIR)/ext-toolchain-installed:
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 03/10] external-toolchain: only copy existing directories of the sysroot
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

Instead of copying all directories in "etc lib sbin usr", check that
each of them exists before doing the copy. This is only to avoid an
harmless error message.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/external-toolchain/ext-tool.mk |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index b1eee23..9c1ec8f 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -120,7 +120,9 @@ copy_toolchain_sysroot = \
 	ARCH_SYSROOT_DIR="$(strip $2)"; \
 	ARCH_SUBDIR="$(strip $3)"; \
 	for i in etc lib sbin usr ; do \
-		cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
+		if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
+			cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
+		fi ; \
 	done ; \
 	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
 		if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 04/10] external-toolchain: support 64 bits glibc toolchains
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

On 64 bits glibc toolchains, the dynamic loader is named
ld-linux-x86-64.so and not simply ld-linux.so. So, adjust the
detection of the C library accordingly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/external-toolchain/ext-tool.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 9c1ec8f..a181f25 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -157,7 +157,7 @@ check_glibc_feature = \
 #
 check_glibc = \
 	SYSROOT_DIR="$(strip $1)"; \
-	if ! test -f $${SYSROOT_DIR}/lib/ld-linux.so.* -o -f $${SYSROOT_DIR}/lib/ld.so.* ; then \
+	if ! test -f $${SYSROOT_DIR}/lib/ld-linux*.so.* -o -f $${SYSROOT_DIR}/lib/ld.so.* ; then \
 		echo "Incorrect selection of the C library"; \
 		exit -1; \
 	fi; \
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 05/10] external-toolchain: create lib64 symlinks if needed
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

Create lib64 -> lib and usr/lib64 -> usr/lib symbolic links in the
target and staging directories. This is needed for some 64 bits
toolchains such as the Crosstool-NG toolchains, for which the path to
the dynamic loader and other libraries is /lib64, but the libraries
are stored in /lib.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/external-toolchain/ext-tool.mk |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index a181f25..d5a64b5 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -133,6 +133,19 @@ copy_toolchain_sysroot = \
 	find $(STAGING_DIR) -type d | xargs chmod 755
 
 #
+# Create lib64 -> lib and usr/lib64 -> usr/lib symbolic links in the
+# target and staging directories. This is needed for some 64 bits
+# toolchains such as the Crosstool-NG toolchains, for which the path
+# to the dynamic loader and other libraries is /lib64, but the
+# libraries are stored in /lib.
+#
+create_lib64_symlinks = \
+	(cd $(TARGET_DIR) ;      ln -s lib lib64) ; \
+	(cd $(TARGET_DIR)/usr ;  ln -s lib lib64) ; \
+	(cd $(STAGING_DIR) ;     ln -s lib lib64) ; \
+	(cd $(STAGING_DIR)/usr ; ln -s lib lib64)
+
+#
 # Check the availability of a particular glibc feature. We assume that
 # all Buildroot toolchain options are supported by glibc, so we just
 # check that they are enabled.
@@ -319,4 +332,8 @@ endif
 	done
 	@echo "Copy external toolchain sysroot to staging..."
 	$(Q)$(call copy_toolchain_sysroot,$(SYSROOT_DIR),$(ARCH_SYSROOT_DIR),$(ARCH_SUBDIR))
+	# Create lib64 symbolic links if needed
+	$(Q)if [ -L $(ARCH_SYSROOT_DIR)/lib64 ] ; then \
+		$(call create_lib64_symlinks) ; \
+	fi
 	@touch $@
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 06/10] external-toolchain: mention MIPS and PowerPC CodeSourcery toolchains
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/external-toolchain/ext-tool.mk |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index d5a64b5..d591781 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -7,7 +7,9 @@
 #
 #  * Toolchains generated by Crosstool-NG
 #  * Toolchains generated by Buildroot
-#  * ARM toolchains made available by Codesourcery
+#  * ARM, MIPS and PowerPC toolchains made available by
+#    Codesourcery. For the MIPS toolchain, the -muclibc variant isn't
+#    supported yet, only the default glibc-based variant is.
 #
 # The basic principle is the following
 #
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 07/10] external-toolchain: recognize uClibc 64 bits toolchains
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

With uClibc 64 bits toolchain, the dynamic loader is named
ld64-uClibc.so.0 and not ld-uClibc.so.0. So, this commit adjust the
uClibc detection code for external toolchains.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/external-toolchain/ext-tool.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index d591781..3996184 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -216,7 +216,7 @@ check_uclibc_feature = \
 #
 check_uclibc = \
 	SYSROOT_DIR="$(strip $1)"; \
-	if ! test -f $${SYSROOT_DIR}/lib/ld-uClibc.so.* ; then \
+	if ! test -f $${SYSROOT_DIR}/lib/ld*-uClibc.so.* ; then \
 		echo "Incorrect selection of the C library"; \
 		exit -1; \
 	fi; \
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 08/10] uclibc: add patch to fix fcntl64() on 64 bits targets
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

The patch is already in upstream uClibc, in the master branch, at
http://git.buildroot.net/uClibc/commit/?id=6f1daaaf2d94c1e6184add44eda38b0781b88cf0.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...ibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch |   34 ++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)
 create mode 100644 toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch

diff --git a/toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch b/toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch
new file mode 100644
index 0000000..763bfd3
--- /dev/null
+++ b/toolchain/uClibc/uClibc-0.9.31-fix-fcntl64-for-64-bit-targets.patch
@@ -0,0 +1,34 @@
+From 6f1daaaf2d94c1e6184add44eda38b0781b88cf0 Mon Sep 17 00:00:00 2001
+From: Rob Landley <rob@landley.net>
+Date: Sun, 16 May 2010 21:41:36 +0000
+Subject: Fix fcntl64 for 64 bit targets.
+
+64 bit targets often don't have a separate fcntl64() system call, because they don't need one.
+
+Signed-off-by: Rob Landley <rob@landley.net>
+Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
+---
+diff --git a/include/fcntl.h b/include/fcntl.h
+index e37073f..3cfb25f 100644
+--- a/include/fcntl.h
++++ b/include/fcntl.h
+@@ -73,7 +73,7 @@ __BEGIN_DECLS
+ 
+    This function is a cancellation point and therefore not marked with
+    __THROW.  */
+-#ifndef __USE_FILE_OFFSET64
++#if !defined(__USE_FILE_OFFSET64) || defined(__LP64__)
+ extern int fcntl (int __fd, int __cmd, ...);
+ libc_hidden_proto(fcntl)
+ #else
+@@ -83,7 +83,7 @@ extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
+ #  define fcntl fcntl64
+ # endif
+ #endif
+-#ifdef __USE_LARGEFILE64
++#if defined(__USE_LARGEFILE64) && !defined(__LP64__)
+ extern int fcntl64 (int __fd, int __cmd, ...);
+ libc_hidden_proto(fcntl64)
+ #endif
+--
+cgit v0.8.2.1
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 09/10] external-toolchain: handle libstdc++/libgcc_s for BR toolchains
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

Most toolchains have their libraries either in /lib or /usr/lib
relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however,
have basic libraries in /lib, and libstdc++/libgcc_s in
/usr/<target-name>/lib(64).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/external-toolchain/ext-tool.mk |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 3996184..1c84893 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -42,6 +42,11 @@
 # directory to the target directory. Also optionaly strips the
 # library.
 #
+# Most toolchains have their libraries either in /lib or /usr/lib
+# relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however,
+# have basic libraries in /lib, and libstdc++/libgcc_s in
+# /usr/<target-name>/lib(64).
+#
 # $1: arch specific sysroot directory
 # $2: library name
 # $3: destination directory
@@ -52,7 +57,11 @@ copy_toolchain_lib_root = \
 	LIB="$(strip $2)"; \
 	STRIP="$(strip $4)"; \
  \
-	LIBS=`(cd $${ARCH_SYSROOT_DIR}; find . -path "./lib/$${LIB}.*" -o -path "./usr/lib/$${LIB}.*")` ; \
+	LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
+		find -L . -path "./lib/$${LIB}.*"     -o \
+			  -path "./usr/lib/$${LIB}.*" -o \
+			  -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
+		)` ; \
 	for FILE in $${LIBS} ; do \
 		LIB=`basename $${FILE}`; \
 		LIBDIR=`dirname $${FILE}` ; \
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 10/10] external-toolchain: hardcode the destination directory for a library
From: Thomas Petazzoni @ 2010-06-14 11:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1276516273.git.thomas.petazzoni@free-electrons.com>

Until now, the function copy_toolchain_lib_root was copying a given
library to the target filesystem by assuming that it should be at the
same place it was in the toolchain sysroot.

However, with Buildroot hiding libstdc++ in
/usr/<target-name>/lib(64), this isn't correct, and it is probably
safer not to rely on the toolchain organization anyway.

Therefore :

 * Instead of having a single EXTERNAL_LIBS variable, we now have
   LIB_EXTERNAL_LIBS and USR_LIB_EXTERNAL_LIBS, which respectively
   list the libraries that should be copied to /lib and /usr/lib. As
   of today, only libstdc++ is part of the second list.

 * The copy_toolchain_lib_root takes another argument, which is the
   destination directory of the library, relative to $(TARGET_DIR)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/external-toolchain/ext-tool.mk |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 1c84893..7ca138b 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -49,12 +49,13 @@
 #
 # $1: arch specific sysroot directory
 # $2: library name
-# $3: destination directory
+# $3: destination directory of the libary, relative to $(TARGET_DIR)
 # $4: strip (y|n), default is to strip
 #
 copy_toolchain_lib_root = \
 	ARCH_SYSROOT_DIR="$(strip $1)"; \
 	LIB="$(strip $2)"; \
+	DESTDIR="$(strip $3)" ; \
 	STRIP="$(strip $4)"; \
  \
 	LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
@@ -67,17 +68,17 @@ copy_toolchain_lib_root = \
 		LIBDIR=`dirname $${FILE}` ; \
 		while test \! -z "$${LIB}"; do \
 			FULLPATH="$${ARCH_SYSROOT_DIR}/$${LIBDIR}/$${LIB}" ; \
-			rm -fr $(TARGET_DIR)/$${LIBDIR}/$${LIB}; \
-			mkdir -p $(TARGET_DIR)/$${LIBDIR}; \
+			rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIB}; \
+			mkdir -p $(TARGET_DIR)/$${DESTDIR}; \
 			if test -h $${FULLPATH} ; then \
-				cp -d $${FULLPATH} $(TARGET_DIR)/$${LIBDIR}/; \
+				cp -d $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/; \
 			elif test -f $${FULLPATH}; then \
-				$(INSTALL) -D -m0755 $${FULLPATH} $(TARGET_DIR)/$${LIBDIR}/$${LIB}; \
+				$(INSTALL) -D -m0755 $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIB}; \
 				case "$${STRIP}" in \
 				(0 | n | no) \
 ;; \
 				(*) \
-					$(TARGET_CROSS)strip "$(TARGET_DIR)/$${LIBDIR}/$${LIB}"; \
+					$(TARGET_CROSS)strip "$(TARGET_DIR)/$${DESTDIR}/$${LIB}"; \
 ;; \
 				esac; \
 			else \
@@ -277,19 +278,19 @@ check_cross_compiler_exists = \
 
 uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed
 
-EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
+LIB_EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GCLIBC),y)
-EXTERNAL_LIBS+=libnss_files.so libnss_dns.so
+LIB_EXTERNAL_LIBS+=libnss_files.so libnss_dns.so
 endif
 
 ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
-EXTERNAL_LIBS+=libstdc++.so
+USR_LIB_EXTERNAL_LIBS+=libstdc++.so
 endif
 
 ifneq ($(BR2_PTHREADS_NONE),y)
-EXTERNAL_LIBS+=libpthread.so
+LIB_EXTERNAL_LIBS+=libpthread.so
 ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
-EXTERNAL_LIBS+=libthread_db.so
+LIB_EXTERNAL_LIBS+=libthread_db.so
 endif # gdbserver
 endif # ! no threads
 
@@ -338,8 +339,11 @@ else
 endif
 	mkdir -p $(TARGET_DIR)/lib
 	@echo "Copy external toolchain libraries to target..."
-	$(Q)for libs in $(EXTERNAL_LIBS); do \
-		$(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
+	$(Q)for libs in $(LIB_EXTERNAL_LIBS); do \
+		$(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
+	done
+	$(Q)for libs in $(USR_LIB_EXTERNAL_LIBS); do \
+		$(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/usr/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
 	done
 	@echo "Copy external toolchain sysroot to staging..."
 	$(Q)$(call copy_toolchain_sysroot,$(SYSROOT_DIR),$(ARCH_SYSROOT_DIR),$(ARCH_SUBDIR))
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH] Fix potentially conflicting build flags
From: Paul Jones @ 2010-06-14 12:36 UTC (permalink / raw)
  To: buildroot

Change the default target optimisation value so
it does not conflict with gcc optimization level

Signed-off-by: Paul Jones <paul@pauljones.id.au>
---
 toolchain/Config.in.2 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/toolchain/Config.in.2 b/toolchain/Config.in.2
index 595ab87..71bded2 100644
--- a/toolchain/Config.in.2
+++ b/toolchain/Config.in.2
@@ -159,9 +159,10 @@ config BR2_INSTALL_LIBSTDCPP
 
 config BR2_TARGET_OPTIMIZATION
 	string "Target Optimizations"
-	default "-Os -pipe"
+	default "-pipe"
 	help
 	  Optimizations to use when building for the target host.
+	  NOTE: gcc optimization level is defined in build options.
 
 if BR2_TOOLCHAIN_BUILDROOT
 source "toolchain/elf2flt/Config.in"
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH] Add support for *.tbz2 package archives
From: Paul Jones @ 2010-06-14 13:13 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Paul Jones <paul@pauljones.id.au>
---
 package/Makefile.package.in |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index cdf49f8..a2720d7 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -41,11 +41,12 @@ UPPERCASE = $(strip $(eval __tmp := $1) \
      $(__tmp))
 
 # Define extrators for different archive suffixes
-INFLATE.bz2 = $(BZCAT)
-INFLATE.gz  = $(ZCAT)
-INFLATE.tbz = $(BZCAT)
-INFLATE.tgz = $(ZCAT)
-INFLATE.tar = cat
+INFLATE.bz2  = $(BZCAT)
+INFLATE.gz   = $(ZCAT)
+INFLATE.tbz  = $(BZCAT)
+INFLATE.tbz2 = $(BZCAT)
+INFLATE.tgz  = $(ZCAT)
+INFLATE.tar  = cat
 
 # MESSAGE Macro -- display a message in bold type
 MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH] Display current action in title bar
From: Paul Jones @ 2010-06-14 13:47 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Paul Jones <paul@pauljones.id.au>
---
 package/Makefile.package.in |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index a2720d7..327ab92 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -48,8 +48,9 @@ INFLATE.tbz2 = $(BZCAT)
 INFLATE.tgz  = $(ZCAT)
 INFLATE.tar  = cat
 
-# MESSAGE Macro -- display a message in bold type
-MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+# MESSAGE Macro -- display a message in bold type and in the title bar
+MESSAGE  = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" \
+		&& echo -en "\033]2; $($(PKG)_NAME) $($(PKG)_VERSION) $(1) \007"
 TERM_BOLD := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)
 
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH 05/49] u-boot: remove ancient versions
From: Jonathan dumaresq @ 2010-06-14 13:51 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <4cbd9ed6131651f029fcc93deecf6e9b9ac9a6a5.1276352308.git.thomas.petazzoni@free-electrons.com>

Hi Thomas,

Like I already said, removing the 2008.10 version will broke the atngw100
target and stk1000 too. I wonder if we can use the GIT version of Haavard
Skinnemoen directly. I have not use it and tested it but this tree should
work. 
I think only this patch is needed to get the atngw100 bord working

http://git.denx.de/?p=u-boot/u-boot-avr32.git;a=commit;h=fc3174ef4dc5a90d528
58e37505c51573fc3cfe3

Again I couldn't confirm it. 

Jonathan

buildroot-bounces at busybox.net wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  boot/u-boot/Config.in |   26 --------------------------
>  1 files changed, 0 insertions(+), 26 deletions(-)
> 
> diff --git a/boot/u-boot/Config.in b/boot/u-boot/Config.in index
> b07e67c..49d66c4 100644 --- a/boot/u-boot/Config.in
> +++ b/boot/u-boot/Config.in
> @@ -25,26 +25,6 @@ config BR2_TARGET_UBOOT_2009_11  config
>  	BR2_TARGET_UBOOT_2009_08 bool "u-boot-2009.08"
> 
> -config BR2_TARGET_UBOOT_2009_06
> -	bool "u-boot-2009.06"
> -	depends on BR2_DEPRECATED
> -
> -config BR2_TARGET_UBOOT_2009_03
> -	bool "u-boot-2009.03"
> -	depends on BR2_DEPRECATED
> -
> -config BR2_TARGET_UBOOT_2009_01
> -	bool "u-boot-2009.01"
> -	depends on BR2_DEPRECATED
> -
> -config BR2_TARGET_UBOOT_2008_10
> -	bool "u-boot-2008.10"
> -	depends on BR2_DEPRECATED
> -
> -config BR2_TARGET_UBOOT_1_2_0_ATMEL
> -	bool "u-boot-1.2.0-atmel"
> -	depends on BR2_TARGET_AT91
> -
>  endchoice
> 
>  config BR2_UBOOT_VERSION
> @@ -52,15 +32,9 @@ config BR2_UBOOT_VERSION
>  	default "2010.03"	if BR2_TARGET_UBOOT_2010_03
>  	default "2009.11"	if BR2_TARGET_UBOOT_2009_11
>  	default "2009.08"	if BR2_TARGET_UBOOT_2009_08
> -	default "2009.06"	if BR2_TARGET_UBOOT_2009_06
> -	default "2009.03"	if BR2_TARGET_UBOOT_2009_03
> -	default "2009.01"	if BR2_TARGET_UBOOT_2009_01
> -	default "2008.10"	if BR2_TARGET_UBOOT_2008_10
> -	default "1.2.0-atmel"	if BR2_TARGET_UBOOT_1_2_0_ATMEL
> 
>  config BR2_U_BOOT_SITE
>  	string
> -	default "$(BR2_ATMEL_MIRROR)"		if
BR2_TARGET_UBOOT_1_2_0_ATMEL
>  	default "ftp://ftp.denx.de/pub/u-boot"
> 
>  source "target/device/Config.in.u-boot"
> --
> 1.7.0.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply

* [Buildroot] Annoying... nothing work at all :-(
From: Jonathan dumaresq @ 2010-06-14 13:55 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1276398794.8108.31.camel@localhost>

Hi,

I think you should provide the error messages and .config file too to have
some answer...

Jonathan
buildroot-bounces at busybox.net wrote:
> Hi all.
> 
> I'm trying for several days to get a simple working result with
> buildroot. Nothing. 
> 
> I'm very surprised!
> 
> The source PC is a regular Fedora12 AMD quadcore.
> 
> The target is a MiniITX single board regular Atom PC, able to boot
> with all desktop OS, on a regular disk or a CompactFlash reader. 
> 
> - When invoking "make menuconfig && make" an ext2 image is created.
> OK but unbootable, without bootloader nor kernel. 
> 
> - When asking to add a bootloader, grub doesn't install properly on
> target image, config is not done. This part is broken. 
> 
> - When asking to add a CF/FAT16 bootloader, syslinux doesn't install
> at all on target image, this part is also broken since it does really
> nothing on the image :-)  
> 
> - When asking a kernel, attempts lead often to cryptic make errors
> and the whole buildroot tree has to be recreated from .tar.gz without
> kernel generation. The "kernel" menu in menuconfig is broken, and no
> kernel config is invoked at build or within menuconfig.   
> 
> - When invoking linux26-menuconfig (I'v found that one time), either
> nothing, or make errors, this one is also broken. 
> 
> Etc, etc...
> 
> - Why asking for installation of a bootloader that is never
> installed, nor configured on the target ? 
> 
> - Why asking for generation of a kernel that is never created and
> lead to corruption of buildroot tree ? 
> 
> etc, etc...
> 
> All produced forms of "target" are either incomplete, or unusable, or
> unbootable, when the commands are not ending with errors! 
> 
> Is there somewhere an USABLE documentation?
> 
> A step-by-step tutorial ? With exemple and results ?
> 
> I'm not a newbie to linux, but this "buildroot project" seems for
> sure not usable before years of improvements... 
> 
> Comments would be appreciated.
> 
> Regards.
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply

* [Buildroot] Annoying... nothing work at all :-(
From: sani.broyeur at free.fr @ 2010-06-14 14:02 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <22DB3ABB269549758E8D79D540845F90@cimeq.ca>

Thanks Jonathan, I'm working on it :-)

Let's say that my bad experience is a mix (on my own) of misunderstanding,
unusual config and... one bug found by Thomas :-)

I'll try last snapshot this evening.

Regards.


Selon Jonathan dumaresq <jdumaresq@cimeq.qc.ca>:

> Hi,
>
> I think you should provide the error messages and .config file too to have
> some answer...
>
> Jonathan
> buildroot-bounces at busybox.net wrote:
> > Hi all.
> >
> > I'm trying for several days to get a simple working result with
> > buildroot. Nothing.
> >
> > I'm very surprised!
> >
> > The source PC is a regular Fedora12 AMD quadcore.
> >
> > The target is a MiniITX single board regular Atom PC, able to boot
> > with all desktop OS, on a regular disk or a CompactFlash reader.
> >
> > - When invoking "make menuconfig && make" an ext2 image is created.
> > OK but unbootable, without bootloader nor kernel.
> >
> > - When asking to add a bootloader, grub doesn't install properly on
> > target image, config is not done. This part is broken.
> >
> > - When asking to add a CF/FAT16 bootloader, syslinux doesn't install
> > at all on target image, this part is also broken since it does really
> > nothing on the image :-)
> >
> > - When asking a kernel, attempts lead often to cryptic make errors
> > and the whole buildroot tree has to be recreated from .tar.gz without
> > kernel generation. The "kernel" menu in menuconfig is broken, and no
> > kernel config is invoked at build or within menuconfig.
> >
> > - When invoking linux26-menuconfig (I'v found that one time), either
> > nothing, or make errors, this one is also broken.
> >
> > Etc, etc...
> >
> > - Why asking for installation of a bootloader that is never
> > installed, nor configured on the target ?
> >
> > - Why asking for generation of a kernel that is never created and
> > lead to corruption of buildroot tree ?
> >
> > etc, etc...
> >
> > All produced forms of "target" are either incomplete, or unusable, or
> > unbootable, when the commands are not ending with errors!
> >
> > Is there somewhere an USABLE documentation?
> >
> > A step-by-step tutorial ? With exemple and results ?
> >
> > I'm not a newbie to linux, but this "buildroot project" seems for
> > sure not usable before years of improvements...
> >
> > Comments would be appreciated.
> >
> > Regards.
> >
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
>
>

^ permalink raw reply

* [Buildroot] Valgrind compilation, with patch 3.5.0, need help
From: Damien Borie @ 2010-06-14 15:10 UTC (permalink / raw)
  To: buildroot

Hello,

I Have to add Valgrind to my distribution to debug my programs. The 
version in buildroot doesn't compile because it needs glibc 2.2 -2.5, 
and I have 2.9. So I tried with the patch to bump to Valgrind 3.5.0. But 
it ask me fro a file to patch, and I don't understand what I must type 
to apply correctly the patch and compile Valgrind. In the match itself, 
I cannot see indications about this file to choose.

Please, can somebody help me?

Thanks,

-- 
Damien Borie

TERAWATT / AENERGIA S.A.S.
ZA DUBOSCOA
64990 Villefranque
FRANCE 

tel : +33 (0)5 59 44 26 08
fax : +33 (0)5 59 31 15 11 

^ permalink raw reply

* [Buildroot] Valgrind compilation, with patch 3.5.0, need help
From: Thomas Petazzoni @ 2010-06-14 15:37 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <4C164671.2050903@terawatt.fr>

On Mon, 14 Jun 2010 17:10:41 +0200
Damien Borie <dbe@terawatt.fr> wrote:

> I Have to add Valgrind to my distribution to debug my programs. The 
> version in buildroot doesn't compile because it needs glibc 2.2 -2.5, 
> and I have 2.9. So I tried with the patch to bump to Valgrind 3.5.0.
> But it ask me fro a file to patch, and I don't understand what I must
> type to apply correctly the patch and compile Valgrind. In the match
> itself, I cannot see indications about this file to choose.

What is your target architecture ? Remember that Valgrind only works on
x86, x86_64 and PowerPC 32/64.

Moreover, I don't really see how Valgrind in Buildroot would depend on
a particular version of glibc. Can you be more specific about what
you're doing and the exact result of the commands you're using ?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply

* [Buildroot] [PATCH v2] Add ffmpeg support
From: Luca Ceresoli @ 2010-06-14 19:41 UTC (permalink / raw)
  To: buildroot

FFmpeg is a complete, cross-platform solution to record, convert and stream
audio and video. It includes libavcodec - the leading audio/video codec library.

This patchset adds support for building ffmpeg in buildroot.

Most high-level options are provided via kconfig options, and there is a hook
in the last commit to allow passing .configure any parameters not directly
supported (very handy for machine support, for example).

Note that this support is much more complete than the one in bug 401
(https://bugs.busybox.net/show_bug.cgi?id=401).

v2 includes improvements suggested by Peter Korsgaard.

Thanks,
Luca

ffmpeg: add new package
ffmpeg: add commandline programs
ffmpeg: allow customization of codecs, (de)muxers and other components
ffmpeg: add user-defined configure parameters

 package/multimedia/Config.in                       |    1 +
 package/multimedia/ffmpeg/Config.in                |  141 +++++++++++++++++++
 .../ffmpeg-0.5.2-fix-sdl-config-search.patch       |   17 +++
 package/multimedia/ffmpeg/ffmpeg.mk                |  143 ++++++++++++++++++++

Luca

^ permalink raw reply

* [Buildroot] [PATCH v2 1/4] ffmpeg: add new package
From: Luca Ceresoli @ 2010-06-14 19:41 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1276544505-2969-1-git-send-email-luca@lucaceresoli.net>

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/multimedia/Config.in        |    1 +
 package/multimedia/ffmpeg/Config.in |   23 +++++++++++
 package/multimedia/ffmpeg/ffmpeg.mk |   72 +++++++++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+), 0 deletions(-)
 create mode 100644 package/multimedia/ffmpeg/Config.in
 create mode 100644 package/multimedia/ffmpeg/ffmpeg.mk

diff --git a/package/multimedia/Config.in b/package/multimedia/Config.in
index 3305f7b..3b0eec5 100644
--- a/package/multimedia/Config.in
+++ b/package/multimedia/Config.in
@@ -3,6 +3,7 @@ source "package/multimedia/alsa-lib/Config.in"
 source "package/multimedia/alsa-utils/Config.in"
 source "package/multimedia/aumix/Config.in"
 source "package/multimedia/flac/Config.in"
+source "package/multimedia/ffmpeg/Config.in"
 source "package/multimedia/gstreamer/Config.in"
 source "package/multimedia/gst-plugins-base/Config.in"
 source "package/multimedia/gst-plugins-good/Config.in"
diff --git a/package/multimedia/ffmpeg/Config.in b/package/multimedia/ffmpeg/Config.in
new file mode 100644
index 0000000..7004a11
--- /dev/null
+++ b/package/multimedia/ffmpeg/Config.in
@@ -0,0 +1,23 @@
+menuconfig BR2_PACKAGE_FFMPEG
+	bool "ffmpeg"
+	help
+         FFmpeg is a complete, cross-platform solution to record, convert
+         and stream audio and video.
+
+	 http://www.ffmpeg.org
+
+if BR2_PACKAGE_FFMPEG
+
+config BR2_PACKAGE_FFMPEG_GPL
+	bool "Enable GPL code"
+	help
+         allow use of GPL code, the resulting libs and binaries will
+         be under GPL
+
+config BR2_PACKAGE_FFMPEG_NONFREE
+	bool "Enable nonfree code"
+	help
+         allow use of nonfree code, the resulting libs and binaries
+         will be unredistributable
+
+endif
diff --git a/package/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk
new file mode 100644
index 0000000..5385937
--- /dev/null
+++ b/package/multimedia/ffmpeg/ffmpeg.mk
@@ -0,0 +1,72 @@
+#############################################################
+#
+# ffmpeg
+#
+#############################################################
+FFMPEG_VERSION := 0.5.2
+FFMPEG_SOURCE := ffmpeg-$(FFMPEG_VERSION).tar.bz2
+FFMPEG_SITE := http://ffmpeg.org/releases
+FFMPEG_INSTALL_STAGING = YES
+FFMPEG_INSTALL_TARGET = YES
+
+FFMPEG_CONF_OPT = \
+	--prefix=/usr		\
+	--enable-shared 	\
+	--disable-ffmpeg	\
+	--disable-ffplay	\
+	--disable-ffserver	\
+	--disable-avfilter	\
+	--disable-postproc	\
+	--disable-swscale	\
+	--disable-vhook		\
+
+ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
+FFMPEG_CONF_OPT += --enable-gpl
+else
+FFMPEG_CONF_OPT += --disable-gpl
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_NONFREE),y)
+FFMPEG_CONF_OPT += --enable-nonfree
+else
+FFMPEG_CONF_OPT += --disable-nonfree
+endif
+
+ifeq ($(BR2_PTHREADS_NONE),y)
+FFMPEG_CONF_OPT += --disable-pthreads
+else
+FFMPEG_CONF_OPT += --enable-pthreads
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+FFMPEG_CONF_OPT += --enable-zlib
+FFMPEG_DEPENDENCIES += zlib
+else
+FFMPEG_CONF_OPT += --disable-zlib
+endif
+
+# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others
+define FFMPEG_CONFIGURE_CMDS
+	(cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \
+	$(TARGET_CONFIGURE_OPTS) \
+	$(TARGET_CONFIGURE_ARGS) \
+	$(TARGET_CONFIGURE_ENV) \
+	$(FFMPEG_CONF_ENV) \
+	./configure \
+		--enable-cross-compile	\
+		--cross-prefix=$(TARGET_CROSS) \
+		--sysroot=$(STAGING_DIR) \
+		--host-cc=$(HOSTCC) \
+		--arch=$(BR2_ARCH) \
+		--extra-cflags=-fPIC \
+		$(DISABLE_NLS) \
+		$(DISABLE_LARGEFILE) \
+		$(DISABLE_IPV6) \
+		$(FFMPEG_CONF_OPT) \
+	)
+endef
+
+# Override FFMPEG_INSTALL_TARGET_OPT: FFmpeg does not support install-strip
+FFMPEG_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
+
+$(eval $(call AUTOTARGETS,package/multimedia,ffmpeg))
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH v2 2/4] ffmpeg: add commandline programs
From: Luca Ceresoli @ 2010-06-14 19:41 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1276544505-2969-1-git-send-email-luca@lucaceresoli.net>

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/multimedia/ffmpeg/Config.in                |   23 ++++++++++++++++++++
 .../ffmpeg-0.5.2-fix-sdl-config-search.patch       |   17 ++++++++++++++
 package/multimedia/ffmpeg/ffmpeg.mk                |   23 +++++++++++++++++--
 3 files changed, 60 insertions(+), 3 deletions(-)
 create mode 100644 package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch

diff --git a/package/multimedia/ffmpeg/Config.in b/package/multimedia/ffmpeg/Config.in
index 7004a11..fe6814f 100644
--- a/package/multimedia/ffmpeg/Config.in
+++ b/package/multimedia/ffmpeg/Config.in
@@ -20,4 +20,27 @@ config BR2_PACKAGE_FFMPEG_NONFREE
          allow use of nonfree code, the resulting libs and binaries
          will be unredistributable
 
+config BR2_PACKAGE_FFMPEG_FFMPEG
+	bool "Build ffmpeg (the command line application)"
+	default y
+	help
+         FFmpeg is a very fast video and audio converter.
+         It can also grab from a live audio/video source.
+
+         It is not needed if you want to link the FFmpeg libraries
+         to your application.
+
+config BR2_PACKAGE_FFMPEG_FFPLAY
+	bool "Build ffplay"
+	select BR2_PACKAGE_SDL
+	help
+         FFplay is a very simple and portable media player using the
+         FFmpeg libraries and the SDL library.
+         It is mostly used as a testbed for the various FFmpeg APIs.
+
+config BR2_PACKAGE_FFMPEG_FFSERVER
+	bool "Build ffserver"
+	help
+         FFserver is a streaming server for both audio and video.
+
 endif
diff --git a/package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch b/package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch
new file mode 100644
index 0000000..58d08aa
--- /dev/null
+++ b/package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch
@@ -0,0 +1,17 @@
+Allow FFmpeg's ./configure script to use a custom sdl-config command.
+
+Inspired from:
+http://www.mail-archive.com/uclinux-dist-commits at blackfin.uclinux.org/msg01099.html
+
+diff -u ffmpeg-0.5.2-orig/configure ffmpeg-0.5.2/configure
+--- a/configure
++++ b/configure
+@@ -2066,7 +2066,7 @@
+ 
+ disable sdl_too_old
+ disable sdl
+-SDL_CONFIG="${cross_prefix}sdl-config"
++SDL_CONFIG="${SDL_CONFIG-${cross_prefix}sdl-config}"
+ if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+     sdl_cflags=`"${SDL_CONFIG}" --cflags`
+     temp_cflags $sdl_cflags
diff --git a/package/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk
index 5385937..c38f7c3 100644
--- a/package/multimedia/ffmpeg/ffmpeg.mk
+++ b/package/multimedia/ffmpeg/ffmpeg.mk
@@ -12,9 +12,6 @@ FFMPEG_INSTALL_TARGET = YES
 FFMPEG_CONF_OPT = \
 	--prefix=/usr		\
 	--enable-shared 	\
-	--disable-ffmpeg	\
-	--disable-ffplay	\
-	--disable-ffserver	\
 	--disable-avfilter	\
 	--disable-postproc	\
 	--disable-swscale	\
@@ -32,6 +29,26 @@ else
 FFMPEG_CONF_OPT += --disable-nonfree
 endif
 
+ifeq ($(BR2_PACKAGE_FFMPEG_FFMPEG),y)
+FFMPEG_CONF_OPT += --enable-ffmpeg
+else
+FFMPEG_CONF_OPT += --disable-ffmpeg
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_FFPLAY),y)
+FFMPEG_DEPENDENCIES += sdl
+FFMPEG_CONF_OPT += --enable-ffplay
+FFMPEG_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config
+else
+FFMPEG_CONF_OPT += --disable-ffplay
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_FFSERVER),y)
+FFMPEG_CONF_OPT += --enable-ffserver
+else
+FFMPEG_CONF_OPT += --disable-ffserver
+endif
+
 ifeq ($(BR2_PTHREADS_NONE),y)
 FFMPEG_CONF_OPT += --disable-pthreads
 else
-- 
1.7.0.4

^ permalink raw reply related

* [Buildroot] [PATCH v2 3/4] ffmpeg: allow customization of codecs, (de)muxers and other components
From: Luca Ceresoli @ 2010-06-14 19:41 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1276544505-2969-1-git-send-email-luca@lucaceresoli.net>

Add the option to customize the list of decoders, encoders, muxers, demuxers,
parsers, protocols, bsfs and filters to be built into ffmpeg, and to compile or
exclude input and output devices.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/multimedia/ffmpeg/Config.in |   88 +++++++++++++++++++++++++++++++++++
 package/multimedia/ffmpeg/ffmpeg.mk |   52 ++++++++++++++++++++
 2 files changed, 140 insertions(+), 0 deletions(-)

diff --git a/package/multimedia/ffmpeg/Config.in b/package/multimedia/ffmpeg/Config.in
index fe6814f..d8661e9 100644
--- a/package/multimedia/ffmpeg/Config.in
+++ b/package/multimedia/ffmpeg/Config.in
@@ -43,4 +43,92 @@ config BR2_PACKAGE_FFMPEG_FFSERVER
 	help
          FFserver is a streaming server for both audio and video.
 
+config BR2_PACKAGE_FFMPEG_ENCODERS
+	string "Enabled encoders"
+	default "all"
+	help
+	 Space-separated list of encoders to build in FFmpeg,
+	 or "all" to build all of them.
+
+	 Run ./configure --list-encoders in the ffmpeg sources
+	 directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_DECODERS
+	string "Enabled decoders"
+	default "all"
+	help
+	 Space-separated list of decoders to build in FFmpeg,
+	 or "all" to build all of them.
+
+	 Run ./configure --list-decoders in the ffmpeg sources
+	 directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_MUXERS
+	string "Enabled muxers"
+	default "all"
+	help
+	 Space-separated list of muxers to build in FFmpeg,
+	 or "all" to build all of them.
+
+	 Run ./configure --list-muxers in the ffmpeg sources
+	 directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_DEMUXERS
+	string "Enabled demuxers"
+	default "all"
+	help
+	 Space-separated list of demuxers to build in FFmpeg,
+	 or "all" to build all of them.
+
+	 Run ./configure --list-demuxers in the ffmpeg sources
+	 directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_PARSERS
+	string "Enabled parsers"
+	default "all"
+	help
+	 Space-separated list of parsers to build in FFmpeg,
+	 or "all" to build all of them.
+
+	 Run ./configure --list-parsers in the ffmpeg sources
+	 directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_BSFS
+	string "Enabled bitstreams"
+	default "all"
+	help
+	 Space-separated list of bitstream filters to build in FFmpeg,
+	 or "all" to build all of them.
+
+	 Run ./configure --list-bsfs in the ffmpeg sources
+	 directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_PROTOCOLS
+	string "Enabled protocols"
+	default "all"
+	help
+	 Space-separated list of protocols to build in FFmpeg,
+	 or "all" to build all of them.
+
+	 Run ./configure --list-protocols in the ffmpeg sources
+	 directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_FILTERS
+	string "Enabled filters"
+	default "all"
+	help
+	 Space-separated list of filters to build in FFmpeg,
+	 or "all" to build all of them.
+
+	 Run ./configure --list-filters in the ffmpeg sources
+	 directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_INDEVS
+	bool "Enable input devices"
+	default y
+
+config BR2_PACKAGE_FFMPEG_OUTDEVS
+	bool "Enable output devices"
+	default y
+
 endif
diff --git a/package/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk
index c38f7c3..7cb9cdf 100644
--- a/package/multimedia/ffmpeg/ffmpeg.mk
+++ b/package/multimedia/ffmpeg/ffmpeg.mk
@@ -49,6 +49,58 @@ else
 FFMPEG_CONF_OPT += --disable-ffserver
 endif
 
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all)
+FFMPEG_CONF_OPT += --disable-encoders \
+	$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS),all)
+FFMPEG_CONF_OPT += --disable-decoders \
+	$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS),all)
+FFMPEG_CONF_OPT += --disable-muxers \
+	$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS),all)
+FFMPEG_CONF_OPT += --disable-demuxers \
+	$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS),all)
+FFMPEG_CONF_OPT += --disable-parsers \
+	$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS),all)
+FFMPEG_CONF_OPT += --disable-bsfs \
+	$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsf=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS),all)
+FFMPEG_CONF_OPT += --disable-protocols \
+	$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS),all)
+FFMPEG_CONF_OPT += --disable-filters \
+	$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),--enable-filter=$(x))
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y)
+FFMPEG_CONF_OPT += --enable-indevs
+else
+FFMPEG_CONF_OPT += --disable-indevs
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y)
+FFMPEG_CONF_OPT += --enable-outdevs
+else
+FFMPEG_CONF_OPT += --disable-outdevs
+endif
+
 ifeq ($(BR2_PTHREADS_NONE),y)
 FFMPEG_CONF_OPT += --disable-pthreads
 else
-- 
1.7.0.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