Step By Step Guide for Starting "Hello, World!" on OpenWRT



Similar documents
Enabling OpenFlow v1.0 on Mikrotik RouterBoard 750GL: A Tutorial

BACKUP YOUR SENSITIVE DATA WITH BACKUP- MANAGER

Cassandra Installation over Ubuntu 1. Installing VMware player:

LABORATORIUM 1 Setup and basic configuration of Asterisk BPX on Linux

Version Control with Subversion

Newton2 Developers Guide

AlienVault Unified Security Management (USM) 4.x-5.x. Deploying HIDS Agents to Linux Hosts

Buildroot for Vortex86EX (2016/04/20)

Code::Block manual. for CS101x course. Department of Computer Science and Engineering Indian Institute of Technology - Bombay Mumbai

Creating a DUO MFA Service in AWS

SETTING UP A LAMP SERVER REMOTELY

Raspberry Pi Kernel-o-Matic

SheevaPlug Development Kit README Rev. 1.2

SFLphone Documentation

Recommended File System Ownership and Privileges

Computer Science and Engineering Linux Cisco VPN Client Installation and Setup Guide

User Manual - Help Utility Download MMPCT. (Mission Mode Project Commercial Taxes) User Manual Help-Utility

Partek Flow Installation Guide

A SHORT INTRODUCTION TO DUPLICITY WITH CLOUD OBJECT STORAGE. Version

Buildroot Workshop. Libre Software Meeting Thomas Petazzoni Free Electrons

Running Knn Spark on EC2 Documentation

SAS Marketing Automation 4.4. Unix Install Instructions for Hot Fix 44MA10

INSTALLING MALTED 3.0 IN LINUX MALTED: INSTALLING THE SYSTEM IN LINUX. Installing Malted 3.0 in LINUX

Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012

How to upload - copy PowerChute Network Shutdown installation files to VMware VMA from a PC

Installing IBM Websphere Application Server 7 and 8 on OS4 Enterprise Linux

Steps for running C-program

OpenGeo Suite for Linux Release 3.0

Using a login script for deployment of Kaspersky Network Agent to Mac OS X clients

The Build Process. of (GNU Tools for ARM Embedded Processors)

Hadoop Installation MapReduce Examples Jake Karnes

SAS Marketing Optimization. Windows Installation Instructions for Hot Fix 51mo14

EZcast Installation guide

Apache Hadoop 2.0 Installation and Single Node Cluster Configuration on Ubuntu A guide to install and setup Single-Node Apache Hadoop 2.

Apache and Virtual Hosts Exercises

Installing FEAR on Windows, Linux, and Mac Systems

Subversion Server for Windows

Basic Linux & Package Management. Original slides from GTFO Security

Massey University Follow Me Printer Setup for Linux systems

Run your next CGN on a $20 OpenWRT

USB Driver. Installation Guide for LTE Devices

ARMSDK-VM Virtual Appliance A preconfigured Linux system

Specops Command. Installation Guide

Procedure to Create and Duplicate Master LiveUSB Stick

IMPLEMENTATION OF CIPA - PUDUCHERRY UT SERVER MANAGEMENT. Client/Server Installation Notes - Prepared by NIC, Puducherry UT.

AWS Schema Conversion Tool. User Guide Version 1.0

Installing Proview on an Windows XP machine

Hadoop and Hive. Introduction,Installation and Usage. Saatvik Shah. Data Analytics for Educational Data. May 23, 2014

HIG s Remote Desktop Services (RDS) on Linux

Transferring AIS to a different computer

CPE111 COMPUTER EXPLORATION

My name is Robert Comella. I am a SANS Technology Institute (STI) student who is nearly finished with my master of science in engineering degree.

Ulteo Open Virtual Desktop Installation

ALERT installation setup

Installing and Configuring MySQL as StoreGrid Backend Database on Linux

Lab 1 Beginning C Program

Spectrum Spatial Analyst Version 4.0. Installation Guide for Linux. Contents:

Local Caching Servers (LCS): User Manual

