* [Buildroot] [noMMU] How to generate FLAT executable for busybox?
@ 2013-07-29 5:40 Axel Lin
2013-07-29 9:27 ` Axel Lin
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2013-07-29 5:40 UTC (permalink / raw)
To: buildroot
Hi,
I have BR2_BINFMT_FLAT=y in my setting.
However, the build system still generates ELF executable for busybox.
$ file output/target/bin/busybox
output/target/bin/busybox: setuid ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped
I have below customization in my configs to build noMMU for arm7tdmi:
And then I did:
$ make CFLAGS_busybox="-elf2flt"
diff --git a/arch/Config.in b/arch/Config.in
index 0b5b218..a894e17 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -216,7 +216,6 @@ 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
config BR2_BINFMT_ELF
@@ -229,7 +228,6 @@ config BR2_BINFMT_ELF
config BR2_BINFMT_FDPIC
bool "FDPIC"
- depends on BR2_bfin || BR2_m68k
help
ELF FDPIC binaries are based on ELF, but allow the individual load
segments of a binary to be located in memory independently of each
@@ -238,7 +236,6 @@ config BR2_BINFMT_FDPIC
config BR2_BINFMT_FLAT
bool "FLAT"
- depends on BR2_bfin || BR2_m68k
select BR2_PREFER_STATIC_LIB
help
FLAT binary is a relatively simple and lightweight executable format
diff --git a/package/Makefile.in b/package/Makefile.in
index aed28d5..5b89e18 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -24,7 +24,7 @@ MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)
GNU_TARGET_NAME=$(ARCH)-buildroot-$(TARGET_OS)-$(LIBC)$(ABI)
# Blackfin FLAT needs uclinux
-ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy)
+ifeq ($(BR2_BINFMT_FLAT),y)
TARGET_OS=uclinux
else
TARGET_OS=linux
diff --git a/package/busybox/busybox-1.21.x.config b/package/busybox/busybox-1.21.x.config
index e46b528..4e692fc 100644
--- a/package/busybox/busybox-1.21.x.config
+++ b/package/busybox/busybox-1.21.x.config
@@ -55,9 +55,9 @@ CONFIG_FEATURE_SYSLOG=y
#
# Build Options
#
-# CONFIG_STATIC is not set
+CONFIG_STATIC=y
# CONFIG_PIE is not set
-# CONFIG_NOMMU is not set
+CONFIG_NOMMU=y
# CONFIG_BUILD_LIBBUSYBOX is not set
# CONFIG_FEATURE_INDIVIDUAL is not set
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
diff --git a/package/uclibc/uClibc-0.9.33.config b/package/uclibc/uClibc-0.9.33.config
index eb39df6..d0a9c0c 100644
--- a/package/uclibc/uClibc-0.9.33.config
+++ b/package/uclibc/uClibc-0.9.33.config
@@ -65,10 +65,10 @@ FORCE_OPTIONS_FOR_ARCH=y
# ARCH_BIG_ENDIAN is not set
# ARCH_WANTS_LITTLE_ENDIAN is not set
# ARCH_WANTS_BIG_ENDIAN is not set
-ARCH_HAS_MMU=y
-ARCH_USE_MMU=y
+# ARCH_HAS_MMU is not set
+# ARCH_USE_MMU is not set
UCLIBC_HAS_FLOATS=y
-UCLIBC_HAS_FPU=y
+# UCLIBC_HAS_FPU is not set
DO_C99_MATH=y
# DO_XSI_MATH is not set
# UCLIBC_HAS_FENV is not set
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [noMMU] How to generate FLAT executable for busybox?
2013-07-29 5:40 [Buildroot] [noMMU] How to generate FLAT executable for busybox? Axel Lin
@ 2013-07-29 9:27 ` Axel Lin
2013-07-31 13:05 ` Axel Lin
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2013-07-29 9:27 UTC (permalink / raw)
To: buildroot
2013/7/29 Axel Lin <axel.lin@ingics.com>:
> Hi,
> I have BR2_BINFMT_FLAT=y in my setting.
> However, the build system still generates ELF executable for busybox.
>
> $ file output/target/bin/busybox
> output/target/bin/busybox: setuid ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped
Hi,
In output/build/busybox-1.21.1/busybox_unstripped.out, I found below messages:
/opt/test/buildroot/buildroot/output/host/usr/lib/gcc/arm-buildroot-uclinux-uclibcgnueabi/4.7.3/../../../../arm-buildroot-uclinux-uclibcgnueabi/bin/ld:
warning: cannot find entry symbol lf2flt; defaulting to
00000000000080ac
This looks like the linker does not understand -elf2flt and treat is
as -e lf2flt.
Any idea how to fix this?
Thanks,
Axel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [noMMU] How to generate FLAT executable for busybox?
2013-07-29 9:27 ` Axel Lin
@ 2013-07-31 13:05 ` Axel Lin
2013-07-31 13:11 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2013-07-31 13:05 UTC (permalink / raw)
To: buildroot
2013/7/29 Axel Lin <axel.lin@ingics.com>:
> 2013/7/29 Axel Lin <axel.lin@ingics.com>:
>> Hi,
>> I have BR2_BINFMT_FLAT=y in my setting.
>> However, the build system still generates ELF executable for busybox.
>>
>> $ file output/target/bin/busybox
>> output/target/bin/busybox: setuid ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped
Hi,
Just try to figure out if any platform can build FLAT executable.
So I just tested build for blackfin (BR2_bfin).
( I don't have any customization for this blackfin build test,
only run make menuconfig and select blackfin. Test with current git tree. )
I thought I should have a FLAT executable, however it produces ELF executable.
$ file output/target/bin/busybox
output/target/bin/busybox: setuid ELF 32-bit LSB executable, Analog
Devices Blackfin, version 1 (SYSV), statically linked, stripped
BTW, I found BR2_ELF2FLT is invisible for BR2_bfin.
package/elf2flt/Config.in.host:
config BR2_PACKAGE_HOST_ELF2FLT
bool "Enable elf2flt support?"
depends on BR2_arm || BR2_sh || BR2_sparc
Does this mean blackfin does not need elf2flt tool?
Regards,
Axel
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] [noMMU] How to generate FLAT executable for busybox?
2013-07-31 13:05 ` Axel Lin
@ 2013-07-31 13:11 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2013-07-31 13:11 UTC (permalink / raw)
To: buildroot
Dear Axel Lin,
On Wed, 31 Jul 2013 21:05:56 +0800, Axel Lin wrote:
> Just try to figure out if any platform can build FLAT executable.
> So I just tested build for blackfin (BR2_bfin).
> ( I don't have any customization for this blackfin build test,
> only run make menuconfig and select blackfin. Test with current git tree. )
>
> I thought I should have a FLAT executable, however it produces ELF executable.
> $ file output/target/bin/busybox
> output/target/bin/busybox: setuid ELF 32-bit LSB executable, Analog
> Devices Blackfin, version 1 (SYSV), statically linked, stripped
Yeah, that's broken.
> BTW, I found BR2_ELF2FLT is invisible for BR2_bfin.
>
> package/elf2flt/Config.in.host:
> config BR2_PACKAGE_HOST_ELF2FLT
> bool "Enable elf2flt support?"
> depends on BR2_arm || BR2_sh || BR2_sparc
>
> Does this mean blackfin does not need elf2flt tool?
No, it means that the internal toolchain handling of FLAT binaries and
elf2flt is broken.
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] 4+ messages in thread
end of thread, other threads:[~2013-07-31 13:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-29 5:40 [Buildroot] [noMMU] How to generate FLAT executable for busybox? Axel Lin
2013-07-29 9:27 ` Axel Lin
2013-07-31 13:05 ` Axel Lin
2013-07-31 13:11 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox