OpenWrt Forum Archive

Topic: [Help] my custom pack doesn't even try to compile.

The content of this topic has been archived on 25 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm using Kamakaze 8.09.02

My custom package shows up fine when I do :

make menuconfig

but when I do

make world V=99

I get these relevant excerpts :

make[3]: Entering directory `/home/gadget/Openwrt/8.09.2/package/roomba'
make[3]: Nothing to be done for `compile'.
make[3]: Leaving directory `/home/gadget/Openwrt/8.09.2/package/roomba'
make[3]: Entering directory `/home/gadget/Openwrt/8.09.2/package/roomba'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/home/gadget/Openwrt/8.09.2/package/roomba'

there is no mention of running a prepare pass on my package, and build_dir/mipsel does not contain anything related to my package

this seems to work :

# make package/roomba-prepare V=99
make[1]: Entering directory `/home/gadget/Openwrt/8.09.2'
make[2]: Entering directory `/home/gadget/Openwrt/Roomba/Daemon'
mkdir -p /home/gadget/Openwrt/8.09.2/build_dir/mipsel/roomba-v1.0.0
cp -fpR ./src/* /home/gadget/Openwrt/8.09.2/build_dir/mipsel/roomba-v1.0.0/
touch /home/gadget/Openwrt/8.09.2/build_dir/mipsel/roomba-v1.0.0/.prepared_07f8ae2b747a9ca53d7d2526e55030bc
make[2]: Leaving directory `/home/gadget/Openwrt/Roomba/Daemon'
make[1]: Leaving directory `/home/gadget/Openwrt/8.09.2'

but this doesn't

#make package/roomba-compile V=99
make[1]: Entering directory `/home/gadget/Openwrt/8.09.2'
make[2]: Entering directory `/home/gadget/Openwrt/Roomba/Daemon'
make[2]: Nothing to be done for `compile'.
make[2]: Leaving directory `/home/gadget/Openwrt/Roomba/Daemon'
make[1]: Leaving directory `/home/gadget/Openwrt/8.09.2'

here are the contents of package/roomba/Makefile :

include $(TOPDIR)/rules.mk

PKG_NAME:=roomba
PKG_VERSION:=1.0.0
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

define Package/roomba
    SECTION:=utils
    CATEGORY:=Utilities
    TITLE:=Roomba control utility
endef

define Package/roomba/description
    This package contains an utility to control the Irobot Roomba through a serial port
    this ia a change
endef

define Build/Prepare
    mkdir -p $(PKG_BUILD_DIR)
    $(CP) ./src/* $(PKG_BUILD_DIR)/
endef

define Build/Compile
    $(MAKE) -C $(PKG_BUILD_DIR)/
endef

define Package/roomba/install
    $(INSTALL_DIR) $(1)/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/{rcd,rc,rs} $(1)/bin/
endef

$(eval $(call BuildPackage,roomba))

here are the contents of package/roomba/src/Makefile :

all: rcd rc sr udp

rcd: rcd.o roomba_comms.o roomba_net.o

rc: rc.o roomba_comms.o

sr: sr.o roomba_comms.o

udp : udp-server udp-client

%: %.o
    $(CC) -o $@ $^ -lm

%.o: %.c
    $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -I. -Iinclude -o $@ $^

clean:
    rm -f $(STAGING_DIR)*.o

What am I doing wrong?

I don't see anything wrong with the compilation. Did the compilation produce the ipk file for the package?

I don't see anything that could be out put from my project.

# ls -la build_dir/mipsel/
total 72
drwxr-xr-x 16 gadget gadget  4096 2010-02-12 13:59 .
drwxr-xr-x  6 gadget gadget  4096 2010-02-12 11:32 ..
drwxr-xr-x 32 gadget gadget  4096 2010-02-12 11:50 busybox-1.11.2
drwxr-xr-x  9 gadget gadget  4096 2010-02-12 11:50 dnsmasq-2.47
drwxr-xr-x  7 gadget gadget 12288 2010-02-12 11:50 dropbear-0.51
drwxr-xr-x  3 gadget gadget  4096 2010-02-12 11:50 firewall-1
drwxr-xr-x 13 gadget gadget  4096 2010-02-12 11:49 libpcap-0.9.8
drwxr-xr-x 14 gadget gadget  4096 2010-02-12 11:47 libtool-1.5.24
drwxr-xr-x  7 gadget gadget  4096 2010-02-12 11:50 lua-5.1.4
drwxr-xr-x  4 gadget gadget  4096 2010-02-12 11:51 nvram
drwxr-xr-x 11 gadget gadget  4096 2010-02-12 11:51 opkg-4564
drwxr-xr-x 16 gadget gadget  4096 2010-02-12 11:51 ppp-2.4.3
-rw-r--r--  1 gadget gadget     0 2010-02-12 11:32 .prepared
drwxr-xr-x 16 gadget gadget  4096 2010-02-11 21:27 root-brcm-2.4
drwxr-xr-x  2 gadget gadget  4096 2010-02-12 10:54 stamp
drwxr-xr-x  6 gadget gadget  4096 2010-02-12 11:51 uci-0.7.3
drwxr-xr-x  6 gadget gadget  4096 2010-02-12 11:51 wireless_tools.29
total 1708
# ls -la bin/packages/mipsel/
drwxr-xr-x 2 gadget gadget   4096 2010-02-12 13:59 .
drwxr-xr-x 3 gadget gadget   4096 2010-02-12 11:36 ..
-rw-r--r-- 1 gadget gadget  29219 2010-02-12 11:50 base-files-brcm-2.4_14.3-r18961_mipsel.ipk
-rw-r--r-- 1 gadget gadget   9833 2010-02-12 11:37 bridge_1.0.6-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget 272680 2010-02-12 11:50 busybox_1.11.2-2.2_mipsel.ipk
-rw-r--r-- 1 gadget gadget  76111 2010-02-12 11:40 dnsmasq_2.47-3.3_mipsel.ipk
-rw-r--r-- 1 gadget gadget 100721 2010-02-12 11:44 dropbear_0.51-2_mipsel.ipk
-rw-r--r-- 1 gadget gadget   4644 2010-02-12 11:45 firewall_1-1.2_mipsel.ipk
-rw-r--r-- 1 gadget gadget  40278 2010-02-12 11:51 iptables_1.3.8-4.1_mipsel.ipk
-rw-r--r-- 1 gadget gadget   2754 2010-02-12 11:51 iptables-mod-conntrack_1.3.8-4.1_mipsel.ipk
-rw-r--r-- 1 gadget gadget   5120 2010-02-12 11:51 iptables-mod-nat_1.3.8-4.1_mipsel.ipk
-rw-r--r-- 1 gadget gadget    649 2010-02-12 11:51 kernel_2.4.35.4-brcm-2.4-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget 376745 2010-02-12 11:50 kmod-brcm-wl_2.4.35.4+4.150.10.5.3-brcm-2.4-3.2_mipsel.ipk
-rw-r--r-- 1 gadget gadget  11494 2010-02-12 11:50 kmod-diag_2.4.35.4-brcm-2.4-4.2_mipsel.ipk
-rw-r--r-- 1 gadget gadget  17646 2010-02-12 11:51 kmod-ipt-conntrack_2.4.35.4-brcm-2.4-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget  22644 2010-02-12 11:51 kmod-ipt-core_2.4.35.4-brcm-2.4-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget  16361 2010-02-12 11:51 kmod-ipt-nat_2.4.35.4-brcm-2.4-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget  10502 2010-02-12 11:51 kmod-ipt-nathelper_2.4.35.4-brcm-2.4-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget  26050 2010-02-12 11:51 kmod-ppp_2.4.35.4-brcm-2.4-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget   9194 2010-02-12 11:51 kmod-pppoe_2.4.35.4-brcm-2.4-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget  14407 2010-02-12 11:50 kmod-switch_2.4.35.4-brcm-2.4-1.1_mipsel.ipk
-rw-r--r-- 1 gadget gadget   2754 2010-02-12 11:50 kmod-wlcompat_2.4.35.4+4.150.10.5.3-brcm-2.4-3.2_mipsel.ipk
-rw-r--r-- 1 gadget gadget  23234 2010-02-12 11:50 libgcc_3.4.6-14.3_mipsel.ipk
-rw-r--r-- 1 gadget gadget  14355 2010-02-12 11:51 libuci_0.7.3-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget   9867 2010-02-12 11:45 mtd_8.2_mipsel.ipk
-rw-r--r-- 1 gadget gadget  69768 2010-02-12 11:50 nas_4.150.10.5.3-3.2_mipsel.ipk
-rw-r--r-- 1 gadget gadget   5364 2010-02-12 11:37 nvram_1_mipsel.ipk
-rw-r--r-- 1 gadget gadget  66701 2010-02-12 11:48 opkg_4564-3.1_mipsel.ipk
-rw-r--r-- 1 gadget gadget  14100 2010-02-12 11:57 Packages
-rw-r--r-- 1 gadget gadget   3193 2010-02-12 11:57 Packages.gz
-rw-r--r-- 1 gadget gadget 110138 2010-02-12 11:51 ppp_2.4.3-11.2_mipsel.ipk
-rw-r--r-- 1 gadget gadget  10610 2010-02-12 11:51 ppp-mod-pppoe_2.4.3-11.2_mipsel.ipk
-rw-r--r-- 1 gadget gadget   6976 2010-02-12 11:51 uci_0.7.3-1_mipsel.ipk
-rw-r--r-- 1 gadget gadget 212285 2010-02-12 11:50 uclibc_0.9.29-14.3_mipsel.ipk
-rw-r--r-- 1 gadget gadget  32741 2010-02-12 11:37 wireless-tools_29-2_mipsel.ipk
-rw-r--r-- 1 gadget gadget  12434 2010-02-12 11:50 wlc_4.150.10.5.3-3.2_mipsel.ipk
# find -name roomba* -o -name rcd -o -name rc -o -name sr
./package/roomba
#

Am I missing something?

Did you run make package/symlinks before make menuconfig to select the package?

mazilo wrote:

Did you run make package/symlinks before make menuconfig to select the package?

I have never run make package/symlinks.  I did, however run make distclean in order to get my package to show up in the menuconfig.  That was before I posted here.

But I did finally get it to build after running this sequence

# make package/roomba-clean
# make distclean
# make -C package/roomba/src clean
# touch package/roomba/src/{*.c,*.h,Makefile}
# touch package/roomba/Makefile
# make menuconfig

This is not my first time having run any of these commands.  Perhaps it has something to do with the order, or having done them all at the same time?

Anyway, it's working now.  Thanks for your help.

The discussion might have continued from here.