-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Raspberry Pi Image Builder | ||
|
||
**PublicLab.Org** | ||
|
||
![](publiclab.svg) | ||
|
||
This documentation covers the usage of the builder script for operating system images designed to be included with Public Lab Camera Kits. | ||
|
||
Any person may use this script and the related infrastructure for building customized operating systems for their own projects. | ||
|
||
It is important to highlight that this project was forked from the [Hypriot project](https://github.com/hypriot/image-builder-rpi). Thanks! | ||
|
||
## Rationale | ||
|
||
Often DIY projects require customizing software. It is an effort to publish these customizations. | ||
|
||
This repository could serve to share customizations and develop them *socially*, by means of issuing pull requests and sharing build recipes and resulting images. | ||
|
||
This guide serves the purpose of detailing the build process and suggesting a customization workflow. | ||
|
||
## Developing | ||
|
||
Issuing a PR will build the image. We will merge PRs aligned and suitable to be included in Public Lab's Camera Kits, at the discretion of the maitainers. You are encouraged to fork your own repository and experiment with preparing your own images! | ||
|
||
- Repository (GitLab): https://gitlab.com/publiclab/image-builder-rpi | ||
|
||
By using Gitlab's automated continuous integration to build images you'll have fresh images built for you every time you push your changes. | ||
|
||
For the community's convenience, this repository is also mirrored at Github | ||
|
||
- Repository (GitHub): https://github.com/publiclab/image-builder-rpi | ||
|
||
## License | ||
|
||
Like its upstream project Hypriot, `image-builder-rpi` is licensed with the MIT license. | ||
|
||
This guide is licensed with Creative Commons Share-Alike 4.0 Unported license. | ||
|
||
## Contributors | ||
|
||
This project was initiated by Sebastian Silva by contract of PublicLab.Org, the **Public Laboratory for Open Technology and Science**. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Summary | ||
|
||
* [Image Builder](README.md) | ||
* [Customization](customization.md) | ||
* [Workflow](workflow.md) | ||
* [Roadmap](roadmap.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"title": "Raspberry Pi Image Builder" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Image Customization | ||
|
||
This repository holds the recipe and files for building an operating system image capable of booting on Raspberry Pi (tested on model `Pi Zero W`). | ||
|
||
While you may build locally if you have Docker (tested on Linux), it is recommended that you follow the [workflow](workflow.md). | ||
|
||
## Files and Directories | ||
|
||
`builder/files/`: All files in this directory will be copied over to the Raspberry Pi image's root directory. | ||
|
||
`builder/build.sh`: This is the script that does the actual building. | ||
|
||
`builder/chroot-script.sh`: This is the script that is run inside an ARM based virtual machine that emulates the raspberry pi. It installs packages and also generates some configuration files. | ||
|
||
`builder/files/boot/user-data`: This is the configuration file for cloud-init. It holds important customizations such as username creation and hostname configuration. | ||
|
||
## Cloud Init Configuration File (`user-data`) | ||
|
||
This is one recommended configuration point as it can be modified *before first boot*. | ||
|
||
This is the main configuration file for `cloud-init` which is designed to customize cloud servers and provides many useful configuration hooks. Please refer to the [`cloud-init` documentation](https://cloudinit.readthedocs.io/en/0.7.9/) for details. | ||
|
||
## Customization Orientation | ||
|
||
If you'd like to start scripts every boot, try to customize `builder/files/etc/rc.local` adding commands which will be ran after the rest of the startup process. | ||
|
||
Also the web root is at `/var/www/`. You may place web content or applications here. PHP has been enabled by default. | ||
|
||
Once you have modified the scripts or files to be included in the distribution, follow the [workflow](workflow.md) into the next step. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"gitbook-cli": "^2.3.2", | ||
"svgexport": "^0.3.2" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Development goals | ||
|
||
This is a wishlist of features to include: | ||
|
||
* Configure Wifi (client / access point / forwarding) | ||
* Streaming Camera | ||
* Web editor / runner for scripts | ||
* Configure scripts to run at boot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Development Workflow for Custom Images | ||
|
||
We recommend that you follow these steps to build your images. | ||
|
||
## Make a Pull Request | ||
|
||
Create a named branch with a descriptive name (it will be used in the image filename), and **make a pull request** describing your intentions! | ||
|
||
**Intention to merge to master is not required**. You may issue a PR simply for sharing an experiment and for triggering a build to test an image. | ||
|
||
## Download the build artifact from GitLab CI | ||
|
||
Once you've made a PR, you should see a build triggered that is linked in your PR. | ||
|
||
It can take more than 20 minutes to build an image. | ||
|
||
You may follow the link on your PR to view the build log and find the links to download the build artifacts, which hold the image for flashing. | ||
|
||
These images are referred to as build artifacts and are available for download directly from the [**build jobs page at Gitlab**](https://gitlab.com/publiclab/image-builder-rpi/-/jobs). | ||
|
||
## Flash your image | ||
|
||
Using your preferred method (or the [Hypriot flash tool](https://github.com/hypriot/flash) which offers some flash-time customization hooks. | ||
|
||
## Share your results! | ||
|
||
Do comment on your PR! |