Problem in following helloworld tutorial

I am following the helloworld tutorial here

I think I have successfully made toolchain since when I issue command make toolchain/install there was no error

Next, when I was trying to create helloworld package

./scripts/feeds update -i -a mypackages

The log was

Create index file './feeds/packages.index'
Create index file './feeds/luci.index'
Create index file './feeds/routing.index'
Create index file './feeds/telephony.index'
Create index file './feeds/freifunk.index'
Create index file './feeds/mypackages.index'

./scripts/feeds install -a -p mypackages

The log was

Installing all packages from feed mypackages.

In the tutorial, there should be Examples submenu but when I type command make menuconfig there was nothing that I was looking for

The Makefile is in ~/mypackages/examples/helloworld

And the content is

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)
        cp $(SOURCE_DIR)/* $(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
        $(TARGET_CC) $(TARGET_LDFLAGS) -o $(PKG_BUILD_DIR)/$1 $(PKG_BUILD_DIR)/helloworld.o

# 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))

source code is in ~/helloworld include executable file

I have added src-link mypackages ~/mypackages into the the feeds.conf file that is in the openwrt source

Hi metwaroi31,
I'm having the same problem.
I need nodejs on OpenWRT, and decided to venture into this.
Obviously, trying the Hello World is the first step.

Have you had any success?

Sao Paulo - Brazil

No, I am dropping openwrt and using raspian to finish off my project at school now :frowning:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.