-
Notifications
You must be signed in to change notification settings - Fork 0
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
10 changed files
with
144 additions
and
15 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
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,43 @@ | ||
candy-pi-lite-os-image | ||
=== | ||
|
||
Raspbian OS image builder for [CANDY Pi Lite Board](https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=https%3A%2F%2Fwww.candy-line.io%2F製品一覧%2Fcandy-pi-lite%2F&edit-text=&act=url) | ||
|
||
# Supported Raspberry Pi | ||
|
||
ARMv7+ boards are available for this image. | ||
|
||
- [Raspberry Pi2 Model B](https://www.raspberrypi.org/products/raspberry-pi-2-model-b/) | ||
- [Raspberry Pi3 Model B](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/) | ||
|
||
# Raspbian OS Version | ||
|
||
- Raspbian Stretch Version 2017-09-07 (Kernel v4.9) with some library updates at the time of the image creation | ||
|
||
# Features | ||
|
||
- [Raspbian OS Lite (RASPBIAN STRETCH LITE)](https://www.raspberrypi.org/downloads/raspbian/) based image with software updates | ||
- [CANDY Pi Lite Board Service](https://github.com/CANDY-LINE/candy-pi-lite-service) is installed | ||
- [CANDY RED](https://github.com/CANDY-LINE/candy-red), a Node-RED based software dedicated to [CANDY Pi Lite Board](https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=https%3A%2F%2Fwww.candy-line.io%2F製品一覧%2Fcandy-pi-lite%2F&edit-text=&act=url) and [CANDY EGG Cloud Service](https://translate.google.com/translate?hl=en&sl=ja&tl=en&u=https%3A%2F%2Fwww.candy-line.io%2F製品一覧%2Fcandy-red-egg%2F), is installed | ||
- ufw is enabled (denying from all traffic on `ppp0` and `wwan0`) | ||
- Hardware watchdog is enabled | ||
- Node.js v6 is installed (in Maintenance LTS) | ||
- `ssh` is **DISABLED** by default. Place am empty file to `/boot/ssh` to enable ssh | ||
- Extra Packages | ||
- `git` | ||
- `screen` | ||
- `fswebcam` | ||
|
||
## Distributions | ||
|
||
- `*-en_US` suffix image contains US Keyboard Layout with UTC timezone and en_US.UTF-8 locale | ||
- `*-ja_JP` suffix image contains Japanese Keyboard Layout with JST timezone and ja_JP.UTF-8 locale | ||
|
||
# How to flash the image | ||
|
||
Use [Etcher](https://etcher.io) for burning the image, which is a cross-platform app. | ||
|
||
# Revision History | ||
|
||
* 1.0.0 | ||
- Initial Release |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
git | ||
screen | ||
fswebcam |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# on_chroot | ||
|
||
rm -f /etc/localtime | ||
ln -s /usr/share/zoneinfo/Japan /etc/localtime | ||
ln -s /usr/share/zoneinfo/UTC /etc/localtime | ||
|
||
locale-gen |
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
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
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
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
DEPS_DIR=$(pwd)/deps | ||
PIGEN_DIR=${DEPS_DIR}/pi-gen | ||
|
||
function clean_setup { | ||
git submodule update --init --recursive | ||
pushd ${PIGEN_DIR} | ||
git reset --hard HEAD | ||
git clean -f -d | ||
popd | ||
} | ||
|
||
clean_setup |
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,65 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -z "${TAG_NAME}" ]; then | ||
echo "TAG_NAME is required" | ||
exit 1 | ||
fi | ||
|
||
function fetch_upload_url { | ||
cp -f ../../scripts/release-template.json release.json | ||
if [ "$?" != "0" ]; then | ||
echo "release-template.json is missing on $(pwd)/../../scripts/" | ||
exit 1 | ||
fi | ||
for e in TAG_NAME \ | ||
RELEASE_NAME \ | ||
RELEASE_DESCRIPTION; do | ||
sed -i -e "s/%${e}%/${!e//\//\\/}/g" release.json | ||
done | ||
rm -f release.json-e | ||
RESP=$(curl -sSL \ | ||
-H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \ | ||
-d @release.json \ | ||
"https://api.github.com/repos/${REPO}/releases") | ||
UPLOAD_URL=`echo ${RESP} | jq -r '.upload_url'` | ||
UPLOAD_URL="${UPLOAD_URL%\{*}" | ||
} | ||
|
||
function upload_info_files { | ||
for INFO in `ls ./deploy/*.info`; do | ||
echo "Uploading [${INFO}]..." | ||
FILENAME=`basename ${INFO}` | ||
curl -v -s \ | ||
-H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \ | ||
-H "Content-Type: text/plain" \ | ||
--data-binary @${INFO} \ | ||
"${UPLOAD_URL}?name=${FILENAME}" | ||
done | ||
echo "INFO Upload done" | ||
} | ||
|
||
function upload_zip_files { | ||
for ZIP in `ls ./deploy/*.zip`; do | ||
echo "Uploading [${ZIP}]..." | ||
FILENAME=`basename ${ZIP}` | ||
curl -v -s \ | ||
-H "Authorization: token ${GITHUB_OAUTH_TOKEN}" \ | ||
-H "Content-Type: application/zip" \ | ||
--data-binary @${ZIP} \ | ||
"${UPLOAD_URL}?name=${FILENAME}" | ||
done | ||
echo "ZIP Upload done" | ||
} | ||
|
||
# main | ||
cd ./deps/pi-gen | ||
RASPBIAN_TAG=`git describe --tags HEAD` | ||
TYPICAL_IMAGE_INFO=`ls ./deploy/*en_US.info` | ||
BUILT_ON=${TYPICAL_IMAGE_INFO:9:10} | ||
REPO=CANDY-LINE/candy-pi-lite-os-image | ||
RELEASE_NAME="v${TAG_NAME}" | ||
RELEASE_DESCRIPTION="${RELEASE_DESCRIPTION:-[${RASPBIAN_TAG}](https://github.com/RPi-Distro/pi-gen/releases/tag/${RASPBIAN_TAG}) dedicated to [CANDY Pi Lite](https://github.com/CANDY-LINE/candy-pi-lite-service) board built on ${BUILT_ON}}" | ||
|
||
fetch_upload_url | ||
upload_info_files | ||
upload_zip_files |
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,7 @@ | ||
{ | ||
"tag_name": "%TAG_NAME%", | ||
"name": "%RELEASE_NAME%", | ||
"body": "%RELEASE_DESCRIPTION%\n\n- `en_US` image contains US Keyboard Layout setting with UTC timezone and en_US.UTF-8 locale.\n- `ja_JP` イメージファイルには、日本語106キーボート、日本時間のタイムゾーン、それに日本語UTF-8の設定が含まれます。[SDへの焼き込みについてはこちらをご覧ください。](http://candy-line.tumblr.com/)", | ||
"draft": false, | ||
"prerelease": false | ||
} |