Well i guess that is not the problem because when i 'file' the program build in the image i get the following:
$ file helloworld
helloworld: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 2.6.32, stripped
When i 'file' the program i uploaded to the target i get:
openwrt/build_dir/target-mipsel_24kec+dsp_glibc-2.21/helloworld/helloworld: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked, interpreter /lib/ld.so.1, for GNU/Linux 2.6.32, not stripped
So the only real difference is that the second one is not stripped, can this be a problem??
hnyman the binary i want to use is indeed in 'openwrt/build_dir/target-mipsel_24kec+dsp_glibc-2.21/helloworld/helloworld'
I use the following makefile in the package dir:
include $(TOPDIR)/rules.mk
PKG_NAME:=helloworld
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/helloworld
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Helloworld -- prints a snarky message
endef
define Package/helloworld/description
DESCRIPTION:=\
If you can't figure out what this program does, \\\
you're probably brain-dead and need immediate \\\
medical attention.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Package/helloworld/install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/helloworld $(1)/bin/
endef
$(eval $(call BuildPackage,helloworld))
And this makefile in the src dir:
helloworld: helloworld.o
$(CC) $(LDFLAGS) helloworld.o -o helloworld
helloworld.o: helloworld.c
$(CC) $(CFLAGS) -c helloworld.c
clean:
rm *.o helloworld
This is my helloworld:
#include <stdio.h>
int main()
{
printf("Hello OpenWRT\r\n");
return 0;
}
Thanks so far