2

I have a little problem :

I need to add a program to a firmware which will be used in an embedded IP Camera in my office. The CPU of it is a ARM7TDMI. So, that being said I cross-compiled my program on a Debian x64 machine and got my ELF executable :

stunnel: ELF 32-bit MSB executable, ARM, EABI5 BE8 version 1 (SYSV), statically linked, stripped

But the uClinux on the camera only executes BFLT binaries !! Down is an example of one program I extracted from it :

camera: BFLT executable - version 4 ram gzip

I need to turn my ELF binary into BFLT. I found the elf2flt tool but I can't manage to compile it, do you know any easier way to get my binary into BFLT ? Or maybe I need another cross compiler to directly compile it BFLT'ed ?

Thank you for any relevant answer

K. Lasp
  • 21
  • 4
  • IIRC elf2flt is the way this is done, so you probably need to work on compiling that. Typically it would be built automatically by the uClinux build process if you built a system image for the target; there may be a way to get it to build only a toolchain, or to stop it after you see that has been built. You might also be able to obtain a prebuilt toolchain package or even a VM with the toolchain already set up. Even though you are allegedly statically linked, be prepared to find issues beyond just this. – Chris Stratton Oct 18 '17 at 19:57
  • @ChrisStrattonThank you for your answer. Following your advice I downloaded crosstool-ng and built the armv6-nommu-linux-uclibcgnueabi toolchains which gave me elf2flt ! But as you said, I encounter a problem when I try to apply it to my binary : ./armv6-nommu-linux-uclibcgnueabi-elf2flt: ./stunnel: Input file contains no relocation info – K. Lasp Oct 19 '17 at 13:30
  • It is starting to be a mess because I ARM and uclinux doesn't support Shared Libraries so I have to go by Static Linking but I don't understand how I can add those relocations infos in my ELF. If you have any direction I should follow... Thanks again – K. Lasp Oct 19 '17 at 13:44
  • You probably need to throw away the current binary and rebuild from sources using only the uClinux toolchain that you built. – Chris Stratton Oct 19 '17 at 14:45

0 Answers0