Coder Social home page Coder Social logo

picchioni / imagebuilder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gl-inet/imagebuilder_archive

0.0 1.0 0.0 541.11 MB

Imagebuilder for all GL.iNet routers.

Python 3.71% Makefile 14.21% C 23.50% Awk 0.01% Shell 22.62% Perl 16.11% C++ 10.65% Lex 0.14% Yacc 0.28% Roff 8.20% Assembly 0.55% Objective-C 0.03%

imagebuilder's Introduction

Imagebuilder

Imagebuilder for GL.iNet devices. The Image Builder (previously called the Image Generator) is a pre-compiled environment suitable for creating custom images without the need for compiling them from source.

System Requirements

  • x86_64 platform
  • Ubuntu or another linux distro
  • Download the build environment:
sudo apt-get update
sudo apt-get install subversion build-essential git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip git wget

Usage

To build all the router firmwares, run ./gl_image -a. To build a specific firmware, run ./gl_image -p <image_name>. You can list all the images names by running ./gl_image -l.

Run ./gl_image -h to see more details and advanced options.

Complete Usage Example

To make an image for the Mifi with some extra packages included:

git clone https://github.com/gl-inet/imagebuilder.git
cd imagebuilder
./gl_image -p mifi -e "openssh-sftp-server nano htop"

The compiled image becomes: bin/gl-mifi/openwrt-mifi-ar71xx-generic-gl-mifi-squashfs-sysupgrade.bin

For other firmwares, the compiled firmware file is in /bin/<device_name>/.

Advanced Configuration

All the GL device package configuration is done with the images.json file. The following options control the configuration:

packages: The default packages included in all firmwares
profiles: Configuration for each firmware
{
    <image_name>:
    {
        profile: The name of the device. Run "make info" for a list of available devices.
        version: Firmware version. Generates a version file called /etc/glversion and overrides /etc/opk/distfeeds.conf with the version number
        imagebuilder: Image builder folder
        packages: Packages in the firmware. Variables include the default packages. Add the package name to include. "-" appended to the package name excludes the package, eg: "-mwan3"
        files: Files folder, it allows customized configuration files to be included in images built with Image Generator, all files from the folder will be copied into device's rootfs("/").
    }
}

Assuming that we have a helloworld.ipk (created by the sdk), and we want to create a clean customized firmware for our AR150 device that includes this ipk, here is an example of a user-defined configuration file. We name it myfirst.json:

{
    "profiles":
    {
        "helloworld":
	{
            "profile": "gl-ar150",
            "version": "3.001",
            "imagebuilder": "3.0/openwrt-imagebuilder-ar71xx-generic",
            "packages": "luci helloworld"
        }
    }
}

Placing the helloworld.ipk in the glinet/ar71xx folder and running ./gl_image -c myfirst.json -p helloworld will build our clean image with our helloworld.ipk included.

imagebuilder's People

Contributors

johnex avatar kysonlok avatar lancersky avatar luochongjun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.