Giter VIP home page Giter VIP logo

rpi-image-builder's Introduction

Build files needed to create a Raspberry Pi SD card image

Raspberry Pi SD card image build for the Web of Things gateway.

Use the trigger-build.py script to initiate a build. Modifying any of the files in this repository and pushing them will also trigger a build using the defaults specified in config.sh.

trigger-build.py

The trigger-build.py will trigger a GitHub workflow to start building an image. You can check the progress by watching https://github.com/mozilla-iot/rpi-image-builder/actions

The trigger-build.py script takes the following arguments:

--token TOKEN

The --token option specifies the GitHub API token, which can be generated here: https://github.com/settings/tokens

--repo REPO

The --repo option specifies the git repository that the gateway should be cloned from. If this option is not specified, then the GATEWAY_REPO found in config.sh will be used (https://github.com/mozilla-iot/gateway)

--branch BRANCH

The --branch specifies the branch name or tag name used to checkou the gateway code from the git repository. This option is required.

--prefix BASE

The --prefix specifies the prefix to prepend to the gateway.tar.gz file which is generated.

Overall process to create an SD card image

Build a base image

Follow these steps on the wiki to create a base image.

Install rpi-image-builder dependencies

  • Download/clone rpi-image-builder
git clone https://github.com/mozilla-iot/rpi-image-builder.git
  • Install the Python requests library
pip3 install requests

Build the gateway

Use the trigger-build.py script (documented above) to build the gateway.tar.gz file, e.g. from the rpi-image-builder directory:

./trigger-build.py --token <token> --branch master --prefix 0.10.0-pre1

This will put these files (with the assigned prefix) onto AWS in a directory called tarfiles. You can use the following command to see the generated files:

aws s3 ls s3://mozillagatewayimages/tarfiles/

Download the tarfiles

You can either use aws commands:

aws s3 cp s3://mozillagatewayimages/tarfiles/PREFIX-gateway.tar.gz .

or you can use URLs like these:

https://s3-us-west-1.amazonaws.com/mozillagatewayimages/tarfiles/PREFIX-gateway.tar.gz

Add the tarfiles to the base image

Run the add-gateway.sh script found in the image directory of the gateway repository

./add-gateway.sh -g PREFIX-gateway.tar.gz gateway-VERSION-base.img

The output image file will have the same name as the base image with -base removed.

Copy the image to AWS

Use the image-to-aws.sh script found in the image directory of the gateway repository

./image-to-aws.sh gateway-VERSION.img

You can then access the image using a URL like this:

https://s3-us-west-1.amazonaws.com/mozillagatewayimages/images/gateway-VERSION.img.zip
https://s3-us-west-1.amazonaws.com/mozillagatewayimages/images/gateway-VERSION.img.zip.sha256sum

rpi-image-builder's People

Contributors

benfrancis avatar dhylands avatar hobinjk avatar mozilla-github-standards avatar mrstegeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rpi-image-builder's Issues

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please reach out to [email protected].

(Message COC001)

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.