Dear members
I'm having problems with compiling a package (ipkg) with backfire 10.03.1.
SOLVED! Read my second post.
Developing machine:
OS: Ubuntu 12.04 LTS codename precise 64-bit, Kernel Linux 3.2.0-24-generic, GNOME 3.5.1
Hardware: Memory 1.5 GiB, Processor Intel Pentium D CPU 3.00 GHz x 2
OpenWrt device:
Oracle VirtualBox 4.1.14r77440
Backfire 10.03.1 r29592
(tested with another virtual machines and it's working as it should)
I have successfully installed Eclipse with remote debugging (to virtual device). I tried with basics and followed gargoyle how to (http://www.gargoyle-router.com/wiki/dok … wrt_coding). Created a simple C program which is running both on local machine and when using remote debug to my virtual device.
helloworld.c
#include <stdio.h>
int main(void)
{
printf("Hell! O' world, why won't my code compile?\n\n");
return 0;
}
Makefile in /helloworld/src
helloworld: helloworld.o
$(CC) $(LDFLAGS) helloworld.o -o helloworld
helloworld.o: helloworld.c
$(CC) $(CFLAGS) -c helloworld.c
clean:
rm *.o helloworld
Makefile in /helloworld
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
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))
1) in src folder I issued a command make, tried ./helloworld -> Worked, make clean
1) I downloaded and extracted OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1.tar.bz2 from http://downloads.openwrt.org/backfire/1 … 6_generic/
2) Copied helloworld folder to package folder of extracted SDK.
3) from root folder of SDK issued a command make V=99
Collecting package info: done
Collecting target info: done
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'getopt'... ok.
Checking 'fileutils'... ok.
Checking 'working-gcc'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'zlib'... ok.
Checking 'gawk'... ok.
Checking 'flex'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'patch'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'wget'... ok.
Checking 'gnutar'... ok.
Checking 'svn'... ok.
Checking 'gnu-find'... ok.
Checking 'getopt-extended'... ok.
Checking 'non-root'... ok.
make[1]: Entering directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
make[2]: Entering directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
make[2]: Nothing to be done for `package/compile'.
make[2]: Leaving directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
make[2]: Entering directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
--: line 0: cd: /home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1/bin/x86/packages: No such file or directory
make[2]: Leaving directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
make[1]: Leaving directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
4) checked the /bin/packages -> empty
5) created folder /bin/x86/packages
6) once again make V=99
make[1]: Entering directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
make[2]: Entering directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
make[2]: Nothing to be done for `package/compile'.
make[2]: Leaving directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
make[2]: Entering directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
make[2]: Leaving directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
make[1]: Leaving directory `/home/user1/backfire-10.03.1-x86_generic/OpenWrt-SDK-x86-for-Linux-i686-gcc-4.1.2_uClibc-0.9.30.1'
7) nothing, no ipkg
Then I tried whiterussian and kamikaze latest SDK and whiterussian worked. I got ipkg, but that one I can not install on my virtual device running backfire.
I know that there is a difference between kamikaze and whiterussian makefile in description, but are there any other differences in makefile between whiterussian, kamikaze, backfire, ...?
Anyhow, I've been trying to compile this simple C program with backfire SDK for at least 3-4 days now. Working on it almost 10 hrs per day. Read almost anything that I could find with search engines.
Would someone be so kind and help me explain what I'm doing wrong. Why is my package not compiled with backfire 10.03.1 SDK?
Thank you in advance.
Regards
(Last edited by mitja.gti on 13 May 2012, 14:18)