Giter VIP home page Giter VIP logo

openwrt-imagebuilder-wrapper's Introduction

OpenWRT Imagebuilder Wrapper

Tools to build OpenWRT firwmare for the Omega2 and Omega2+ using the OpenWRT Image Builder in an easily repeatable and maintainable way.

System Requirements

We recommend using Ubuntu 22.04 Linux to build this repo. See the OpenWRT Build System Setup instructions for details on what packages are required.

How to Use this Repo

By default, this repo is setup to build OpenWRT firmware for the Onion Omega2 and Omega2+

  1. Run bash onion_buildenv setup_imagebuilder to download and setup the image builder
  2. Run bash onion_buildenv build_all_firmware to build the Omega2 and Omega2+ firmware
  3. Find the compiled firmware in the output directory

Details

The bash onion_buildenv setup_imagebuilder script:

  • Will download and setup the OpenWRT image builder
  • Add the package repo specified as env variable PACKAGE_REPOS in a build profile to the image builder

The bash onion_buildenv build_all_firmware script:

  • Will compile firmware for the Onion Omega2 and Omega2+
  • Output binary files will be in the output directory

Building a Specific Target

By default, the bash onion_buildenv build_all_firmware command will build firmware for the target devices specified in the BUILD_MODELS variable in profiles.

To build for a specific target device, use this command: bash onion_buildenv build_firmware <target>

Adding Packages to the Firmware

OpenWRT packages can be added to the compiled firmware.

In the bash onion_buildenv build_all_firmware script, the env variable IMAGE_BUILDER_PACKAGES controls which packages are included in the firmware. Each package has to be added in na new line or in a space separated list.

The additions/ Directory

Everything from the additions/ directory will be copied into the image builder directory before build.

For example, adding a additions/files directory will allow you to include custom configuration files in the firmware image.


Using this Repo for Development

By default, the firmware will be built including packages from published package repos. Like the the Onion Package Repo or the OpenWRT package repo.

While your packages are still in development, it might be useful to work with local copies of the packages.

To work with local copies of your packages:

  1. Say you've set up the OpenWRT SDK and you're compiling packages to your local machine
  2. Update PACKAGE_REPOS env variable to point to the local packages. See profiles/README.md for details.
  3. Make any changes to your packages and compile them into IPK files
  4. Run bash onion_buildenv setup_imagebuilder to download and setup the image builder
  5. Run bash onion_buildenv build_firmware <target> to build the firmware
  6. Find the compiled firmware in the output directory
  7. Test the firmware on your device. If more changes to your packages are required, start again from step 3

Example

Say we've used the OpenWRT SDK to build packages locally and the output files can be found at the /home/ubuntu/openwrt-sdk-wrapper/openwrt-sdk/bin/packages/mipsel_24kc/custom/ directory. And say we wanted to build firmware that uses those locally compiled packages, we would do the following:

  1. Update PACKAGE_REPOS env variable in a profile file:
    • comment out the existing line
    • add a new line: PACKAGE_REPOS="src custom file:///home/ubuntu/openwrt-sdk-wrapper/openwrt-sdk/bin/packages/mipsel_24kc/custom/"
  2. Make any changes to your packages and compile them into IPK files
  3. Run bash onion_buildenv setup_imagebuilder to download and setup the image builder
  4. Run bash onion_buildenv build_firmware <target> to build the firmware
  5. Find the compiled firmware in the output directory

openwrt-imagebuilder-wrapper's People

Contributors

greenbreakfast avatar jempatel avatar amine605 avatar feamsr00 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.