Skip to content

Commit

Permalink
Synced with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
jredrejo committed Dec 11, 2019
2 parents 2e5fa9c + 32353a1 commit f88e27e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

After following the above steps the Raspberry Pi will provide a wifi network named under the essid `kolibri` without any password.

After connecting a device to this wifi network provided by the Raspberry, you can open the url http://10.10.10.10 in a browser will allow you enjoy all the features of a working Kolibri server.
After connecting a device to this wifi network provided by the Raspberry, you can open the url http://10.10.10.10 in a browser will allow you enjoy all the features of a working Kolibri server.

By default the server does not have Internet access, so an usb disk must be used to add content channels to Kolibri.

Expand All @@ -40,6 +40,6 @@ Using the `raspi-config` script we'll

- Add options to make the wifi encrypted



## Rebuilding the Kolibri Raspberry Pi image

## Rebuilding the Kolibri Raspberry Pi image
7 changes: 3 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi

BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export BASE_DIR

if [ -f config ]; then
# shellcheck disable=SC1091
Expand Down Expand Up @@ -154,7 +156,6 @@ export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}"
export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"

BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SCRIPT_DIR="${BASE_DIR}/scripts"
export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}"
export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"}
Expand All @@ -179,8 +180,6 @@ export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Europe/London}"

export GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"}

export BASE_DIR

export CLEAN
export IMG_NAME
export APT_PROXY
Expand Down Expand Up @@ -248,7 +247,7 @@ for EXPORT_DIR in ${EXPORT_DIRS}; do
fi
done

if [ -x postrun.sh ]; then
if [ -x ${BASE_DIR}/postrun.sh ]; then
log "Begin postrun.sh"
cd "${BASE_DIR}"
./postrun.sh
Expand Down
17 changes: 8 additions & 9 deletions pi-gen.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ The following environment variables are supported:

* `WPA_ESSID`, `WPA_PASSWORD` and `WPA_COUNTRY` (Default: unset)

If these are set, they are use to configure `wpa_supplicant.conf`, so that the raspberry pi can automatically connect to a wifi network on first boot.
If these are set, they are use to configure `wpa_supplicant.conf`, so that the raspberry pi can automatically connect to a wifi network on first boot. If `WPA_ESSID` is set and `WPA_PASSWORD` is unset an unprotected wifi network will be configured.

* `ENABLE_SSH` (Default: `0`)

Expand Down Expand Up @@ -277,22 +277,21 @@ maintenance and allows for more easy customization.
enhancements, etc. This is a base desktop system, with some development
tools installed.

- **Stage 4** - Raspbian system meant to fit on a 4GB card. More development
tools, an email client, learning tools like Scratch, specialized packages
like sonic-pi, system documentation, office productivity, etc. This is the
stage that installs all of the things that make Raspbian friendly to new
users.
- **Stage 4** - Normal Raspbian image. System meant to fit on a 4GB card. This is the
stage that installs most things that make Raspbian friendly to new
users like system documentation.

- **Stage 5** - The official Raspbian Desktop image. Right now only adds
Mathematica.
- **Stage 5** - The Raspbian Full image. More development
tools, an email client, learning tools like Scratch, specialized packages
like sonic-pi, office productivity, etc.

### Stage specification

If you wish to build up to a specified stage (such as building up to stage 2
for a lite system), place an empty file named `SKIP` in each of the `./stage`
directories you wish not to include.

Then add an empty file named `SKIP_IMAGES` to `./stage4` (if building up to stage 2) or
Then add an empty file named `SKIP_IMAGES` to `./stage4` and `./stage5` (if building up to stage 2) or
to `./stage2` (if building a minimal system).

```bash
Expand Down
8 changes: 8 additions & 0 deletions stage2/02-net-tweaks/01-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ if [ -v WPA_ESSID ] && [ -v WPA_PASSWORD ]; then
on_chroot <<EOF
wpa_passphrase "${WPA_ESSID}" "${WPA_PASSWORD}" >> "/etc/wpa_supplicant/wpa_supplicant.conf"
EOF
elif [ -v WPA_ESSID ]; then
cat >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf" << EOL
network={
ssid="${WPA_ESSID}"
key_mgmt=NONE
}
EOL
fi

# Disable wifi on 5GHz models
Expand Down

0 comments on commit f88e27e

Please sign in to comment.