Adding my program to WRT54G?

Discussion in 'DD-WRT Firmware' started by Kot_Behemot, Apr 11, 2006.

  1. Kot_Behemot

    Kot_Behemot Network Guru Member

    Hi,
    I have such a problem:
    How can I add a program to my WRG without MMC mod?
    Do I have to recompile whole firmware?
    How do I compile a program for WRT on windows or linux system (i do not need manual for a KDevelop or VC but i need to know what kind of libraries/options i have to use).

    (I want to add a server on wrt sending on wan port to my outer lan the NETBIOS namebroadcast of my local computer and I am not sure about what to do to place it on router and run).

    Thanks for all replies :).
     
  2. Kot_Behemot

    Kot_Behemot Network Guru Member

    Hmm, no one can help me?
    I found a link to how to of Openwrt ipkg build solution, but I am not sure if it is the correct way to do it on DD-wrt also: http://wiki.openwrt.org/BuildingPackagesHowTo?highlight=(HowTo)
    I have also problems with applying this process to my source- where do I put source of my program, and what my Makefile should look like?
    Maybe someone will be able to give at leas some hints, caus my Makefile didn't work:
    Code:
    include package/rules.mk #home/behemot/
    
    
    PKG_NAME:=hello
    PKG_VERSION:=2.1.1
    PKG_RELEASE:=1
    
    PKG_SOURCE:=~/files/OpenWrt-SDK-Linux-i686-1/package/helloworld/hello.c
    PKG_CAT:=zcat
    
    PKG_BUILD_DIR:=~/files/OpenWrt-SDK-Linux-i686-1/package/helloworld
    PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
    
    #include $(TOPDIR)/package/rules.mk
    
    $(eval $(call PKG_template,HELLO,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    
    $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
    	#Since there is no configure script, we can directly go to the building step
    	touch $@
    
    $(PKG_BUILD_DIR)/.built:
    	rm -rf $(PKG_INSTALL_DIR)
    	mkdir -p $(PKG_INSTALL_DIR)/usr/bin
    	$(TARGET_CC) $(PKG_BUILD_DIR)/$(PKG_NAME).c -o $(PKG_BUILD_DIR)/$(PKG_NAME) -lyourlib #Note we directly call the cross-compiler and define its output
    	$(CP) $(PKG_BUILD_DIR)/src/hello $(PKG_INSTALL_DIR)/usr/bin
    	touch $@
    
    $(IPKG_HELLO):
    	install -d -m0755 $(IDIR_HELLO)/usr/bin
    	$(CP) $(PKG_INSTALL_DIR)/usr/bin/hello $(IDIR_HELLO)/usr/bin
    	$(RSTRIP) $(IDIR_HELLO)
    	$(IPKG_BUILD) $(IDIR_HELLO) $(PACKAGE_DIR)
    
    mostlyclean:
    	make -C $(PKG_BUILD_DIR) clean
    	rm $(PKG_BUILD_DIR)/.built
    
    It says that make all (make compile as well) has nothing to do.

    Any help would be great.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice