Skip to contentSkip to conversation

Pull request for branch yem-new-packages

GIT PULL New Yann E. MORIN 2 participants 10 messages Feb 9, 2013 – May 9, 2013

lore
Share & tools
lore
#0 lore raw

Hello All!

This series deals with adding the required packages to build QEMU on the target.

Changes v5 -> v6:
- removed libedit2 patches, grab them at download time (Arnout)

Changes v4 -> v5:
- fixed the ceph build after the boost changes
- rebased ontop current master

Changes v3 -> v4:
- removed pmake patches, grab them at download time (Arnout, Thomas)

Changes v2 -> v3:
- rebased on-top latest tree, drop already applied packages
- bumped usbredir version (needed later for qemu 1.3.x)

Changes v1 -> v2:
- vde2: do not require C++ (Peter)
- usbredir: select libusb (Peter)
- ceph: use 'select' instead of 'depends on'
- cegui06: add comment

The following changes since commit 1ccf523713dda8bccbc8bb3dcea591d54d8d9278:

CHANGES: update with recent changes (2013-02-09 16:03:29 +0100)

are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem-new-packages

Yann E. MORIN (6):
package/pmake: add host pmake
package/libbsd: new package
package/libedit2: new package
package/ceph: new package
package/dtc: new package
package/dtc: add option to install programs

 package/Config.in                          |    4 ++
 package/ceph/Config.in                     |   25 +++++++++
 package/ceph/ceph-no-envz.patch            |   63 +++++++++++++++++++++++
 package/ceph/ceph-no-getloadavg.patch      |   61 ++++++++++++++++++++++
 package/ceph/ceph-no-posix_fallocate.patch |   50 ++++++++++++++++++
 package/ceph/ceph.mk                       |   57 +++++++++++++++++++++
 package/dtc/Config.in                      |   33 ++++++++++++
 package/dtc/dtc-extra_cflags.patch         |   28 ++++++++++
 package/dtc/dtc-separate-lib-install.patch |   28 ++++++++++
 package/dtc/dtc.mk                         |   56 ++++++++++++++++++++
 package/libbsd/Config.in                   |   10 ++++
 package/libbsd/libbsd.mk                   |   21 ++++++++
 package/libedit2/Config.in                 |    9 +++
 package/libedit2/libedit2.mk               |   76 ++++++++++++++++++++++++++++
 package/libedit2/libedit2.pc               |   13 +++++
 package/pmake/pmake.mk                     |   47 +++++++++++++++++
 16 files changed, 581 insertions(+), 0 deletions(-)
 create mode 100644 package/ceph/Config.in
 create mode 100644 package/ceph/ceph-no-envz.patch
 create mode 100644 package/ceph/ceph-no-getloadavg.patch
 create mode 100644 package/ceph/ceph-no-posix_fallocate.patch
 create mode 100644 package/ceph/ceph.mk
 create mode 100644 package/dtc/Config.in
 create mode 100644 package/dtc/dtc-extra_cflags.patch
 create mode 100644 package/dtc/dtc-separate-lib-install.patch
 create mode 100644 package/dtc/dtc.mk
 create mode 100644 package/libbsd/Config.in
 create mode 100644 package/libbsd/libbsd.mk
 create mode 100644 package/libedit2/Config.in
 create mode 100644 package/libedit2/libedit2.mk
 create mode 100644 package/libedit2/libedit2.pc
 create mode 100644 package/pmake/pmake.mk

Regards,
Yann E. MORIN

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/6 package/pmake: add host pmake

pmake is the make command used by the BSD.
It will used to build BSD-related packages, coming later.

