Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 03/36] package/libfdt: new package
Date: Tue, 14 Aug 2012 15:23:40 +0200	[thread overview]
Message-ID: <20120814152340.1d4ce6fa@skate> (raw)
In-Reply-To: <1344815664-28138-3-git-send-email-yann.morin.1998@free.fr>

Hello,

Le Mon, 13 Aug 2012 01:53:51 +0200,
"Yann E. MORIN" <yann.morin.1998@free.fr> a ?crit :

> libfdt allows one to manipulate a Flat Device Tree.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
>  package/Config.in                                  |    1 +
>  package/libfdt/Config.in                           |    6 ++
>  .../libfdt/libfdt-install-missing-headers.patch    |   22 ++++++++
>  package/libfdt/libfdt-separate-lib-install.patch   |   22 ++++++++
>  package/libfdt/libfdt.mk                           |   56 ++++++++++++++++++++
>  5 files changed, 107 insertions(+), 0 deletions(-)

The upstream package is called "dtc", shouldn't we be calling this
package "dtc" as well even though it only installs libfdt for now?

> diff --git a/package/libfdt/libfdt.mk b/package/libfdt/libfdt.mk
> new file mode 100644
> index 0000000..6824576
> --- /dev/null
> +++ b/package/libfdt/libfdt.mk
> @@ -0,0 +1,56 @@
> +#-----------------------------------------------------------------------------
> +# Package description

While this headers are nice, they are not consistent with all other
packages in Buildroot. Do we want to move all packages in this
direction?

> +LIBFDT_VERSION         = v1.3.0
> +LIBFDT_SITE            = git://git.jdl.com/software/dtc.git
> +LIBFDT_LICENSE         = GPLv2+/BSD-2c
> +LIBFDT_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 (yet?).

Argh, this is getting complicated, and shows again that our lack of
separation between "source package" and "binary package" is a bit
problematic.

> +LIBFDT_INSTALL_STAGING = YES
> +
> +#----------------------------------------------------------------------------
> +# Package build process
> +
> +define LIBFDT_BUILD_CMDS
> +	$(MAKE) -C $(@D) CC="$(TARGET_CC)" \
> +	                 AR="$(TARGET_AR)" \

What about using $(TARGET_CONFIGURE_OPTS) instead?

> +	                 PREFIX=/usr       \
> +	                 libfdt
> +endef
> +
> +#?libfdt_install is our own install rule added by our patch
> +define LIBFDT_INSTALL_STAGING_CMDS
> +	$(MAKE) CC="$(TARGET_CC)" AR="$(TARGET_AR)" -C $(@D) \

Do you really need to repeat CC and AR for the installation?

> +	        DESTDIR=$(STAGING_DIR) PREFIX=/usr           \
> +	        libfdt_install
> +endef
> +
> +# libfdt does not have any uninstall rule
> +define LIBFDT_UNINSTALL_STAGING_CMDS
> +	rm -f $(STAGING_DIR)/usr/lib/libfdt.a
> +	rm -f $(STAGING_DIR)/usr/lib/libfdt*.so*
> +	rm -f $(STAGING_DIR)/usr/include/libfdt*.h
> +	rm -f $(STAGING_DIR)/usr/include/fdt.h
> +endef
> +
> +# Usually, mode 0644 is enough for libraries (shared or static), but the
> +# buildroot documentation dsays 0755, so be dumb and follow the docs. ;-p
> +# And on target, we only require the SONAME-named library, not all the
> +# symlinks, but:
> +#   - libfdt's Makefile does not offer such a rule,
> +#   - other buildroot packages do install lib symlinks,
> +# so do as all others do.
> +define LIBFDT_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/libfdt/libfdt*.so* $(TARGET_DIR)/usr/lib
> +endef

Not possible to use 'make libfdt_install' here? Remember that Buildroot
automatically .a files, header files and other documentation, so you
don't have to do this "filtered" installation yourself. And worse than
that: if you have BR2_HAVE_DEVFILES enabled, your INSTALL_TARGET_CMDS
is incorrect.