PetaLinux SDK User Guide. Application Development Guide

Apache HTTP Server. Implementation Guide. (Version 5.7) Copyright 2013 Deepnet Security Limited


Version Control with Subversion and Xcode

UBUNTU VIRTUAL MACHINE + CAFFE MACHINE LEARNING LIBRARY SETUP TUTORIAL

RecoveryVault Express Client User Manual

HOW TO CREATE A SLICE IN GENI?

MS SQL Express installation and usage with PHMI projects

Tutorial 0A Programming on the command line

INASP: Effective Network Management Workshops

Installation Guide. . All right reserved. For more information about Specops Inventory and other Specops products, visit

Software Delivery Integration and Source Code Management. for Suppliers

Java Language Tools COPYRIGHTED MATERIAL. Part 1. In this part...

Suricata Performance White Paper

Online Backup Linux Client User Manual

Linux Development Environment Description Based on VirtualBox Structure

How To Install The Snow Active Directory Discovery Service On Windows (Windows) (Windows 7) (Powerbook) (For Windows) (Amd64) (Apple) (Macintosh) (Netbook) And (Windows

Setting up an online Java Jmonitor. server using the. EXPERIMENTAL code from. John Melton GØORX/N6LYT

DraganFly Guardian: API Instillation Instructions

Online Backup Client User Manual

How To Backup On Ubuntu (Amd64) With Back In Time (Amd) On Windows Xp) On A Windows Xp (Amd32) On Ubunus On A Ubuntu

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

Web Testing, Java Testing, Server Monitoring. AppPerfect Installation Guide

1 Recommended Readings. 2 Resources Required. 3 Compiling and Running on Linux

Work. MATLAB Source Control Using Git

Setting up PostgreSQL

Online Backup Client User Manual

Call Recorder Quick CD Access System

CycleServer Grid Engine Support Install Guide. version 1.25

Introduction to Operating Systems

System Area Management Software Tool Tip: Agent Deployment utilizing. the silent installation with Active Directory

SimbaEngine SDK 9.4. Build a C++ ODBC Driver for SQL-Based Data Sources in 5 Days. Last Revised: October Simba Technologies Inc.

AlienVault. Unified Security Management x Offline Update and Software Restoration Procedures

Authenticate vsftpd (a secure FTP server for UNIXlike systems) with IDENTIKEY Authentication Sever

Enterprize Setup Checklist

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

Solr Bridge Search Installation Guide

The objective of this lab is to learn how to set up an environment for running distributed Hadoop applications.

Expresso Quick Install

Using ESXi with PowerChute Business Edition

1. Product Information

Transcription:

Step By Step Guide for Starting "Hello, World!" on OpenWRT Installation. All actions of this step should be performed by a non-root user. Directories with spaces in their full path are not allowed. 1. Install SVN by running the following commands in the terminal. Respond positively when asked to confirm. sudo apt-get update sudo apt-get install subversion build-essential 2. Create openwrt folder in the home folder. 3. Open it mkdir ~/openwrt cd ~/openwrt 4. Download OpenWRT Attitude Adjustment, by running the following command: svn co svn://svn.openwrt.org/openwrt/branches/attitude_adjustment 5. Open attitude_adjustment folder cd attitude_adjustment 6. Download and install all available feeds./scripts/feeds update -a./scripts/feeds install a 7. Obtain a list of missing packages for successful build, using the following command: make menuconfig If the installation of OpenWRT is not interfered with anything, as evidenced by the absence of errors, proceed to step 8. Otherwise you will be notified of the missing packages in the following way: Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h) Under Ubuntu 12.10 operating system build required the following packages: ncurses, zlib, GNU awk, and git. Commands that install the missing packages: sudo apt-get install libncurses5-dev sudo apt-get install zlib1g-dev

