SDK Hello World - Pacakege Problem?

Hi, so I am trying to test writing a custom appliaction on a RUT, I have several but for this test I am using the most recent SDK for a RUT240. I have a fresh install of Ubuntu18 as recommended. I am able to create and compile the following code on Ubuntu

#include <stdio.h>
int main(void)
    printf("\nHello, world!\n\n");
    return 0;

This is saved in

I have followed the instructions from OpenWrt

I have created a Makefile shown below and saved it to


as per the instructions, then I have tried to register the package
in feeds.conf.default, there are some repos pointed to already there

src-link mypackages ~/RUTX_R/rutos-ath79-rut2-gpl/mypackages
src-git packages^65057dcbb5de371503c9159de3d45824bec482e0
src-git luci^3b3c2e5f9f82372df8ff01ac65668be47690dcd5
src-git routing^c30c9ffc93702365439a7647244a052531f2e957
src-git telephony^7f73a9ad19269dcddcb7fc26e03a9823717587bb

I update and install the feeds, (there are no errors) using

./scripts/feeds update mypackages
./scripts/feeds install -a -p mypackages

But when I run make menuconfig I don’t see any reference to my ‘hello world’ application?

I think I am having a problem with the feed/packages and perhaps I am adding the src-link to the wrong file?

Any help would be great!


include $(TOPDIR)/

# Name, version and release number
# The name and version of your package are used to define the variable to point to the build directory of your package: $(PKG_BUILD_DIR)

# Source settings (i.e. where to find the source codes)
# This is a custom variable, used below

include $(INCLUDE_DIR)/

# Package definition; instructs on how and where our package will appear in the overall configuration menu ('make menuconfig')
define Package/helloworld
  TITLE:=Hello, World!

# Package description; a more verbose description on what our package does
define Package/helloworld/description
  A simple "Hello, world!" -application.

# Package preparation instructions; create the build directory and copy the source code. 
# The last command is necessary to ensure our preparation instructions remain compatible with the patching system.
define Build/Prepare
		mkdir -p $(PKG_BUILD_DIR)

# Package build instructions; invoke the target-specific compiler to first compile the source file, and then to link the file into the final executable
define Build/Compile
		$(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/helloworld.o -c $(PKG_BUILD_DIR)/helloworld.c

# Package install instructions; create a directory inside the package to hold our executable, and then copy the executable we built previously into the folder
define Package/helloworld/install
		$(INSTALL_DIR) $(1)/usr/bin
		$(INSTALL_BIN) $(PKG_BUILD_DIR)/helloworld $(1)/usr/bin

# This command is always the last, it uses the definitions and variables we give above in order to get the job done
$(eval $(call BuildPackage,helloworld))

This topic was automatically closed after 15 days. New replies are no longer allowed.