summaryrefslogtreecommitdiff
path: root/share/hydractl/provision-raspi
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-09-26 12:12:26 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-09-26 12:12:26 -0300
commit96e21d9866cfc7b853f5cb8728ff2f7d7409ea84 (patch)
treed2bbe49d5b94a69546086530e34c86482c52921e /share/hydractl/provision-raspi
parent52ecfc3590fc33bff702ec1478ac61378639c849 (diff)
downloadhydra-96e21d9866cfc7b853f5cb8728ff2f7d7409ea84.tar.gz
hydra-96e21d9866cfc7b853f5cb8728ff2f7d7409ea84.tar.bz2
Provision fixes for raspi
Diffstat (limited to 'share/hydractl/provision-raspi')
-rwxr-xr-xshare/hydractl/provision-raspi16
1 files changed, 12 insertions, 4 deletions
diff --git a/share/hydractl/provision-raspi b/share/hydractl/provision-raspi
index 640616f..5b3ea15 100755
--- a/share/hydractl/provision-raspi
+++ b/share/hydractl/provision-raspi
@@ -29,23 +29,31 @@ function hydra_provision_config {
hydra_user_config arch armel "System arch"
hydra_user_config version jessie "Distro version"
hydra_user_config mirror http://http.debian.net/debian/ "Debian mirror"
+
+ # Check arch
+ if [ "$arch" != "armel" ] && [ "$arch" != "armhf" ]; then
+ echo "You probably want to run provision instead of provision-raspi"
+ exit 1
+ fi
}
# Load configuration
-hydra_provision_load_config
+hydra_provision_config_load $1
# Parameters
WORK="/media/mmc"
CHROOT="hydra_sudo_run chroot $WORK"
CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
-RPI_URL="http://goo.gl/1BOfJ"
+RPI_URL="https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update"
# Get config parameters.
hydra_provision_config
# Partitioning
-# TODO automated
-hydra_sudo_run cfdisk $device # bootable VFAT (0B) and linux partitions
+hydra_sudo_run parted -s -- $device mklabel msdos
+hydra_sudo_run parted -s -- $device unit MB mkpart primary fat32 1 100
+hydra_sudo_run parted -s -- $device unit MB mkpart primary ext2 101 -1
+hydra_sudo_run parted -s -- $device set 1 boot on
hydra_sudo_run mkdir -p $WORK
# Create filesystems