Thanks!

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

  reply	other threads:[~2012-08-14 13:23 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12 23:53 [Buildroot] [PATCH 01/36] system/init: add option for no init system Yann E. MORIN
2012-08-12 23:53 ` [Buildroot] [PATCH 02/36] package/sdl: add symlink to sdl-config Yann E. MORIN
2012-08-13 10:57   ` Thomas Petazzoni
2012-08-13 11:32     ` Yann E. MORIN
2012-08-28 23:09     ` Arnout Vandecappelle
2012-08-12 23:53 ` [Buildroot] [PATCH 03/36] package/libfdt: new package Yann E. MORIN
2012-08-14 13:23   ` Thomas Petazzoni [this message]
2012-08-14 16:51     ` Yann E. MORIN
2012-08-12 23:53 ` [Buildroot] [PATCH 04/36] package/vde2: " Yann E. MORIN
2012-08-14 13:24   ` Thomas Petazzoni
2012-08-14 16:57     ` Yann E. MORIN
2012-08-12 23:53 ` [Buildroot] [PATCH 05/36] package/libiscsi: " Yann E. MORIN
2012-08-17 11:14   ` Thomas Petazzoni
2012-08-17 12:29     ` Samuel Martin
2012-08-17 12:42       ` Thomas Petazzoni
2012-08-12 23:53 ` [Buildroot] [PATCH 06/36] package/usbredir: " Yann E. MORIN
2012-08-17 11:15   ` Thomas Petazzoni
2012-08-17 13:37     ` Yann E. MORIN
2012-08-17 13:48       ` Thomas Petazzoni
2012-08-12 23:53 ` [Buildroot] [PATCH 07/36] package/celt051: " Yann E. MORIN
2012-08-17 11:18   ` Thomas Petazzoni
2012-08-17 13:27     ` Yann E. MORIN
2012-08-17 13:50       ` Thomas Petazzoni
2012-08-17 14:35         ` Yann E. MORIN
2012-08-12 23:53 ` [Buildroot] [PATCH 08/36] package/python-pyparsing: " Yann E. MORIN
2012-08-17 11:19   ` Thomas Petazzoni
2012-08-12 23:53 ` [Buildroot] [PATCH 09/36] package/spice-protocol: " Yann E. MORIN
2012-08-17 11:20   ` Thomas Petazzoni
2012-08-12 23:53 ` [Buildroot] [PATCH 10/36] package/spice-server: " Yann E. MORIN
2012-08-17 11:22   ` Thomas Petazzoni
2012-08-17 13:38     ` Yann E. MORIN
2012-08-12 23:53 ` [Buildroot] [PATCH 11/36] package/qemu: " Yann E. MORIN
2012-08-13  6:52   ` Yann E. MORIN
2012-08-13  7:22   ` Diego Iastrubni
2012-08-13  7:46     ` Yann E. MORIN
2012-08-14 13:34   ` Thomas Petazzoni
2012-08-14 17:03     ` Yann E. MORIN
2012-08-17 11:26       ` Thomas Petazzoni
2012-08-17 13:32         ` Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 12/36] package/qemu: add basic target selection Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 13/36] package/qemu: add fine-grained " Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 14/36] package/qemu: add SDL frontends Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 15/36] package/qemu: add option to enable/disable the VNC frontend Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 16/36] package/qemu: add VNC jpeg and png compression Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 17/36] package/qemu: add VNC TLS-encryption Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 18/36] package/qemu: add option to not install blobs Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 19/36] package/qemu: add option to remove unwanted keymaps Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 20/36] package/qemu: add uuid support Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 21/36] package/qemu: add support for capabilities Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 22/36] package/qemu: add attr/xattr option Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 23/36] package/qemu: add support for virtfs Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 24/36] package/qemu: add support for cURL Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 25/36] package/qemu: enable use of the curses frontend Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 26/36] package/qemu: add BlueZ connectivity Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 27/36] package/qemu: add AIO support Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 28/36] package/qemu: add support for FDT Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 29/36] package/qemu: add support for VDE switches Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 30/36] package/qemu: add iSCSI support Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 31/36] package/qemu: add support for USB redirection Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 32/36] package/qemu: add support for Spice Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 33/36] package/qemu: option to build the docs Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 34/36] package/qemu: enable guest-base Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 35/36] package/qemu: move sub-options into a sub-menu Yann E. MORIN
2012-08-12 23:54 ` [Buildroot] [PATCH 36/36] package/qemu: enable a static build Yann E. MORIN
2012-08-13  0:00 ` [Buildroot] [PATCH 01/36] system/init: add option for no init system Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120814152340.1d4ce6fa@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox