Author Topic: [SOLVED] Bad executable format  (Read 2230 times)

TarMil

  • Guest
[SOLVED] Bad executable format
« on: December 16, 2009, 09:44:19 pm »
Hi all,

I received my Dingoo two days ago, and after successfully installing Dingux, I went to try coding a little bit. So I installed Booboo's toolchain on my linux laptop, and happily went to code.

But no matter what C code I put in my file, when I run:
Code: [Select]
mipsel-linux-gcc hello.c -o helloand then send the generated `hello' to the dingoo, it seems that the file is in the wrong executable format; or at least, that's what gdb says. Needless to say, it's not an x86 binary either :-)

The only reason I can see is either wrong compiler or wrong compiling options, but I can't figure out where exactly is the problem. Does anyone have an idea? (and please forgive me if there is any doc I missed :-/ )
« Last Edit: December 22, 2009, 12:10:58 am by TarMil »

TarMil

  • Guest
Re: Bad executable format
« Reply #1 on: December 17, 2009, 07:20:05 am »
After seeing this topic, I figured that the files could be badly transfered to the Dingoo, since I was using FTP in passive mode.

I went on to check with hexdump, and indeed, the file on the dingoo was different from the one on my laptop.

But I tried using FTP in active mode, and then rebooting to native firmware and writing the file directly to the miniSD; and the result was the same.

Then I tried putting the SD directly into my laptop's SD slot with an adapter, and `mount' put it in read-only mode. Do you think all this could be caused by a SD corruption?

darfgarf

  • Guest
Re: Bad executable format
« Reply #2 on: December 17, 2009, 09:25:28 am »
does your sd adapter have a little sliding tab on one side? some can be easily caught when you insert it and slide it to read only

run chkdsk in windows, or a linux equivalent if there is one, or just reformat and start from scratch of course (assuming you made a recent backup)

zear

  • * Moderator
  • Posts: 2381
Re: Bad executable format
« Reply #3 on: December 17, 2009, 09:35:49 am »
What does the "file" command say?
Maybe your binaries aren't MIPS binaries in the first place?

TarMil

  • Guest
Re: Bad executable format
« Reply #4 on: December 17, 2009, 07:42:46 pm »
Well, it seems that the file system was corrupted after all.

When I tried to format it from linux, it didn't work; but it worked from my Win7 desktop. Then I did the manipulations, and I had the same file corruptions, but writing from the laptop's SD slot works fine. I'll stick with this solution for the moment :)

Thanks guys :)

 

Post a new topic
Post a new topic