From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] arch: tidy up binary formats config
Date: Wed, 03 Jun 2015 22:48:43 +0200 [thread overview]
Message-ID: <556F682B.1030306@mind.be> (raw)
In-Reply-To: <1433340749-7711-2-git-send-email-guido@vanguardiasur.com.ar>
On 06/03/15 16:12, Guido Mart?nez wrote:
> Instead of (black)listing architectures when deciding the binary format,
> we can enable the ELF format only when using an MMU and FLAT only when
> we're not. This mimics the logic in the Linux kernel for user binaries
> support.
>
> For FDPIC, we introduce a Kconfig option to enable its selection, and
> have blackfin select it.
>
> Signed-off-by: Guido Mart?nez <guido@vanguardiasur.com.ar>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
One optional nit:
> ---
> arch/Config.in | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/arch/Config.in b/arch/Config.in
> index 3ad9574..ace1cfe 100644
> --- a/arch/Config.in
> +++ b/arch/Config.in
> @@ -15,6 +15,9 @@ config BR2_ARCH_HAS_MMU_MANDATORY
> config BR2_ARCH_HAS_MMU_OPTIONAL
> bool
>
> +config BR2_ARCH_HAS_FDPIC_SUPPORT
> + bool
> +
> choice
> prompt "Target Architecture"
> default BR2_i386
> @@ -66,6 +69,7 @@ config BR2_aarch64
>
> config BR2_bfin
> bool "Blackfin"
> + select BR2_ARCH_HAS_FDPIC_SUPPORT
> help
> The Blackfin is a family of 16 or 32-bit microprocessors developed,
> manufactured and marketed by Analog Devices.
> @@ -272,13 +276,13 @@ config BR2_BINFMT_SUPPORTS_SHARED
> # Set up target binary format
> choice
> prompt "Target Binary Format"
> - default BR2_BINFMT_ELF if !(BR2_bfin || BR2_m68k)
> - default BR2_BINFMT_FDPIC if BR2_bfin
> - default BR2_BINFMT_FLAT if BR2_m68k
> + default BR2_BINFMT_ELF if BR2_USE_MMU
> + default BR2_BINFMT_FDPIC if BR2_ARCH_HAS_FDPIC_SUPPORT
> + default BR2_BINFMT_FLAT if !BR2_USE_MMU
I think this should either be without condition at all, or with a condition
that matches the previous ones, i.e. if !BR2_USE_MMU && !BR2_ARCH_HAS_FDPIC_SUPPORT.
Also we normally don't do any vertical alignment at all, so just put a single
space instead of tabs.
Regards,
Arnout
>
> config BR2_BINFMT_ELF
> bool "ELF"
> - depends on !BR2_bfin && !BR2_m68k
> + depends on BR2_USE_MMU
> select BR2_BINFMT_SUPPORTS_SHARED
> help
> ELF (Executable and Linkable Format) is a format for libraries and
> @@ -287,7 +291,7 @@ config BR2_BINFMT_ELF
>
> config BR2_BINFMT_FDPIC
> bool "FDPIC"
> - depends on BR2_bfin
> + depends on BR2_ARCH_HAS_FDPIC_SUPPORT
> select BR2_BINFMT_SUPPORTS_SHARED
> help
> ELF FDPIC binaries are based on ELF, but allow the individual load
> @@ -297,7 +301,7 @@ config BR2_BINFMT_FDPIC
>
> config BR2_BINFMT_FLAT
> bool "FLAT"
> - depends on BR2_bfin || BR2_m68k
> + depends on !BR2_USE_MMU
> help
> FLAT binary is a relatively simple and lightweight executable format
> based on the original a.out format. It is widely used in environment
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
next prev parent reply other threads:[~2015-06-03 20:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 16:54 [Buildroot] [PATCH 1/2] arch: tidy up mmu config Guido Martínez
2015-05-21 16:54 ` [Buildroot] [PATCH 2/2] arch: tidy up binary formats config Guido Martínez
2015-06-01 20:32 ` Arnout Vandecappelle
2015-06-01 16:59 ` [Buildroot] [PATCH 1/2] arch: tidy up mmu config Ezequiel Garcia
2015-06-01 20:09 ` Arnout Vandecappelle
2015-06-03 14:12 ` Guido Martínez
2015-06-03 14:12 ` [Buildroot] [PATCH v2 " Guido Martínez
2015-06-03 14:12 ` [Buildroot] [PATCH v2 2/2] arch: tidy up binary formats config Guido Martínez
2015-06-03 20:48 ` Arnout Vandecappelle [this message]
2015-06-03 21:27 ` Guido Martínez
2015-06-03 22:29 ` Arnout Vandecappelle
2015-06-03 22:34 ` Guido Martínez
2015-06-03 22:34 ` [Buildroot] [PATCH v3 1/2] arch: tidy up mmu config Guido Martínez
2015-06-03 22:34 ` [Buildroot] [PATCH v3 2/2] arch: tidy up binary formats config Guido Martínez
2015-06-09 20:52 ` [Buildroot] [PATCH v3 1/2] arch: tidy up mmu config Thomas Petazzoni
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=556F682B.1030306@mind.be \
--to=arnout@mind.be \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.