Show pagesourceOld revisionsBacklinksBack to top × Start with Chapter 1 → "Hello, world!" for OpenWrt Welcome to the “Hello, world!” -article series for OpenWrt. This article series walks you through the basics of developing new software for your router. We will start with an extremely simple application that does (almost) nothing, and slowly evolve it throughout the series. Each individual chapter in this series will introduce an additional concept, and once you've gone through all the chapters, you should feel much more comfortable foraging into the world of OpenWrt development. All the source code example files in this series are written in the C programming language. While the outlining concepts i.e. creating new packages, specifying source code location, using build tools and creating installable packages are applicable to any other programming language as well, explicit examples for other programming languages besides C are not provided. Command examples in this article series use the Bash command interpreter when inside the development environment, and the Ash command interpreter when operating on the target device. Requirements In order to proceed alongside this article series, the following requirements should be met: Basic understanding of a Linux operating system, preferably one of the supported distributions for running the OpenWrt build system Access to the Internet (for downloading the source code of the build system, or the OpenWrt SDK for your target device) Basic understanding of the C programming language Basic understanding of the GNU make system Knowledge on how to create and commission virtual machines, or access to a dedicated computer running a suitable Linux distribution Your target device should already be supported by the OpenWrt build system If you feel unsure on any of the above topics, feel free to follow the links in order to find some basic information. The author of this article chose to use a Debian 8 Linux distribution as the development environment for this article, running inside a VirtualBox virtual machine. You are free to choose an alternative virtualization platform, or even run the environment on a dedicated physical computer. Note that you should be familiar with the environment that you are operating in, and be able to perform basic file system operations (creating and deleting files) and be familiar with using a text editor of choice in your environment. List of topics This article series will cover the following topics: Preparing your OpenWrt build system for use Preparing, configuring and building the necessary tools Adjusting the PATH variable Conclusion Creating a simple “Hello, world!” application Creating the source code directory and files Compiling, linking and testing the application Conclusion Creating a package from your application Creating a package feed for your packages Creating the package manifest file Conclusion Including your package feed into OpenWrt build system Including the new package feed into the OpenWrt build system Updating and installing feeds Conclusion Building, deploying and testing your application Building the package Deploying and testing your package Removing your package Conclusion Migrating to use GNU make in your application Why use GNU make ? Creating a makefile Testing the makefile using native tools Modifying the package manifest, and testing the build Conclusion Patching your application: Adding new files About patches Preparing the source code Creating the first patch Including the first patch into the package Conclusion Patching your application: Editing existing files Creating the second patch Conclusion helloworld Start with Chapter 1 → This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.OKMore information about cookies Last modified: 2022/06/07 06:55by thom747