aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-09-24 16:23:04 +0200
committerficus <ficus@robocracy.org>2012-09-24 16:23:04 +0200
commit86ab91c3f7eb1bf8e7989d3793e37fa52741b892 (patch)
treeb9f1374384285e60991bc3b1e72816d2478f0a0b
parent0f73849e28825353963a92b8a00ec3244935d878 (diff)
downloadtorouter-86ab91c3f7eb1bf8e7989d3793e37fa52741b892.tar.gz
torouter-86ab91c3f7eb1bf8e7989d3793e37fa52741b892.zip
moved most freedom-maker config to central config (excluding firstboot)
-rw-r--r--NOTES5
-rw-r--r--README15
-rwxr-xr-xfreedom-maker/buildrootfs.sh2
-rw-r--r--freedom-maker/multistrap-configs/torouter-base.conf2
-rw-r--r--freedom-maker/source/etc/apt/sources.list2
-rw-r--r--freedom-maker/source/etc/dhcp/dhcpd.conf32
-rw-r--r--freedom-maker/source/etc/dnsmasq.conf24
-rw-r--r--freedom-maker/source/etc/fstab6
-rw-r--r--freedom-maker/source/etc/hosts7
-rw-r--r--freedom-maker/source/etc/mtab0
-rw-r--r--freedom-maker/source/etc/network/interfaces25
-rw-r--r--freedom-maker/source/etc/openvpn/client.conf0
-rw-r--r--freedom-maker/source/etc/openvpn/static.key0
-rw-r--r--freedom-maker/source/etc/resolv.conf2
-rw-r--r--freedom-maker/source/etc/sysctl.conf5
-rw-r--r--freedom-maker/source/etc/udev/rules.d/75-persistent-net-generator.rules0
-rw-r--r--freedom-maker/source/sbin/copy2dream47
-rw-r--r--freedom-maker/source/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-keybin3742 -> 0 bytes
18 files changed, 21 insertions, 153 deletions
diff --git a/NOTES b/NOTES
index fe696f1..8f501c2 100644
--- a/NOTES
+++ b/NOTES
@@ -4,7 +4,10 @@ system config scripts should live here in ./scripts
add torproject keys (prompt?)
setup sources.list
apt-get update
- install dependancies like tor and torouterui
+ install dependancies like: (some should be torouter-prep deps?)
+ tor
+ torouterui
+ crontab
run torouter_preboot.sh
new ssh keys?
torouter_preboot.sh
diff --git a/README b/README
index c830ded..2a034e6 100644
--- a/README
+++ b/README
@@ -123,7 +123,20 @@ functions as a USB serial console adapter).
First, upgrade u-boot to a recent version (see directions in freedom-maker
directory), then set the appropriate bootloader environment variables:
- TODO: XXX:
+ baudrate=115200
+ bootargs=console=ttyS0,115200 root=/dev/sdc2 rootdelay=10
+ bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel}; ${x_bootcmd_initrd}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000 0x6900000;
+ bootdelay=3
+ filesize=2982D0
+ stderr=serial
+ stdin=serial
+ stdout=serial
+ x_bootargs=console=ttyS0,115200
+ x_bootargs_root=root=/dev/sdc2 rootdelay=10
+ x_bootcmd_ethernet=ping 192.168.2.1
+ x_bootcmd_initrd=fatload usb 2:1 0x6900000 uInitrd
+ x_bootcmd_kernel=fatload usb 2:1 0x6400000 uImage
+ x_bootcmd_usb=usb start
FYI, there are at least two variants of the DreamPlug hardware, with slightly
differing chipsets.
diff --git a/freedom-maker/buildrootfs.sh b/freedom-maker/buildrootfs.sh
index b3dc568..9dad31e 100755
--- a/freedom-maker/buildrootfs.sh
+++ b/freedom-maker/buildrootfs.sh
@@ -102,6 +102,8 @@ umount $target/var/cache/apt/
# copy!
echo "Copying the source directory to the torouter rootfs..."
rsync -av $source/ $target
+echo "Copying the torouter config directory to the torouter rootfs..."
+rsync -av ../configs/ $target
# add extra packages to the image
bin/packages
diff --git a/freedom-maker/multistrap-configs/torouter-base.conf b/freedom-maker/multistrap-configs/torouter-base.conf
index 25bcc6a..45945a7 100644
--- a/freedom-maker/multistrap-configs/torouter-base.conf
+++ b/freedom-maker/multistrap-configs/torouter-base.conf
@@ -6,7 +6,7 @@ debootstrap=Debian torproject torouter
aptsources=Debian torproject torouter
[Debian]
-packages=base-files netbase openssh-server zile wget iproute net-tools hostname module-init-tools wget resolvconf udev isc-dhcp-client ifupdown devio initramfs-tools uboot-mkimage parted dosfstools apt iputils-ping haveged python pandoc python-simplejson make isc-dhcp-server dialog locales-all uaputl uapevent dnsmasq iptables vim-nox less screen lsof tcptraceroute traceroute mtr-tiny openntpd dnsmasq unbound python-augeas python-flask python-daemon cron
+packages=base-files netbase openssh-server zile wget iproute net-tools hostname module-init-tools wget resolvconf udev isc-dhcp-client ifupdown devio initramfs-tools uboot-mkimage parted dosfstools apt iputils-ping haveged python pandoc python-simplejson make isc-dhcp-server dialog locales-all uaputl uapevent dnsmasq iptables vim-nox less screen lsof tcptraceroute traceroute mtr-tiny openntpd dnsmasq unbound python-augeas python-flask python-daemon cron iw
source=http://http.debian.net/debian/
keyring=debian-archive-keyring
suite=wheezy
diff --git a/freedom-maker/source/etc/apt/sources.list b/freedom-maker/source/etc/apt/sources.list
deleted file mode 100644
index c06710c..0000000
--- a/freedom-maker/source/etc/apt/sources.list
+++ /dev/null
@@ -1,2 +0,0 @@
-deb http://http.debian.net/debian wheezy main
-deb-src http://http.debian.net/debian wheezy main
diff --git a/freedom-maker/source/etc/dhcp/dhcpd.conf b/freedom-maker/source/etc/dhcp/dhcpd.conf
deleted file mode 100644
index ec502c6..0000000
--- a/freedom-maker/source/etc/dhcp/dhcpd.conf
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# FreedomBox ISC dhcpd configuration
-#
-#
-
-# The ddns-updates-style parameter controls whether or not the server will
-# attempt to do a DNS update when a lease is confirmed. We default to the
-# behavior of the version 2 packages ('none', since DHCP v2 didn't
-# have support for DDNS.)
-ddns-update-style none;
-
-# option definitions common to all supported networks...
-option domain-name "free.dom";
-option domain-name-servers ns1.free.dom, ns2.free.dom;
-
-default-lease-time 600;
-max-lease-time 7200;
-
-# If this DHCP server is the official DHCP server for the local
-# network, the authoritative directive should be uncommented.
-authoritative;
-
-# Use this to send dhcp log messages to a different log file (you also
-# have to hack syslog.conf to complete the redirection).
-log-facility local7;
-
-# basic subnet configuration for the 'downstream' wired network
-
-subnet 192.168.1.0 netmask 255.255.255.0 {
- range 192.168.1.10 192.168.1.100;
- option routers 192.168.1.1;
-}
diff --git a/freedom-maker/source/etc/dnsmasq.conf b/freedom-maker/source/etc/dnsmasq.conf
deleted file mode 100644
index 71403d7..0000000
--- a/freedom-maker/source/etc/dnsmasq.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-log-facility=DAEMON
-
-local=/fbx/
-local=/freedombox/
-
-# Upstream DNS server
-# FIXME this should be updated on boot.
-server=192.168.0.1@eth1
-
-# We will serve this DNS domain
-# (DHCP hosts will receive a .lan suffix in DNS)
-domain=lan
-
-# We're the authoritative dhcpd
-# Read the manpage for a good explanation of what this does
-dhcp-authoritative
-
-# We are going to serve hosts for:
-# - LAN (192.168.1.0/24) (Only static hosts)
-# - WLAN (192.168.2.0/24)
-# New clients will receive an IP from the WLAN range.
-
-dhcp-range=interface:eth0,set:lan,192.168.1.10,192.168.1.100,255.255.255.0,2h
-# dhcp-range=interface:uap0,set:lan,192.168.2.10,192.168.2.100,255.255.255.0,2h
diff --git a/freedom-maker/source/etc/fstab b/freedom-maker/source/etc/fstab
deleted file mode 100644
index 7c48827..0000000
--- a/freedom-maker/source/etc/fstab
+++ /dev/null
@@ -1,6 +0,0 @@
-/dev/sdc2 / auto relatime,rw 0 0
-proc /proc proc none 0 0
-sys /sys sysfs none 0 0
-none /dev/pts devpts defaults 0 0
-tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
-/dev/sdc1 /boot vfat defaults 0 0
diff --git a/freedom-maker/source/etc/hosts b/freedom-maker/source/etc/hosts
deleted file mode 100644
index e252996..0000000
--- a/freedom-maker/source/etc/hosts
+++ /dev/null
@@ -1,7 +0,0 @@
-127.0.0.1 localhost freedombox fbx
-::1 localhost ip6-localhost ip6-loopback
-fe00::0 ip6-localnet
-ff00::0 ip6-mcastprefix
-ff02::1 ip6-allnodes
-ff02::2 ip6-allrouters
-
diff --git a/freedom-maker/source/etc/mtab b/freedom-maker/source/etc/mtab
deleted file mode 100644
index e69de29..0000000
--- a/freedom-maker/source/etc/mtab
+++ /dev/null
diff --git a/freedom-maker/source/etc/network/interfaces b/freedom-maker/source/etc/network/interfaces
deleted file mode 100644
index 9680bed..0000000
--- a/freedom-maker/source/etc/network/interfaces
+++ /dev/null
@@ -1,25 +0,0 @@
-# This file describes the network interfaces available on your system
-# and how to activate them. For more information, see interfaces(5).
-
-# The loopback network interface
-auto lo
-iface lo inet loopback
-
-# The primary network interface
-auto eth0
-iface eth0 inet static
- address 192.168.1.1
- netmask 255.255.255.0
-
-allow-hotplug eth1
-iface eth1 inet dhcp
-
-# auto uap0
-# iface uap0 inet static
-# address 192.168.2.1
-# netmask 255.255.255.0
-# post-up uaputl sys_cfg_ssid "freedombox"
-# post-up uaputl sys_cfg_protocol 32 # WPA2
-# post-up uaputl sys_cfg_wpa_passphrase "freedombox123"
-# post-up uaputl sys_cfg_cipher 8 8 # AES CCMP
-# post-up uaputl bss_start
diff --git a/freedom-maker/source/etc/openvpn/client.conf b/freedom-maker/source/etc/openvpn/client.conf
deleted file mode 100644
index e69de29..0000000
--- a/freedom-maker/source/etc/openvpn/client.conf
+++ /dev/null
diff --git a/freedom-maker/source/etc/openvpn/static.key b/freedom-maker/source/etc/openvpn/static.key
deleted file mode 100644
index e69de29..0000000
--- a/freedom-maker/source/etc/openvpn/static.key
+++ /dev/null
diff --git a/freedom-maker/source/etc/resolv.conf b/freedom-maker/source/etc/resolv.conf
deleted file mode 100644
index af9304d..0000000
--- a/freedom-maker/source/etc/resolv.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-nameserver 208.67.222.222
-nameserver 208.67.220.220
diff --git a/freedom-maker/source/etc/sysctl.conf b/freedom-maker/source/etc/sysctl.conf
deleted file mode 100644
index 916e972..0000000
--- a/freedom-maker/source/etc/sysctl.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# Reduce writes to flash drives
-vm.laptop_mode=5
-vm.swappiness=0
-vm.dirty_writeback_centisecs=1500
-vm.dirty_expire_centisecs=1500
diff --git a/freedom-maker/source/etc/udev/rules.d/75-persistent-net-generator.rules b/freedom-maker/source/etc/udev/rules.d/75-persistent-net-generator.rules
deleted file mode 100644
index e69de29..0000000
--- a/freedom-maker/source/etc/udev/rules.d/75-persistent-net-generator.rules
+++ /dev/null
diff --git a/freedom-maker/source/sbin/copy2dream b/freedom-maker/source/sbin/copy2dream
deleted file mode 100644
index 267c2b6..0000000
--- a/freedom-maker/source/sbin/copy2dream
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-#
-# this script assumes the current root filesystem is the source, and the
-# internal microSD on a DreamPlug is the target .. all existing content on
-# the microSD card will be lost.
-#
-
-# partition microSD card inside DreamPlug
-echo "=> partition internal microSD card"
-parted -s /dev/sda mklabel msdos
-parted -s /dev/sda mkpart primary fat16 0 128
-parted -s /dev/sda mkpart primary ext2 128 100%
-
-# create filesystems on new partitions
-echo "=> create filesystems on internal microSD card"
-mkdosfs /dev/sda1
-mke2fs -j /dev/sda2
-
-echo "=> mount target partitions"
-mount /dev/sda2 /media
-mkdir -p /media/boot
-mount /dev/sda1 /media/boot
-
-echo "=> copy filesystem content from USB stick to target partitions"
-(cd / ; tar cpSf - `/bin/ls | grep -v boot | grep -v proc | grep -v sys | grep -v media | grep -v dev`) | (cd /media ; tar xpf -)
-# the following intentionally ignores subdirectories
-cp /boot/* /media/boot/
-
-echo "=> touch up target root partition"
-mkdir /media/proc /media/sys /media/media /media/dev
-mknod /media/dev/console c 5 1
-mknod /media/dev/random c 1 8
-mknod /media/dev/urandom c 1 9
-mknod /media/dev/null c 1 3
-mknod /media/dev/ptmx c 5 2
-
-# patch up /etc/fstab entry for /boot
-sed -e 's/sdc/sda/g' < /etc/fstab > /media/etc/fstab
-
-# flash the kernel and create the device's keys
-chroot /media /etc/init.d/first-run
-
-echo "unmount target partitions"
-umount /dev/sda1
-umount /dev/sda2
-
-echo "=> installation complete, see docs to boot from internal microSD"
diff --git a/freedom-maker/source/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key b/freedom-maker/source/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key
deleted file mode 100644
index 5b6a4d3..0000000
--- a/freedom-maker/source/tmp/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.apt-key
+++ /dev/null
Binary files differ