On 3/11/2011 10:02 PM, Denys Vlasenko wrote:
On Saturday 12 March 2011 04:53, Gary Altenberg wrote:
On 3/11/2011 5:23 PM, Denys Vlasenko wrote:
On Friday 11 March 2011 23:55, Gary Altenberg wrote:
Looks good. So I add one applet "cat" and rebuilt busybox. When I put
this version of busybox with the cat applet on my board and type busybox
it I get:

# busybox
Unhandled fault: vector exception (0x800) at 0x00000000
SIGSEGV
#

Any help would be greatly appreciated.
Can't reproduce:

# ./busybox ; echo $?
^C

# ./busybox .kernelrelease; echo $?
1.18.3
0


Please post your .config

I just get the Unhandled fault when I do any of those.
.config attached...
It works for me with your .config

Thank you for the feedback. Did you run this on an ARM with no MMU?
No.

So
what does that tell me? Do you think it's my tools?  Could it be
something to do with uClibc? I am not sure it's configured correctly.
Does it fail with more than one applet enabled?

*Where* exactly does it fail? Insert printf's into code and find out
where is that place.

Should I have the config for busybox point to my linux header files
somehow? I read that busybox needs linux headers for somethings, could
that be a problem?
No, in that case it wouldn't _compile_. You have successful compile.


Putting in printfs doesn't work because busybox will not run at all if I have one or more applets enabled. I just keep getting the unhandled fault messages.

I discovered that I could have an arch Makefile in a folder for my architecture like arch/arm so I created an arch/arm/Makefile. It seems to override things just fine but I found a comment in the Makefile.flags file:

# If a flat binary should be built, CFLAGS_busybox="-elf2flt"
# env var should be set for make invocation.
# Here we check whether CFLAGS_busybox indeed contains that flag.
# (For historical reasons, we also check LDFLAGS, which doesn't
# seem to be entirely correct variable to put "-elf2flt" into).
W_ELF2FLT = -elf2flt
ifneq (,$(findstring $(W_ELF2FLT),$(LDFLAGS) $(CFLAGS_busybox)))
SKIP_STRIP = y
endif

Do I need to have SKIP_STRIP set to y to prevent stripping if I'm using elf2flt?

How am I supposed to get LDFLAGS or CFLAGS_busybox to have -elf2flt when Makefile.flags is included before my arch/arm/Makefile? Is there an option for either of these somewhere else like .config or something?

I was attempting to use the miniupnpc library in my own application for the same hardware and it would just print unhanded fault just like busybox. I found that it was adding -fPIC to my CFLAGS. After removing that and putting in -march=armv4t and -mtune=arm7tdmi I can now run miniupnpc commands on my hardware. So I added the arch and tune options in my arch/arm/Makefile but it did not solve the problem.


Thanks,
Gary

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to