Cc Arnout Vandecappelle <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 package/pmake/pmake.mk |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100644 package/pmake/pmake.mk
package/pmake/pmake.mk new file +47 -0
new file mode 100644
index 0000000..6aa3478
@@ -0,0 +1,47 @@
+#############################################################
+#
+# pmake
+#
+##############################################################
+
+PMAKE_VERSION       = 1.111
+PMAKE_SOURCE        = pmake_$(PMAKE_VERSION).orig.tar.gz
+PMAKE_SITE          = http://snapshot.debian.org/archive/debian/20120601T033558Z/pool/main/p/pmake
+PMAKE_LICENSE       = BSD-3c BSD-4c
+# No license file. License texts are spread in the boilerplates
+# of each individual source files; some are BSD-3c, some BSD-4c.
+
+# Vampirise patches from Debian
+PMAKE_PATCH = pmake_1.111-3.2.debian.tar.gz
+
+# CFLAGS vampirised from Debian's rules, adapted to buildroot variables
+HOST_PMAKE_CFLAGS = -O2 -g -Wall -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -I.    \
+                -DMACHINE=\\\"buildroot\\\"                                 \
+                -DMACHINE_ARCH=\\\"$(ARCH)\\\" -DMACHINE_MULTIARCH=\\\"\\\" \
+                -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME \
+                -DHAVE_VSNPRINTF -D_GNU_SOURCE -Wno-unused
+
+define HOST_PMAKE_BUILD_CMDS
+	$(MAKE) -C $(@D) -f Makefile.boot CFLAGS="$(HOST_PMAKE_CFLAGS)"
+endef
+
+# The generated file is named bmake, but we want pmake; but:
+#  - pmake uses support files (in  mk/)
+#  - it's not possible to tell pmake, at build-time, where to expect
+#    these support files, and pmake expects them in /usr/share/mk/
+#  - but pmake has an option to override that search path at runtime
+#  - so we install bmake as bmake
+#  - and we install a wraper named pmake that calls pmake with the
+#    appropriate search path
+define HOST_PMAKE_INSTALL_CMDS
+	$(INSTALL) -m 0755 $(@D)/bmake $(HOST_DIR)/usr/bin/bmake
+	$(INSTALL) -d -m 0755 $(HOST_DIR)/usr/share/pmake/mk
+	for mk in $(@D)/mk/*; do                                        \
+	    $(INSTALL) -m 0644 $${mk} $(HOST_DIR)/usr/share/pmake/mk;   \
+	done
+	printf '#!/bin/sh\nexec $${0%%/*}/bmake -m $${0%%/pmake}/../../usr/share/pmake/mk "$$@"\n'  \
+	       >$(HOST_DIR)/usr/bin/pmake
+	chmod 0755 $(HOST_DIR)/usr/bin/pmake
+endef
+
+$(eval $(host-generic-package))
Signature · 1 line
1.7.2.5
#2 lore raw

PATCH 2/6 package/libbsd: new package

In reply to Yann E. MORIN
Cc Thomas Petazzoni <[email protected]>
---
 package/Config.in        |    1 +
 package/libbsd/Config.in |   10 ++++++++++
 package/libbsd/libbsd.mk |   21 +++++++++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 package/libbsd/Config.in
 create mode 100644 package/libbsd/libbsd.mk
package/Config.in +1 -0
index 2fad94d..ab09181 100644
@@ -541,6 +541,7 @@ source "package/libargtable2/Config.in"
 source "package/argp-standalone/Config.in"
 source "package/boost/Config.in"
 source "package/libatomic_ops/Config.in"
+source "package/libbsd/Config.in"
 source "package/libcap/Config.in"
 source "package/libcap-ng/Config.in"
 source "package/libdaemon/Config.in"
package/libbsd/Config.in new file +10 -0
new file mode 100644
index 0000000..7f2b55a
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_LIBBSD
+	bool "libbsd"
+	help
+	  This library provides useful functions commonly found on BSD
+	  systems, and lacking on others like GNU systems, thus making
+	  it easier to port projects with strong BSD origins, without
+	  needing to embed the same code over and over again on each
+	  project.
+	  
+	  http://libbsd.freedesktop.org/
package/libbsd/libbsd.mk new file +21 -0
new file mode 100644
index 0000000..3af1002
@@ -0,0 +1,21 @@
+#############################################################
+#
+# libbsd
+#
+#############################################################
+
+LIBBSD_VERSION         = 0.4.2
+LIBBSD_SOURCE          = libbsd-$(LIBBSD_VERSION).tar.gz
+LIBBSD_SITE            = http://libbsd.freedesktop.org/releases
+LIBBSD_LICENSE         = BSD-3c MIT
+LIBBSD_LICENSE_FILES   = LICENSE
+
+# man-pages are BSD-4c, so that license only matters
+# if doc is kept in the target rootfs
+ifeq ($(BR2_HAVE_DOCUMENTATION),y)
+LIBBSD_LICENSE        += (libraries), BSD-4c (documentation)
+endif
+
+LIBBSD_INSTALL_STAGING = YES
+
+$(eval $(autotools-package))
Signature · 1 line
1.7.2.5
#3 lore raw

PATCH 2/6 package/libbsd: new package

Hello Yann,

Quoted 9 lines · Yann E. MORIN
Cc Thomas Petazzoni <[email protected]>
---
 package/Config.in        |    1 +
 package/libbsd/Config.in |   10 ++++++++++
 package/libbsd/libbsd.mk |   21 +++++++++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 package/libbsd/Config.in
 create mode 100644 package/libbsd/libbsd.mk

This is a few months old by now, but for what it's worth:

I happen to use libbsd for a mips target but hadn't gotten around to submitting it myself.

I see you've posted patches adding libbsd a few times over the last few months; it looks like it was related to your qemu efforts but not committed so far. Are you still working on having it included?

Any ideas on this libbsd build error with mips (which seems to lack an a.out.h)? I've hacked around it locally by just hacking nlist.c out of the build, but that's not exactly satisfactory. The error can be recreated by using the following config and setting BR2_PACKAGE_LIBBSD=y on current master with your patch applied:

http://autobuild.buildroot.org/toolchains/configs/free-electrons/br-mipsel-o32-full.config

libbsd 0.4.2 Building
PATH="/home/nathanl/devel/buildroot.git/output/host/bin:/home/nathanl/devel/buildroot.git/output/host/usr/bin:/home/nathanl/devel/buildroot.git/output/host/usr/sbin/:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/nathanl/.local/bin:/home/nathanl/bin" PERLLIB="/home/nathanl/devel/buildroot.git/output/host/usr/lib/perl" /usr/bin/make -j16 -C /home/nathanl/devel/buildroot.git/output/build/libbsd-0.4.2/ make[1]: Entering directory `/home/nathanl/devel/buildroot.git/output/build/libbsd-0.4.2'
/usr/bin/make all-recursive
make[2]: Entering directory `/home/nathanl/devel/buildroot.git/output/build/libbsd-0.4.2'
Making all in include
make[3]: Entering directory `/home/nathanl/devel/buildroot.git/output/build/libbsd-0.4.2/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/nathanl/devel/buildroot.git/output/build/libbsd-0.4.2/include'
Making all in man
make[3]: Entering directory `/home/nathanl/devel/buildroot.git/output/build/libbsd-0.4.2/man'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/nathanl/devel/buildroot.git/output/build/libbsd-0.4.2/man'
Making all in src
make[3]: Entering directory `/home/nathanl/devel/buildroot.git/output/build/libbsd-0.4.2/src'

  CC     arc4random.lo
  CC     bsd_getopt.lo
  CC     closefrom.lo
  CC     dehumanize_number.lo
  CC     err.lo
  CC     expand_number.lo
  CC     fgetln.lo
  CC     flopen.lo
  CC     fmtcheck.lo
  CC     getpeereid.lo
  CC     fpurge.lo
  CC     md5.lo
  CC     md5hl.lo
  CC     humanize_number.lo
  CC     heapsort.lo
  CC     inet_net_pton.lo
  CC     merge.lo
  CC     nlist.lo
  CC     pidfile.lo
  CC     progname.lo
  CC     radixsort.lo
  CC     readpassphrase.lo

In file included from nlist.c:42:0:
/home/nathanl/devel/buildroot.git/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/include/a.out.h:1:25: fatal error: linux/a.out.h: No such file or directory compilation terminated.

#4 lore raw

PATCH 2/6 package/libbsd: new package

Nathan, All,

Quoted 11 lines · Nathan Lynch
Quoted 9 lines · Yann E. MORIN
Cc Thomas Petazzoni <[email protected]>
---
 package/Config.in        |    1 +
 package/libbsd/Config.in |   10 ++++++++++
 package/libbsd/libbsd.mk |   21 +++++++++++++++++++++
 3 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 package/libbsd/Config.in
 create mode 100644 package/libbsd/libbsd.mk
Quoted 3 lines

This is a few months old by now, but for what it's worth:

Thanks. :-)

Quoted 6 lines

I happen to use libbsd for a mips target but hadn't gotten around to submitting it myself.

I see you've posted patches adding libbsd a few times over the last few months; it looks like it was related to your qemu efforts but not committed so far. Are you still working on having it included?

Well, it's been two Buildroot Developpers' Day that we said this stuff would be added upstream, so yes, it will eventually get upstreamed.

But I need to rework all the QEMU patches first, since there has been two new versions released since I first started working on it.

As for the preliminary packages, I'll resubmit them shortly, but I'm afraid they won't make it in this cycle, it's a bit too late. But if people are interested (like you are), they can help poke Peter to speed up inclusion when the next window opens (start of June, after 2013.05 is released). ;-)

Quoted 2 lines

Any ideas on this libbsd build error with mips (which seems to lack an a.out.h)?

No, sorry, never ever tried on MIPS. And indeed, MIPS does not install a.out.h THere's only 4 archs exporting the a.out.h header: alpha, arm, m68k and x86; all other archs supsedly do not support running a.out executables, so there is no reason to export a.out.h for those archs.

Quoted 2 lines

I've hacked around it locally by just hacking nlist.c out of the build, but that's not exactly satisfactory.

I've looked at how Debian builds libbsd, but they have strictly 0 patch on libbsd, and yet they have a MIPS package. Weird...

Can you try to just remove the a.out.h include and see if it still compiles? If not, then maybe we should patch configure.ac to check for a.out.h, and src/Makefile.am to not add nlist.c to the build if a.out.h is not found.

But I'm afraid nlist.c contains important functions that would be missed by other packages, so the best is to somehow getrid of including a.out.h in the first place.

Also, has libbsd upstream done something about it yet?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 2/6 package/libbsd: new package

Quoted 12 lines · Yann E. MORIN
Quoted 6 lines · Nathan Lynch

I happen to use libbsd for a mips target but hadn't gotten around to submitting it myself.

I see you've posted patches adding libbsd a few times over the last few months; it looks like it was related to your qemu efforts but not committed so far. Are you still working on having it included?

Well, it's been two Buildroot Developpers' Day that we said this stuff would be added upstream, so yes, it will eventually get upstreamed.

Quoted 8 lines

But I need to rework all the QEMU patches first, since there has been two new versions released since I first started working on it.

As for the preliminary packages, I'll resubmit them shortly, but I'm afraid they won't make it in this cycle, it's a bit too late. But if people are interested (like you are), they can help poke Peter to speed up inclusion when the next window opens (start of June, after 2013.05 is released). ;-)

Sure :-)

Quoted 8 lines
Quoted 2 lines

Any ideas on this libbsd build error with mips (which seems to lack an a.out.h)?

No, sorry, never ever tried on MIPS. And indeed, MIPS does not install a.out.h THere's only 4 archs exporting the a.out.h header: alpha, arm, m68k and x86; all other archs supsedly do not support running a.out executables, so there is no reason to export a.out.h for those archs.

Quoted 5 lines
Quoted 2 lines

I've hacked around it locally by just hacking nlist.c out of the build, but that's not exactly satisfactory.

I've looked at how Debian builds libbsd, but they have strictly 0 patch on libbsd, and yet they have a MIPS package. Weird...

I think it's a uClibc vs [e]glibc thing. Looks like the valgrind package has had a similar issue; see:

package/valgrind/valgrind-dont-include-a-out-header.patch

and

http://lists.uclibc.org/pipermail/uclibc/2011-November/045920.html

Quoted 2 lines

Can you try to just remove the a.out.h include and see if it still compiles?

It does not, it apparently needs the definition of struct nlist, struct exec, and some constants:

nlist.c:58:39: warning: 'struct nlist' declared inside parameter list [enabled by default]
nlist.c:58:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] nlist.c:58:12: error: prototype declaration
nlist.c:129:51: error: invalid application of 'sizeof' to incomplete type 'struct exec'
nlist.c:154:15: error: dereferencing pointer to incomplete type
nlist.c:193:38: error: 'N_STAB' undeclared (first use in this function)
nlist.c:398:16: error: 'N_UNDF' undeclared (first use in this function)
nlist.c:402:7: error: 'N_FN' undeclared (first use in this function)
nlist.c:402:14: error: 'N_ABS' undeclared (first use in this function)
nlist.c:411:36: error: 'N_DATA' undeclared (first use in this function)
nlist.c:411:45: error: 'N_TEXT' undeclared (first use in this function)
nlist.c:412:37: error: 'N_BSS' undeclared (first use in this function)
nlist.c:419:17: error: 'N_EXT' undeclared (first use in this function)

Quoted 7 lines

If not, then maybe we should patch configure.ac to check for
a.out.h, and src/Makefile.am to not add nlist.c to the build if a.out.h is not found.

But I'm afraid nlist.c contains important functions that would be missed by other packages, so the best is to somehow getrid of including a.out.h in the first place.

I agree. Perhaps a patch like the one valgrind uses could be an interim solution.

Quoted 1 line

Also, has libbsd upstream done something about it yet?

AFAIK this has not been addressed (or reported) upstream.

I'll see what I can figure out on this but it will probably be the weekend before I have more to report.

#6 lore raw

PATCH 3/6 package/libedit2: new package

In reply to Yann E. MORIN
Cc Arnout Vandecappelle <[email protected]>
---
 package/Config.in            |    1 +
 package/libedit2/Config.in   |    9 +++++
 package/libedit2/libedit2.mk |   76 ++++++++++++++++++++++++++++++++++++++++++
 package/libedit2/libedit2.pc |   13 +++++++
 4 files changed, 99 insertions(+), 0 deletions(-)
 create mode 100644 package/libedit2/Config.in
 create mode 100644 package/libedit2/libedit2.mk
 create mode 100644 package/libedit2/libedit2.pc
package/Config.in +1 -0
index ab09181..9d6055b 100644
@@ -572,6 +572,7 @@ menu "Text and terminal handling"
 source "package/enchant/Config.in"
 source "package/libfribidi/Config.in"
 source "package/icu/Config.in"
+source "package/libedit2/Config.in"
 source "package/libiconv/Config.in"
 source "package/linenoise/Config.in"
 source "package/ncurses/Config.in"
package/libedit2/Config.in new file +9 -0
new file mode 100644
index 0000000..1e7b95d
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LIBEDIT2
+	bool "libedit2"
+	select BR2_PACKAGE_LIBBSD
+	select BR2_PACKAGE_NCURSES
+	help
+	  The editline library (from BSD) provides generic line editing
+	  and history functions. It slightly resembles GNU readline.
+	  
+	  http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5-0/src/lib/libedit/
package/libedit2/libedit2.mk new file +76 -0

76 lines not on this page · raw message

package/libedit2/libedit2.pc new file +13 -0
new file mode 100644
index 0000000..47ac871
@@ -0,0 +1,13 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libedit
+Description: Not just a replacement library for libreadline and libhistory.
+Version: 2.11
+Requires: libbsd ncurses
+Requires.private:
+Libs: -L${libdir} -ledit
+Libs.private:
+Cflags: -I${includedir}
Signature · 1 line
1.7.2.5
#7 lore raw

PATCH 4/6 package/ceph: new package

In reply to Yann E. MORIN
Cc Peter Korsgaard <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
---
 package/Config.in                          |    1 +
 package/ceph/Config.in                     |   25 +++++++++++
 package/ceph/ceph-no-envz.patch            |   63 ++++++++++++++++++++++++++++
 package/ceph/ceph-no-getloadavg.patch      |   61 +++++++++++++++++++++++++++
 package/ceph/ceph-no-posix_fallocate.patch |   50 ++++++++++++++++++++++
 package/ceph/ceph.mk                       |   57 +++++++++++++++++++++++++
 6 files changed, 257 insertions(+), 0 deletions(-)
 create mode 100644 package/ceph/Config.in
 create mode 100644 package/ceph/ceph-no-envz.patch
 create mode 100644 package/ceph/ceph-no-getloadavg.patch
 create mode 100644 package/ceph/ceph-no-posix_fallocate.patch
 create mode 100644 package/ceph/ceph.mk
package/Config.in +1 -0
index 9d6055b..21927ed 100644
@@ -623,6 +623,7 @@ source "package/bind/Config.in"
 source "package/bmon/Config.in"
 source "package/bridge-utils/Config.in"
 source "package/can-utils/Config.in"
+source "package/ceph/Config.in"
 source "package/connman/Config.in"
 source "package/ctorrent/Config.in"
 source "package/conntrack-tools/Config.in"
package/ceph/Config.in new file +25 -0
new file mode 100644
index 0000000..68c0e75
@@ -0,0 +1,25 @@
+comment "ceph requires C++, largefiles, threads, wide chars"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
+	depends on !BR2_avr32 && !BR2_microblaze
+
+config BR2_PACKAGE_CEPH
+	bool "ceph"
+	depends on BR2_INSTALL_LIBSTDCPP            # boost
+	depends on BR2_LARGEFILE                    # boost, libnss, util-linux
+	depends on BR2_TOOLCHAIN_HAS_THREADS        # boost, libnss
+	depends on BR2_USE_WCHAR                    # util-linux
+	depends on !BR2_avr32 && !BR2_microblaze    # keyutils
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_SYSTEM
+	select BR2_PACKAGE_BOOST_THREAD
+	select BR2_PACKAGE_EXPAT
+	select BR2_PACKAGE_KEYUTILS
+	select BR2_PACKAGE_LIBEDIT2
+	select BR2_PACKAGE_LIBNSS
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  Ceph is a distributed object store and file system designed to
+	  provide excellent performance, reliability and scalability.
+	  
+	  http://ceph.com/
package/ceph/ceph-no-envz.patch new file +63 -0

63 lines not on this page · raw message

package/ceph/ceph-no-getloadavg.patch new file +61 -0

61 lines not on this page · raw message

package/ceph/ceph-no-posix_fallocate.patch new file +50 -0

50 lines not on this page · raw message

package/ceph/ceph.mk new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#8 lore raw

PATCH 5/6 package/dtc: new package

In reply to Yann E. MORIN

dtc is the Device Tree Compiler, and manipulates device trees.

Cc Arnout Vandecappelle <[email protected]>

---
Although Arnout suggested to move it out of the libraries sub-menu, I kept it there, as by default, only the library is installed, like it is done for, eg., libcurl.

---
 package/Config.in                          |    1 +
 package/dtc/Config.in                      |    9 +++++++
 package/dtc/dtc-extra_cflags.patch         |   28 +++++++++++++++++++++++
 package/dtc/dtc-separate-lib-install.patch |   28 +++++++++++++++++++++++
 package/dtc/dtc.mk                         |   33 ++++++++++++++++++++++++++++
 5 files changed, 99 insertions(+), 0 deletions(-)
 create mode 100644 package/dtc/Config.in
 create mode 100644 package/dtc/dtc-extra_cflags.patch
 create mode 100644 package/dtc/dtc-separate-lib-install.patch
 create mode 100644 package/dtc/dtc.mk
package/Config.in +1 -0
index 21927ed..ee64241 100644
@@ -442,6 +442,7 @@ endmenu
 
 menu "Hardware handling"
 source "package/ccid/Config.in"
+source "package/dtc/Config.in"
 source "package/imx-lib/Config.in"
 source "package/lcdapi/Config.in"
 source "package/libaio/Config.in"
package/dtc/Config.in new file +9 -0
new file mode 100644
index 0000000..96225e3
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_DTC
+	bool "dtc"
+	help
+	  The Device Tree Compiler, dtc, takes as input a device-tree in
+	  a given format and outputs a device-tree in another format.
+	  
+	  Note that only the library is installed for now.
+	  
+	  http://git.jdl.com/gitweb/?p=dtc.git  (no home page)
package/dtc/dtc-extra_cflags.patch new file +28 -0
new file mode 100644
index 0000000..3ce699b
@@ -0,0 +1,28 @@
+Makefile: append the CFLAGS to existing ones
+
+Allow the user to pass custom CFLAGS (eg. optimisation flags).
+
+Do not use EXTRA_CFLAGS, append to existing CFLAGS with +=  (Arnout)
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+Cc: Arnout Vandecappelle <[email protected]>
+
+---
+Patch not sent upstream.
+
+Although not specific to buildroot, I am not sure this is the best
+way to handle user-supplied CFLAGS.
+
+diff -durN dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile
+--- dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef.orig/Makefile	2012-10-22 22:02:47.541240846 +0200
++++ dtc-e4b497f367a3b2ae99cc52089a14a221b13a76ef/Makefile	2012-10-22 22:03:21.151047833 +0200
+@@ -18,7 +18,8 @@
+ CPPFLAGS = -I libfdt -I .
+ WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
+ 	-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls
+-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS)
++CFLAGS ?= -g -Os
++CFLAGS += -fPIC $(WARNINGS)
+ 
+ BISON = bison
+ LEX = flex
package/dtc/dtc-separate-lib-install.patch new file +28 -0
new file mode 100644
index 0000000..c86d587
@@ -0,0 +1,28 @@
+Makefile: add a rule to only install libfdt
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+---
+Patch not sent upstream.
+
+It's really specific to buildroot, and is probably not
+good (aka generic) enough to be pushed upstream.
+
+diff --git a/Makefile b/Makefile
+index 1169e6c..39e7190 100644
+--- a/Makefile
++++ b/Makefile
+@@ -160,10 +160,12 @@ endif
+ # intermediate target and building them again "for real"
+ .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS)
+ 
+-install: all $(SCRIPTS)
++install: all $(SCRIPTS) libfdt_install
+ 	@$(VECHO) INSTALL
+ 	$(INSTALL) -d $(DESTDIR)$(BINDIR)
+ 	$(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
++
++libfdt_install: libfdt
+ 	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
+ 	$(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
+ 	ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
package/dtc/dtc.mk new file +33 -0
new file mode 100644
index 0000000..f05b09d
@@ -0,0 +1,33 @@
+#############################################################
+#
+# dtc
+#
+#############################################################
+
+DTC_VERSION         = e4b497f367a3b2ae99cc52089a14a221b13a76ef
+DTC_SITE            = git://git.jdl.com/software/dtc.git
+DTC_LICENSE         = GPLv2+/BSD-2c
+DTC_LICENSE_FILES   = README.license GPL
+# Note: the dual-license only applies to the library.
+#       The DT compiler (dtc) is GPLv2+, but we do not install it.
+DTC_INSTALL_STAGING = YES
+
+define DTC_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS)    \
+	$(MAKE) -C $(@D) PREFIX=/usr libfdt
+endef
+
+#?libfdt_install is our own install rule added by our patch
+define DTC_INSTALL_STAGING_CMDS
+	$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install
+endef
+
+define DTC_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install
+endef
+
+define DTC_CLEAN_CMDS
+	$(MAKE) -C $(@D) libfdt_clean
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.2.5
#9 lore raw

PATCH 6/6 package/dtc: add option to install programs

In reply to Yann E. MORIN

By default, we only install the libfdt library.

As suggested by Arnout, add an option that also
installs the few dtc programs.

Cc Thomas Petazzoni <[email protected]>
Cc Arnout Vandecappelle <[email protected]>

---
dtdiff, a diff for device trees, requires bash.

I did not add a 'depends on bash' (or a 'select' either), because requiring bash just for that is a bit far-fetched.

Instead, at dtc install time, if bash is selected, dtdiff is installed as usual to the target rootfs; if bash is not selected, dtdiff is removed from the target rootfs.

---
 package/dtc/Config.in |   28 ++++++++++++++++++++++++++--
 package/dtc/dtc.mk    |   35 +++++++++++++++++++++++++++++------
 2 files changed, 55 insertions(+), 8 deletions(-)
package/dtc/Config.in +26 -2
index 96225e3..4b10556 100644
@@ -1,9 +1,33 @@
 config BR2_PACKAGE_DTC
-	bool "dtc"
+	bool "dtc (libfdt)"
 	help
 	  The Device Tree Compiler, dtc, takes as input a device-tree in
 	  a given format and outputs a device-tree in another format.
 	  
-	  Note that only the library is installed for now.
+	  Note that only the library is installed.
+	  If you want the programs, say 'y' here, and to "dtc programs", below.
 	  
 	  http://git.jdl.com/gitweb/?p=dtc.git  (no home page)
+
+if BR2_PACKAGE_DTC
+
+config BR2_PACKAGE_DTC_PROGRAMS
+	bool "dtc programs"
+	help
+	  Say 'y' here if you also want the programs on the target:
+	    - convert-dtsv0     convert from version 0 to version 1
+	    - dtc               the device tree compiler
+	    - dtdiff            compare two device trees (needs bash)
+	    - fdtdump           print a readable version of a flat device tree
+	    - fdtget            read values from device tree
+	    - fdtput            write a property value to a device tree
+	  
+	  Note: dtdiff requires bash, so if bash is not selected, dtdiff will
+	        be removed from the target file system. Enable bash if you
+	        need dtdiff on the target.
+
+comment "dtdiff will not be installed: it requires bash"
+	depends on BR2_PACKAGE_DTC_PROGRAMS
+	depends on !BR2_PACKAGE_BASH
+
+endif
package/dtc/dtc.mk +29 -6
index f05b09d..76ff361 100644
@@ -8,26 +8,49 @@ DTC_VERSION         = e4b497f367a3b2ae99cc52089a14a221b13a76ef
 DTC_SITE            = git://git.jdl.com/software/dtc.git
 DTC_LICENSE         = GPLv2+/BSD-2c
 DTC_LICENSE_FILES   = README.license GPL
-# Note: the dual-license only applies to the library.
-#       The DT compiler (dtc) is GPLv2+, but we do not install it.
 DTC_INSTALL_STAGING = YES
 
+define DTC_POST_INSTALL_TARGET_RM_DTDIFF
+	rm -f $(TARGET_DIR)/usr/bin/dtdiff
+endef
+
+ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y)
+
+DTC_LICENSE        += (for the library), GPLv2+ (for the executables)
+# Use default goal to build everything
+DTC_BUILD_GOAL      =
+DTC_INSTALL_GOAL    = install
+DTC_CLEAN_GOAL      = clean
+ifeq ($(BR2_PACKAGE_BASH),)
+DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF
+endif
+
+else # $(BR2_PACKAGE_DTC_PROGRAMS) != y
+
+DTC_BUILD_GOAL      = libfdt
+#?libfdt_install is our own install rule added by our patch
+DTC_INSTALL_GOAL    = libfdt_install
+DTC_CLEAN_GOAL      = libfdt_clean
+
+endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y
+
 define DTC_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS)    \
-	$(MAKE) -C $(@D) PREFIX=/usr libfdt
+	CFLAGS="$(TARGET_CFLAGS)"   \
+	$(MAKE) -C $(@D) PREFIX=/usr $(DTC_BUILD_GOAL)
 endef
 
-#?libfdt_install is our own install rule added by our patch
+# For staging, only the library is needed
 define DTC_INSTALL_STAGING_CMDS
 	$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr libfdt_install
 endef
 
 define DTC_INSTALL_TARGET_CMDS
-	$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr libfdt_install
+	$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL)
 endef
 
 define DTC_CLEAN_CMDS
-	$(MAKE) -C $(@D) libfdt_clean
+	$(MAKE) -C $(@D) $(DTC_CLEAN_GOAL)
 endef
 
 $(eval $(generic-package))
Signature · 1 line
1.7.2.5