diff options
author | ficus <ficus@robocracy.org> | 2012-09-23 04:22:14 +0200 |
---|---|---|
committer | ficus <ficus@robocracy.org> | 2012-09-23 04:22:14 +0200 |
commit | b1aec80110e822d835f6c97a2320b7dfc5fba039 (patch) | |
tree | 3f88cf6ec6a8e2836c91705baf2bfc31ab51d0dd /freedom-maker | |
parent | e2973e8ea5c57bfa6ed41293e0250c68d29cfed9 (diff) | |
download | torouter-b1aec80110e822d835f6c97a2320b7dfc5fba039.tar.gz torouter-b1aec80110e822d835f6c97a2320b7dfc5fba039.zip |
possibly functional image builder
Diffstat (limited to 'freedom-maker')
-rw-r--r-- | freedom-maker/TODO | 25 | ||||
-rwxr-xr-x | freedom-maker/bin/finalize | 6 | ||||
-rw-r--r-- | freedom-maker/bin/install.sh (renamed from freedom-maker/source/install.sh) | 10 | ||||
-rwxr-xr-x | freedom-maker/bin/projects | 33 | ||||
-rwxr-xr-x | freedom-maker/bin/projects-chroot | 1 | ||||
-rwxr-xr-x | freedom-maker/buildrootfs.sh | 8 |
6 files changed, 13 insertions, 70 deletions
diff --git a/freedom-maker/TODO b/freedom-maker/TODO deleted file mode 100644 index 184aca5..0000000 --- a/freedom-maker/TODO +++ /dev/null @@ -1,25 +0,0 @@ -- [ ] initial boot configuration improvements, as there are a few - things we really do want to defer to first boot, or at least make it - trivial to fix up per-system - - - [X] ssh host keys - - [ ] root password -- [ ] add Sheeva as a build target -- [X] add x86 virtualized as a build target (use vmdebootstrap?) -- [ ] investigate and integrate software components that looks interesting - - channel-server, the buddycloud channels service for XMPP - - babeld, loop-free distance-vector routing protocol - - tahoe-lafs, secure distributed filesystem -- [ ] virtualbox should build with dreamplug configuration - -*** stuff to do for first feature release *** - - - [ ] pre-configured user interface - - [X] DHCP and HTTP servers on eth0 and/or eth1 - - [ ] plinth-based initial config interface - - - [ ] freedom buddy installed - - [ ] openvpn server setup - - [ ] the privoxy fork configured as a transparent proxy - - [ ] plinth configured to at display these config details and to - control whatever is feasible diff --git a/freedom-maker/bin/finalize b/freedom-maker/bin/finalize index a6cb7da..a530380 100755 --- a/freedom-maker/bin/finalize +++ b/freedom-maker/bin/finalize @@ -49,6 +49,10 @@ echo $hostname > $target/etc/hostname chown root:root $target/sbin/copy2dream chmod 744 $target/sbin/copy2dream +# copy over install script +cp bin/install.sh $target/ +chmod 744 $target/install.sh + # prepare chroot package finalization cp bin/packages-chroot $target/ @@ -57,8 +61,6 @@ chmod 755 $target/install.sh cp /usr/bin/qemu-arm-static $target/usr/bin echo "Running install script from source/install.sh" chroot $target /install.sh -echo "Running install script from bin/projects-chroot" -chroot $target /packages-chroot # clean up. rm "${target}/packages-chroot" diff --git a/freedom-maker/source/install.sh b/freedom-maker/bin/install.sh index fc13d2b..01b063b 100644 --- a/freedom-maker/source/install.sh +++ b/freedom-maker/bin/install.sh @@ -25,6 +25,13 @@ cut -f 1 < /tmp/selections | cut -d ':' -f 1 > /tmp/packages # sshd may be left running by the postinst, clean that up /etc/init.d/ssh stop +echo "Running install script from bin/projects-chroot" +/packages-chroot + +# torouter setup +echo "Running torouter_preboot.sh..." +/usr/bin/torouter_preboot.sh + # process installed kernel to create uImage, uInitrd, dtb # using flash-kernel would be a good approach, except it fails in the cross # build environment due to too many environment checks... @@ -36,6 +43,7 @@ cut -f 1 < /tmp/selections | cut -d ':' -f 1 > /tmp/packages # emulated chroot environment, which means our root= on the kernel command # line is completely ignored! repack the initrd to remove this evil... +echo "Mangling kernel..." mkdir /tmp/initrd-repack (cd /tmp/initrd-repack ; \ zcat /boot/initrd.img-3.2.0-3-kirkwood | cpio -i ; \ @@ -59,7 +67,7 @@ echo "Set root password to "$rootpassword echo root:$rootpassword | /usr/sbin/chpasswd # Create a default user -echo "Creating fbx user, password: $userpassword" +echo "Creating $user user, password: $userpassword" useradd $user echo $user:$userpassword | /usr/sbin/chpasswd diff --git a/freedom-maker/bin/projects b/freedom-maker/bin/projects deleted file mode 100755 index 2b5ed3c..0000000 --- a/freedom-maker/bin/projects +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/bash -# -# Copyright 2012 by Nick Daly <nick.m.daly@gmail.com> -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# - -# projects -# -# Installs external projects to the system. - -# We don't tolerate errors. -set -e - - -echo "Adding a few FreedomBox projects to the image." - -git clone git://github.com/NickDaly/Plinth.git $homedir/plinth -git clone git://github.com/jvasile/freedombox-privoxy $homedir/freedombox-privoxy -git clone git://github.com/jvasile/withsqlite.git $homedir/withsqlite -# hg clone https://hg@bitbucket.org/nickdaly/plugserver $homedir/plugserver -chown -R 1000:1000 $homedir diff --git a/freedom-maker/bin/projects-chroot b/freedom-maker/bin/projects-chroot deleted file mode 100755 index 50d4884..0000000 --- a/freedom-maker/bin/projects-chroot +++ /dev/null @@ -1 +0,0 @@ -#! /bin/sh diff --git a/freedom-maker/buildrootfs.sh b/freedom-maker/buildrootfs.sh index 856f49f..10ba598 100755 --- a/freedom-maker/buildrootfs.sh +++ b/freedom-maker/buildrootfs.sh @@ -104,14 +104,6 @@ rsync -av $source/ $target # add extra packages to the image bin/packages -# torouter! -echo "Explicitly copying some torouter files..." -# TODO: these should be redundant -# Override the above stuff - we know better -cp ../packages/torouter-prep/configs/interfaces $target/etc/network/interfaces -# Stop the libertas module from loading -cp ../packages/torouter-prep/configs/modprobe.d-blacklist.conf $target/etc/modprobe.d/blacklist.conf - # cleanup and finalize the image so it boots correctly. echo "Finalizing..." bin/finalize |