diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-02-09 14:21:10 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-02-09 14:21:10 +0300 |
commit | 9ed6228e5174c2d752d4a2c1ab2050cd681b0ea0 (patch) | |
tree | a21351e2edd7778a2f52da7b3880b180045f05b4 | |
parent | 07b38cb240768873722824fcd3f343b06f90e06a (diff) |
build: separate file to automate packing of odroid HC1
-rwxr-xr-x | batch.sh | 16 | ||||
-rw-r--r-- | build-SD-odroid.sh | 38 |
2 files changed, 40 insertions, 14 deletions
@@ -12,7 +12,6 @@ source buildlib.sh # initializes $IMGNAME IP=$1 # First argument is the QEMU Raspbian IP address - ## BUILDING # Raspbian @@ -32,19 +31,8 @@ make nextcloudpi-x86 && { ./installer.sh docker-armhf/docker-env.sh "$IP" raspbian_lite.img # && mv ./installer.sh docker-armhf/build-container.sh "$IP" docker-armhf/raspbian_docker.img -# Armbian -git clone https://github.com/armbian/build armbian -wget https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/armbian.sh \ - -O armbian/userpatches/customize-image.sh -armbian/compile.sh docker \ - BOARD=odroidxu4\ - BRANCH=next\ - KERNEL_ONLY=no\ - KERNEL_CONFIGURE=no\ - RELEASE=stretch\ - BUILD_DESKTOP=no\ - CLEAN_LEVEL=""\ - NO_APT_CACHER=no +# armbian +./build-SD-odroid.sh # License # diff --git a/build-SD-odroid.sh b/build-SD-odroid.sh new file mode 100644 index 00000000..8703957e --- /dev/null +++ b/build-SD-odroid.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Batch creation of NextCloudPi image for the Odroid HC1 +# +# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com> +# GPL licensed (see end of file) * Use at your own risk! +# +# Usage: ./build-SD-odroid.sh <DHCP QEMU image IP> +# + +# get armbian +[[ -d armbian ]] || git clone https://github.com/armbian/build armbian || exit 1 + +# get NCP modifications +wget https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/armbian.sh \ + -O armbian/userpatches/customize-image.sh || exit 1 + +# generate image +armbian/compile.sh docker \ + BOARD=odroidxu4\ + BRANCH=next\ + KERNEL_ONLY=no\ + KERNEL_CONFIGURE=no\ + RELEASE=stretch\ + BUILD_DESKTOP=no\ + CLEAN_LEVEL=""\ + NO_APT_CACHER=no || exit 1 + +# pack image +IMGNAME="NextCloudPi_$( date "+%m-%d-%y" )_OdroidHC1" +IMGFILE="$( ls -1t armbian/output/images/*.img | head -1 )" +pack_image "$IMGFILE" "$IMGNAME.img" + +# testing +# TODO + +# uploading +# TODO |