sudo apt-get install gawk sudo apt-get install git-core During installation you ll have to enter root-user s password and agree if asked to confirm installation. If the list of missing packages differs from the above list, you can use the following command for finding the necessary package apt-cache search "" enter the name of the missing component obtained through make menuconfig in brackets. You might also find helpful the table of the most frequent issues that is available at the following address: http://wiki.openwrt.org/doc/howto/buildroot.exigence («Table of known prerequisites and their corresponding packages»). Select the column with your operating system and the line with the missing package and find what you need to install at the crossing. When all necessary components are installed you ll see a configuration menu (a grey window on a blue background) 8. The settings should be the following: Target system - Atheros AR7xxx/AR9xxx Subtarget - Devices with NAND flash (mostly Mikrotik) Target profile - Atheros WiFi (ath5k) 9. Save settings and exit 10. In attitude_adjustment folder start the build, using make command Attention! Build takes 2-6 hours. II. Package assembly 1. Create a folder for source codes. Locate it in the OpenWRT root cd../ mkdir hello cd hello As a result you should get a hello folder in the openwrt folder, next to attitude_adjustment folder. In case of an author, it is /home/user/openwrt/hello 2. Create two files hello.c and Makefile in this folder. The first file will contain the source code on C and the second one build rules. touch hello.c touch Makefile # file name with a capital letter Both files contain: hello.c #include <stdio.h> void main() { printf("hello, World!\n"); }

Makefile.SUFFIXES:.tar.gz.c override CFLAGS += -Wall -O0 -g hello:hello.c all: hello hello.tar.gz %.tar.gz: DIR=$(subst.tar.gz,,$@) %.tar.gz: %.c @mkdir -p./$(dir)-0.1 @cp $^ Makefile./$(DIR)-0.1 tar -cz -f $@./$(DIR)-0.1 In this case, hello.c contains a code of simple greeting to a console, and Makefile compiles the code, building on the platform, creates tar.gz archive with a source code and a make file in it, as well as a folder with similar content. Attention! Keeping tabs is a must! You can verify the accuracy by running the following commands (in ~/openwrt/hello) make all./hello The first one will collect, compile and create an archive with a folder. The second one will launch the executive file compiled for the platform of the current machine. «Hello, World!» in the console indicates that this step was performed successfully. 3. Then, create a hello folder in ~/openwrt/attitude_adjustment/feeds/packages/utils folder cd../ cd attitude_adjustment/feeds/packages/utils/ mkdir hello and open it cd hello/ 4. Create a make file in it for OpenWRT touch makefile 5. Record the following data in it include $(TOPDIR)/rules.mk PKG_NAME:=hello PKG_VERSION:=0 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(PKG_NAME)-$(PKG_VERSION).$(PKG_RELEASE) PKG_SOURCE:=hello.tar.gz PKG_SOURCE_URL:=file:///home/user/openwrt/hello/ include $(INCLUDE_DIR)/package.mk

define Package/hello SECTION:=utils CATEGORY:=Utilities TITLE:=HW define Package/hello/description Hello World define Package/hello/Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) hello define Package/hello/install $(INSTALL_DIR) $(1)/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hello $(1)/bin/hello $(eval $(call BuildPackage,hello)) Attention! Make sure to change user name in PKG_SOURCE_URL. III. Compilation 1. After proper make files configuring run the following commands from ~/openwrt/attitude_adjustment folder:./scripts/feeds update -i./scripts/feeds install hello 2. Open configuration menu once again make menuconfig 3. Find our package Utilites ----> hello And put [M] package parameter to it 4. Press Exit two times to exit and save 5. Run the following command make package/hello/compile In case of successful compilation, a ready hello_0-1_ar71xx.ipk executive file will appear in ~/openwrt/attitude_adjustment/bin/ar71xx/packages for starting on FlexRoad. IV. Moving and installation

1. Move hello_0-1_ar71xx.ipk package to FlexRoad and install it. As an option you can copy hello_0-1_ar71xx.ipk to the root folder of the device using SCP utility. 2. Install the package using opkg install /root/hello_0-1_ar71xx.ipk command. 3. You can check its operation by entering the package name as a command in the console hello «Hello, World!» in the console indicates successful completion of all operations.