forked from petterreinholdtsen/meshfx-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-rpi-mesh-node-customize
More file actions
executable file
·53 lines (39 loc) · 1.6 KB
/
build-rpi-mesh-node-customize
File metadata and controls
executable file
·53 lines (39 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
# Exit on first error
set -e
LC_ALL=C
export LC_ALL
rootdir="$1"
cd "$rootdir"
cat <<EOF > etc/apt/sources.list
deb http://http.debian.net/debian/ jessie main contrib non-free
EOF
cat <<EOF > etc/apt/sources.list.d/reinholdtsen-freedombox.list
deb http://www.reinholdtsen.name/freedombox/ wheezy main
EOF
wget http://www.reinholdtsen.name/freedombox/BE1A583D.asc -O - | \
chroot $rootdir apt-key add -
# Fetch package lists and GPG signatures
chroot $rootdir apt-get update
# Install meshfx-node from external repository
chroot $rootdir apt-get install -y freedombox-reinholdtsen-archive-keyring
# Install the tools needed to become a mesh node.
chroot $rootdir apt-get -y install meshfx-node
# Include non-free binary blob for various wifi card to get them
# working out of the box. Not installed by debootstrap as debootstrap
# only handle packages in main.
chroot $rootdir apt-get install -y atmel-firmware firmware-atheros \
firmware-brcm80211 firmware-intelwimax firmware-iwlwifi \
firmware-libertas firmware-linux firmware-ralink firmware-realtek \
prism2-usb-firmware-installer zd1211-firmware
# Not installing firmware-ipw2x00 because it want license confirmation
# and it is perhaps not ice to give that on behalf of others.
chroot $rootdir apt-get clean
set -x
# Install non-free binary blob needed to boot Raspberry Pi. This
# install a kernel somewhere too.
wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update \
-O $rootdir/usr/bin/rpi-update
chmod a+x $rootdir/usr/bin/rpi-update
mkdir -p $rootdir/lib/modules
chroot $rootdir rpi-update > $rootdir/root/rpi-update.log