* [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS
@ 2013-09-04 2:43 Axel Lin
2013-09-04 2:44 ` [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT Axel Lin
2013-09-05 21:44 ` [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS Thomas Petazzoni
0 siblings, 2 replies; 11+ messages in thread
From: Axel Lin @ 2013-09-04 2:43 UTC (permalink / raw)
To: buildroot
Current setting only allows blackfin to select uclinux as TARGET_OS.
However, some noMMU ARM platforms that using FLAT binary format also need to
select uclinux as TARGET_OS. Fix the dependency.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
I need this change to allow testing build for ARM noMMU.
Maybe worth to upstream.
Axel
package/Makefile.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/Makefile.in b/package/Makefile.in
index 91ae1b9..6aa6266 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -23,8 +23,8 @@ MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)
# Compute GNU_TARGET_NAME
GNU_TARGET_NAME=$(ARCH)-buildroot-$(TARGET_OS)-$(LIBC)$(ABI)
-# Blackfin FLAT needs uclinux
-ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy)
+# FLAT binary format needs uclinux
+ifeq ($(BR2_BINFMT_FLAT),y)
TARGET_OS=uclinux
else
TARGET_OS=linux
--
1.8.1.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT
2013-09-04 2:43 [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS Axel Lin
@ 2013-09-04 2:44 ` Axel Lin
2013-09-05 21:48 ` Thomas Petazzoni
2013-09-05 21:44 ` [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS Thomas Petazzoni
1 sibling, 1 reply; 11+ messages in thread
From: Axel Lin @ 2013-09-04 2:44 UTC (permalink / raw)
To: buildroot
Some noMMU ARM platforms need to select BR2_BINFMT_FLAT.
Most ARM platforms have MMU, thus set default to BR2_BINFMT_ELF for ARM.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
arch/Config.in | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/Config.in b/arch/Config.in
index 14899ca..31c23ec 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -223,8 +223,9 @@ config BR2_GCC_TARGET_MODE
# Set up target binary format
choice
prompt "Target Binary Format"
- depends on BR2_bfin || BR2_m68k
- default BR2_BINFMT_FDPIC
+ depends on BR2_arm || BR2_bfin || BR2_m68k
+ default BR2_BINFMT_ELF if BR2_arm
+ default BR2_BINFMT_FDPIC if (BR2_bfin || BR2_m68k)
config BR2_BINFMT_ELF
bool "ELF"
@@ -245,7 +246,7 @@ config BR2_BINFMT_FDPIC
config BR2_BINFMT_FLAT
bool "FLAT"
- depends on BR2_bfin || BR2_m68k
+ depends on BR2_arm || BR2_bfin || BR2_m68k
select BR2_PREFER_STATIC_LIB
help
FLAT binary is a relatively simple and lightweight executable format
--
1.8.1.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS
2013-09-04 2:43 [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS Axel Lin
2013-09-04 2:44 ` [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT Axel Lin
@ 2013-09-05 21:44 ` Thomas Petazzoni
2013-09-06 2:21 ` Axel Lin
1 sibling, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-05 21:44 UTC (permalink / raw)
To: buildroot
Dear Axel Lin,
On Wed, 04 Sep 2013 10:43:18 +0800, Axel Lin wrote:
> Current setting only allows blackfin to select uclinux as TARGET_OS.
> However, some noMMU ARM platforms that using FLAT binary format also need to
> select uclinux as TARGET_OS. Fix the dependency.
Are you sure uclinux as TARGET_OS is the right selection for ARM? The
release notes of gcc 4.7, at http://gcc.gnu.org/gcc-4.7/changes.html,
indicate:
""
The obsolete ports with alternatives are:
arm*-*-rtems (use arm*-*-rtemseabi)
arm*-*-linux-gnu (use arm*-*-linux-gnueabi)
arm*-*-elf (use arm*-*-eabi)
arm*-*-uclinux* (use arm*-*-uclinux*eabi)
""
So it looks like the arm-<something>-uclinux* tuple should not be used,
if I understand this correctly. Do you have more details about why
arm-<something>-uclinux* should be used?
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT
2013-09-04 2:44 ` [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT Axel Lin
@ 2013-09-05 21:48 ` Thomas Petazzoni
2013-09-06 1:08 ` Thomas De Schampheleire
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-05 21:48 UTC (permalink / raw)
To: buildroot
Dear Axel Lin,
On Wed, 04 Sep 2013 10:44:27 +0800, Axel Lin wrote:
> diff --git a/arch/Config.in b/arch/Config.in
> index 14899ca..31c23ec 100644
> --- a/arch/Config.in
> +++ b/arch/Config.in
> @@ -223,8 +223,9 @@ config BR2_GCC_TARGET_MODE
> # Set up target binary format
> choice
> prompt "Target Binary Format"
> - depends on BR2_bfin || BR2_m68k
> - default BR2_BINFMT_FDPIC
> + depends on BR2_arm || BR2_bfin || BR2_m68k
> + default BR2_BINFMT_ELF if BR2_arm
> + default BR2_BINFMT_FDPIC if (BR2_bfin || BR2_m68k)
I know it was broken before, but FDPIC isn't supported on BR2_m68k, so
I guess we should have something like:
prompt "Target Binary Format"
depends on BR2_arm || BR2_m68k || BR2_bfin
default BR2_BINFMT_ELF if BR2_arm
default BR2_BINFMT_FDPIC if BR2_bfin
default BR2_BINFMT_FLAT if BR2_m68k
But I'm wondering if we shouldn't go further than that, and make
BR2_BINFMT_FLAT available only for non-MMU ARMs. Something like:
prompt "Target Binary Format"
depends on BR2_arm7tmdi || BR2_arm_cortex_m3 || BR2_arm_cortex_m4 || BR2_m68k || BR2_bfin
default BR2_BINFMT_FLAT if BR2_arm7tmdi || BR2_arm_cortex_m3 || BR2_arm_cortex_m4 || BR2_m68k
default BR2_BINFMT_FDPIC if BR2_bfin
or something like this. This way, users of MMU-capable ARM variants
wouldn't be confused by the availability of FLAT and ELF as binary
formats. Of course, BR2_BINFMT_ELF should gain some !BR2_arm7tmdi
&& !BR2_arm_cortex_m3 && !BR2_arm_cortex_m4 dependencies, or maybe even
a !BR2_USE_MMU dependency. I think there's quite some room for
improvement around the definition of which CPU has an MMU or not, and
which architectures support which binary formats.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT
2013-09-05 21:48 ` Thomas Petazzoni
@ 2013-09-06 1:08 ` Thomas De Schampheleire
2013-09-06 6:25 ` Thomas Petazzoni
0 siblings, 1 reply; 11+ messages in thread
From: Thomas De Schampheleire @ 2013-09-06 1:08 UTC (permalink / raw)
To: buildroot
Op 5-sep.-2013 23:48 schreef "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com> het volgende:
> But I'm wondering if we shouldn't go further than that, and make
> BR2_BINFMT_FLAT available only for non-MMU ARMs. Something like:
>
> prompt "Target Binary Format"
> depends on BR2_arm7tmdi || BR2_arm_cortex_m3 || BR2_arm_cortex_m4
|| BR2_m68k || BR2_bfin
> default BR2_BINFMT_FLAT if BR2_arm7tmdi || BR2_arm_cortex_m3 ||
BR2_arm_cortex_m4 || BR2_m68k
> default BR2_BINFMT_FDPIC if BR2_bfin
>
> or something like this. This way, users of MMU-capable ARM variants
> wouldn't be confused by the availability of FLAT and ELF as binary
> formats. Of course, BR2_BINFMT_ELF should gain some !BR2_arm7tmdi
> && !BR2_arm_cortex_m3 && !BR2_arm_cortex_m4 dependencies, or maybe even
> a !BR2_USE_MMU dependency. I think there's quite some room for
> improvement around the definition of which CPU has an MMU or not, and
> which architectures support which binary formats.
Don't we/shouldn't we have something like ARCH_HAS_MMU and/or
ARCH_SUPPORTS_FLAT_BINARY?
Best regards,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130906/22703a2b/attachment.html>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS
2013-09-05 21:44 ` [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS Thomas Petazzoni
@ 2013-09-06 2:21 ` Axel Lin
2013-09-06 6:26 ` Thomas Petazzoni
0 siblings, 1 reply; 11+ messages in thread
From: Axel Lin @ 2013-09-06 2:21 UTC (permalink / raw)
To: buildroot
2013/9/6 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Axel Lin,
>
> On Wed, 04 Sep 2013 10:43:18 +0800, Axel Lin wrote:
>> Current setting only allows blackfin to select uclinux as TARGET_OS.
>> However, some noMMU ARM platforms that using FLAT binary format also need to
>> select uclinux as TARGET_OS. Fix the dependency.
>
> Are you sure uclinux as TARGET_OS is the right selection for ARM? The
> release notes of gcc 4.7, at http://gcc.gnu.org/gcc-4.7/changes.html,
> indicate:
>
> ""
> The obsolete ports with alternatives are:
>
> arm*-*-rtems (use arm*-*-rtemseabi)
> arm*-*-linux-gnu (use arm*-*-linux-gnueabi)
> arm*-*-elf (use arm*-*-eabi)
> arm*-*-uclinux* (use arm*-*-uclinux*eabi)
> ""
>
> So it looks like the arm-<something>-uclinux* tuple should not be used,
> if I understand this correctly. Do you have more details about why
> arm-<something>-uclinux* should be used?
Somehow, I thought noMMU ARM platforms that using FLAT binary format needs to
select uclinux as TARGET_OS.
But since you mentioned the release notes of gcc 4.7, I'm not 100% sure.
I check my build, the result is I have arm-buildroot-uclinux-uclibcgnueabi-gcc.
And the build log shows it checks target system type as:
checking target system type... arm-buildroot-uclinux-uclibcgnueabi
Does buildroot automatically convert arm*-*-uclinux* to arm*-*-uclinux*eabi?
I also check host-gcc-final-4.5.4/gcc/config.gcc and libgcc/config.host.
Looks like it also expects arm*-*-uclinux* for ARM ucLinux and arm*-*-linux* for
ARM GNU/Linux with ELF.
Thanks for the review,
Axel
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT
2013-09-06 1:08 ` Thomas De Schampheleire
@ 2013-09-06 6:25 ` Thomas Petazzoni
2013-09-06 10:08 ` Gustavo Zacarias
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-06 6:25 UTC (permalink / raw)
To: buildroot
Dear Thomas De Schampheleire,
On Fri, 6 Sep 2013 03:08:10 +0200, Thomas De Schampheleire wrote:
> > or something like this. This way, users of MMU-capable ARM variants
> > wouldn't be confused by the availability of FLAT and ELF as binary
> > formats. Of course, BR2_BINFMT_ELF should gain some !BR2_arm7tmdi
> > && !BR2_arm_cortex_m3 && !BR2_arm_cortex_m4 dependencies, or maybe even
> > a !BR2_USE_MMU dependency. I think there's quite some room for
> > improvement around the definition of which CPU has an MMU or not, and
> > which architectures support which binary formats.
>
> Don't we/shouldn't we have something like ARCH_HAS_MMU and/or
> ARCH_SUPPORTS_FLAT_BINARY?
Yes, we should probably have something like this (and ditto for other
binary formats: ELF, FDPIC and so on).
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS
2013-09-06 2:21 ` Axel Lin
@ 2013-09-06 6:26 ` Thomas Petazzoni
2013-09-06 7:14 ` Axel Lin
0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-06 6:26 UTC (permalink / raw)
To: buildroot
Dear Axel Lin,
On Fri, 6 Sep 2013 10:21:55 +0800, Axel Lin wrote:
> > So it looks like the arm-<something>-uclinux* tuple should not be used,
> > if I understand this correctly. Do you have more details about why
> > arm-<something>-uclinux* should be used?
>
> Somehow, I thought noMMU ARM platforms that using FLAT binary format needs to
> select uclinux as TARGET_OS.
> But since you mentioned the release notes of gcc 4.7, I'm not 100% sure.
I am not sure either.
> I check my build, the result is I have arm-buildroot-uclinux-uclibcgnueabi-gcc.
> And the build log shows it checks target system type as:
> checking target system type... arm-buildroot-uclinux-uclibcgnueabi
>
> Does buildroot automatically convert arm*-*-uclinux* to arm*-*-uclinux*eabi?
>
> I also check host-gcc-final-4.5.4/gcc/config.gcc and libgcc/config.host.
> Looks like it also expects arm*-*-uclinux* for ARM ucLinux and arm*-*-linux* for
> ARM GNU/Linux with ELF.
Can you check in more recent gcc versions such as 4.7 or 4.8 ? Looking
at the most recent versions is important to see what is the current
tuple accepted for this situation.
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS
2013-09-06 6:26 ` Thomas Petazzoni
@ 2013-09-06 7:14 ` Axel Lin
0 siblings, 0 replies; 11+ messages in thread
From: Axel Lin @ 2013-09-06 7:14 UTC (permalink / raw)
To: buildroot
2013/9/6 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Axel Lin,
>
> On Fri, 6 Sep 2013 10:21:55 +0800, Axel Lin wrote:
>
>> > So it looks like the arm-<something>-uclinux* tuple should not be used,
>> > if I understand this correctly. Do you have more details about why
>> > arm-<something>-uclinux* should be used?
>>
>> Somehow, I thought noMMU ARM platforms that using FLAT binary format needs to
>> select uclinux as TARGET_OS.
>> But since you mentioned the release notes of gcc 4.7, I'm not 100% sure.
>
> I am not sure either.
>
>> I check my build, the result is I have arm-buildroot-uclinux-uclibcgnueabi-gcc.
>> And the build log shows it checks target system type as:
>> checking target system type... arm-buildroot-uclinux-uclibcgnueabi
>>
>> Does buildroot automatically convert arm*-*-uclinux* to arm*-*-uclinux*eabi?
>>
>> I also check host-gcc-final-4.5.4/gcc/config.gcc and libgcc/config.host.
>> Looks like it also expects arm*-*-uclinux* for ARM ucLinux and arm*-*-linux* for
>> ARM GNU/Linux with ELF.
>
> Can you check in more recent gcc versions such as 4.7 or 4.8 ? Looking
> at the most recent versions is important to see what is the current
> tuple accepted for this situation.
Hi Thomas,
In host-gcc-final-4.8.1/gcc/config.gcc:
# Unsupported targets list. Do not put an entry in this list unless
# it would otherwise be caught by a more permissive pattern. The list
# should be in alphabetical order.
case ${target} in
# Avoid special cases that are not obsolete
arm*-*-*eabi* \
)
;;
arm*-wince-pe* \
| arm*-*-ecos-elf \
| arm*-*-elf \
| arm*-*-freebsd* \
| arm*-*-linux* \
| arm*-*-uclinux* \
| i[34567]86-go32-* \
| i[34567]86-*-go32* \
| m68k-*-uclinuxoldabi* \
| mips64orion*-*-rtems* \
| pdp11-*-bsd \
| sparc-hal-solaris2* \
| thumb-*-* \
| *-*-freebsd[12] | *-*-freebsd[12].* \
| *-*-freebsd*aout* \
| *-*-linux*aout* \
| *-*-linux*coff* \
| *-*-linux*libc1* \
| *-*-linux*oldld* \
| *-*-rtemsaout* \
| *-*-rtemscoff* \
| *-*-solaris2 \
| *-*-solaris2.[0-8] \
| *-*-solaris2.[0-8].* \
| *-*-sysv* \
| vax-*-vms* \
)
echo "*** Configuration ${target} not supported" 1>&2
exit 1
;;
esac
The first case shows
case ${target} in
# Avoid special cases that are not obsolete
arm*-*-*eabi* \
)
;;
Although I have no idea which part of buildroot system converts
arm*-*-uclinux* to arm*-*-uclinux*eabi.
The build result shows arm-buildroot-uclinux-uclibcgnueabi which matches
the first case.
So I think it's ok to set TARGET_OS=uclinux.
Regards,
Axel
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT
2013-09-06 6:25 ` Thomas Petazzoni
@ 2013-09-06 10:08 ` Gustavo Zacarias
2013-09-06 10:12 ` Thomas Petazzoni
0 siblings, 1 reply; 11+ messages in thread
From: Gustavo Zacarias @ 2013-09-06 10:08 UTC (permalink / raw)
To: buildroot
On 09/06/2013 03:25 AM, Thomas Petazzoni wrote:
> On Fri, 6 Sep 2013 03:08:10 +0200, Thomas De Schampheleire wrote:
>
>> Don't we/shouldn't we have something like ARCH_HAS_MMU and/or
>> ARCH_SUPPORTS_FLAT_BINARY?
>
> Yes, we should probably have something like this (and ditto for other
> binary formats: ELF, FDPIC and so on).
On a side note, remember that HAS_MMU doesn't mean it's using it - from
what i've read you can use MMU-bearing processors to test uclinux
MMU-less scenarios (dunno if it can be done with every SOC out there,
probably depends on the linux support for each one, at least a couple of
Atmel ones were used this way for testing and/or masochism).
Regards.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT
2013-09-06 10:08 ` Gustavo Zacarias
@ 2013-09-06 10:12 ` Thomas Petazzoni
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-06 10:12 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Fri, 06 Sep 2013 07:08:16 -0300, Gustavo Zacarias wrote:
> On 09/06/2013 03:25 AM, Thomas Petazzoni wrote:
>
> > On Fri, 6 Sep 2013 03:08:10 +0200, Thomas De Schampheleire wrote:
> >
> >> Don't we/shouldn't we have something like ARCH_HAS_MMU and/or
> >> ARCH_SUPPORTS_FLAT_BINARY?
> >
> > Yes, we should probably have something like this (and ditto for other
> > binary formats: ELF, FDPIC and so on).
>
> On a side note, remember that HAS_MMU doesn't mean it's using it - from
> what i've read you can use MMU-bearing processors to test uclinux
> MMU-less scenarios (dunno if it can be done with every SOC out there,
> probably depends on the linux support for each one, at least a couple of
> Atmel ones were used this way for testing and/or masochism).
Right. We could distinguish what the hardware is capable of (i.e
BR2_HAS_MMU vs. !BR2_HAS_MMU) and what the user wants to do
(BR2_USE_MMU vs. !BR2_USE_MMU). Of course, BR2_USE_MMU depends on
BR2_HAS_MMU. That said, until now, we've been hiding BR2_USE_MMU on
many architectures for which !MMU doesn't exist/isn't supported. On
ARM, I believe it doesn't make much sense to expose !MMU for
MMU-capable variants.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-09-06 10:12 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04 2:43 [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS Axel Lin
2013-09-04 2:44 ` [Buildroot] [PATCH 2/2] arch/Config.in: Allow ARM to select BR2_BINFMT_FLAT Axel Lin
2013-09-05 21:48 ` Thomas Petazzoni
2013-09-06 1:08 ` Thomas De Schampheleire
2013-09-06 6:25 ` Thomas Petazzoni
2013-09-06 10:08 ` Gustavo Zacarias
2013-09-06 10:12 ` Thomas Petazzoni
2013-09-05 21:44 ` [Buildroot] [PATCH 1/2] package/Makefile.in: Fix dependency for selecting uclinux as TARGET_OS Thomas Petazzoni
2013-09-06 2:21 ` Axel Lin
2013-09-06 6:26 ` Thomas Petazzoni
2013-09-06 7:14 ` Axel Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox