Skip to contentSkip to conversation

Pull request for branch yem-new-packages

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

lore
Share & tools
lore
#0 lore raw

From: "Yann E. MORIN" <[email protected]>

Hello All!

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

Regards,
Yann E. MORIN

Changes v6 -> v7:
- simple resend as requested by Peter on IRC, for -next (2013.08)

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 92651931e72afad0f829d651ad3d0286b5a14e06:

Update for 2013.05-rc1 (2013-05-08 15:51:45 +0200)

are available in the git repository at:

git://gitorious.org/buildroot/buildroot.git yem-new-packages

for you to fetch changes up to 073a879f6e3aeb6c0fab9d4cae4de39f566fb70a:

package/dtc: add option to install programs (2013-05-08 16:12:05 +0200)

----------------------------------------------------------------
Tag base for branch "yem-target-qemu"

----------------------------------------------------------------
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(+)
 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
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

From: "Yann E. MORIN" <[email protected]>

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 file changed, 47 insertions(+)
 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.8.1.2
#3 lore raw

PATCH 2/6 package/libbsd: new package

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

---
 package/Config.in        |  1 +
 package/libbsd/Config.in | 10 ++++++++++
 package/libbsd/libbsd.mk | 21 +++++++++++++++++++++
 3 files changed, 32 insertions(+)
 create mode 100644 package/libbsd/Config.in
 create mode 100644 package/libbsd/libbsd.mk
package/Config.in +1 -0
index d980871..fc97f58 100644
@@ -578,6 +578,7 @@ source "package/gmp/Config.in"
 source "package/gsl/Config.in"
 source "package/gtest/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.8.1.2
#5 lore raw

PATCH 3/6 package/libedit2: new package

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

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(+)
 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 fc97f58..f5d68c5 100644
@@ -617,6 +617,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.8.1.2
#7 lore raw

PATCH 4/6 package/ceph: new package

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

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(+)
 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 f5d68c5..f55801e 100644
@@ -675,6 +675,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/chrony/Config.in"
 source "package/connman/Config.in"
 source "package/crda/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.8.1.2
#8 lore raw

PATCH 5/6 package/dtc: new package

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

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(+)
 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 f55801e..82bd224 100644
@@ -459,6 +459,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.8.1.2
#10 lore raw

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

In reply to Yann E. MORIN

From: "Yann E. MORIN" <[email protected]>

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.8.1.2
#2 lore raw

PATCH 1/6 package/pmake: add host pmake

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Yann> From: "Yann E. MORIN" <[email protected]> Yann> pmake is the make command used by the BSD. Yann> It will used to build BSD-related packages, coming later.

Committed to next, thanks.

Yann> +# The generated file is named bmake, but we want pmake; but:
Yann> +# - pmake uses support files (in mk/)
Yann> +# - it's not possible to tell pmake, at build-time, where to expect
Yann> +# these support files, and pmake expects them in /usr/share/mk/

 Yann> +#  - but pmake has an option to override that search path at runtime
 Yann> +#  - so we install bmake as bmake
 Yann> +#  - and we install a wraper named pmake that calls pmake with the

s/wraper/wrapper/

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 2/6 package/libbsd: new package

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Yann> From: "Yann E. MORIN" <[email protected]> Yann> Signed-off-by: "Yann E. MORIN" <[email protected]> Yann> Cc: Thomas Petazzoni <[email protected]> Yann> Acked-by: Nathan Lynch <[email protected]>

Committed to next, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 3/6 package/libedit2: new package

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Yann> From: "Yann E. MORIN" <[email protected]> Yann> Signed-off-by: "Yann E. MORIN" <[email protected]> Yann> Cc: Arnout Vandecappelle <[email protected]>

It unfortunately doesn't build here:

/home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc -pipe -Os -include bsd/sys/cdefs.h -include bsd/stdio.h -I. -I/home/peko/source/buildroot/output/build/libedit2-2.11/libedit -I. -I/home/peko/source/buildroot/output/build/libedit2-2.11/libedit -c -fpic -DPIC readline.c -o readline.so
building shared object edit library /home/peko/source/buildroot/output/host/usr/bin/arm-linux-ranlib libedit_pic.a building shared edit library (version 2.11)
/home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc -shared -Wl,-soname,libedit.so.2 -o libedit.so.2.11 -Wl,--whole-archive libedit_pic.a -Wl,--no-whole-archive -lbsd -lcurses
all ===> readline
bmake: no system rules (sys.mk).

bmake: stopped in /home/peko/source/buildroot/output/build/libedit2-2.11/libedit/readline *** Error code 2

Stop.
bmake: stopped in /home/peko/source/buildroot/output/build/libedit2-2.11/libedit
make: *** [/home/peko/source/buildroot/output/build/libedit2-2.11/.stamp_built] Error 1

Any idea?

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 5/6 package/dtc: new package

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Yann> From: "Yann E. MORIN" <[email protected]> Yann> dtc is the Device Tree Compiler, and manipulates device trees.

Yann> Signed-off-by: "Yann E. MORIN" <[email protected]> Yann> Cc: Arnout Vandecappelle <[email protected]>

Committed to next, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#11 lore raw

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

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Yann> From: "Yann E. MORIN" <[email protected]> Yann> By default, we only install the libfdt library.

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

Yann> Signed-off-by: "Yann E. MORIN" <[email protected]> Yann> Cc: Thomas Petazzoni <[email protected]> Yann> Cc: Arnout Vandecappelle <[email protected]>

Committed to next, thanks.

Signature · 1 line
Bye, Peter Korsgaard