Hi, I compiled my lede sdk for the ar71xx target and is trying to compile a simple helloworld program. I have the following directory structure:
sdk
\package
\helloworld
\src
Makefile
helloworld.c
Makefile
**package/helloworld/src/Makefile:**
CC = gcc
FLAG = -Wall
helloworld:
$(CC) $(FLAG) helloworld.c -o helloworld
package/helloworld/Makefile:
include $(TOPDIR)/rules.mk
#Name and release number
PKG_NAME:=helloworld
PKG_RELEASE:=1
#configure build directory
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
#useless metainfo
define Package/helloworld
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Helloworld Program
endef
#IMPORTANT: define steps to prepare for the build
#default is to download source from the web
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
#IMPORTANT: define steps to install on target machine
#$(1) refers to the root directory of target
#$(INSTALL_DIR) contains command to prepare the installation directory should
#it not exist
define Package/helloworld/install
$(INSTALL_DIR) $(1)/usr/bin
#copy helloworld binary
$(INSTALL_DIR) $(PKG_BUILD_DIR)/helloworld $(1)/usr/sbin
endef
#this starts the build process
$(eval$(call BuildPackage,helloworld))
Then I ran make package/helloworld/compile in the root SDK directory, which gave the following output to console:
tmp/.config-package.in:36:warning: ignoring type redefinition of 'PACKAGE_libc' from 'boolean' to 'tristate'
tmp/.config-package.in:64:warning: ignoring type redefinition of 'PACKAGE_libgcc' from 'boolean' to 'tristate'
tmp/.config-package.in:149:warning: ignoring type redefinition of 'PACKAGE_libpthread' from 'boolean' to 'tristate'
#
# configuration written to .config
#
make[1] package/helloworld/compile
make[2] -C package/toolchain compile
make[2] -C package/helloworld compile
I then did find -name "*helloworld*" but was not able to find the built .ipkg file anywhere. Did I configure something wrong in the build options or maybe it has something to do with the SDK not being compiled properly?