From f2f7128cd61a13538a683b6f3c6652f59f8195f7 Mon Sep 17 00:00:00 2001 From: Charles Cross Date: Thu, 5 May 2016 15:19:28 -0700 Subject: [PATCH] Updated readme --- README.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 54d98fb..d9da3e3 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,29 @@ #TODO -1. Image export -1. NOOBS export -1. Simplify running a single stage -1. Documentation +- NOOBS export +- Simplify running a single stage +- Documentation #Dependencies - `quilt kpartx realpath qemu-user-static debootstrap zerofree` -# Example usage to build a bootable raspbian lite image: -sudo ./build.sh -sudo ./create-image.sh --path=./work/2016-05-02-raspbian/stage3 --name="raspbian-lite" \ No newline at end of file +# Example build script: + +```bash +#!/bin/bash -e + +# Set build variables +USERNAME=pi +PASSWORD=raspberry +HOSTNAME=raspberrypi +IMAGENAME="raspbian-lite-$(date +%Y-%m-%d)" +STAGE=2 + +# Build rootfs +sudo ./build.sh --username=${USERNAME} --password=${PASSWORD} --hostname=${HOSTNAME} --imagename=${IMAGENAME} + +# Create .img +sudo ./create-image.sh --imagename=${IMAGENAME} --stage=${STAGE} + +# Resulting image will be at images/${IMAGENAME} +``` \ No newline at end of file