Last active
July 11, 2016 12:39
-
-
Save peel/fd0b424fdc0b99a07859 to your computer and use it in GitHub Desktop.
Making an ArchLinux ARM SD card for ODROID-C2 with OSX with Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Step 1: Run the container | |
# Downloads an image from docker hub and runs it with access to hardware in privileged mode | |
# Note the PLATFORM=oc2 variable | |
docker run --rm --privileged -v $(pwd):/backup peelsky/arm-sdcard-builder -e PLATFORM=odroid-c2 download copy | |
# Step 2: Find disk identifier | |
# This is extremely important to get it right as the process will destroy | |
# the contents of a given disk | |
# The disk identifier has a form of 'diskX', ie for the following output: | |
# /dev/disk2s1 233Gi 220Gi 12Gi 95% 57795408 3185810 95% / | |
# The disk identifier is disk2 (disk2s1 is a partition on disk2) | |
df -h | |
read -p "Enter disk identifier ie. disk2:" DISK_ID | |
# Step 3: Flash SD card(s) | |
# Copy image to SD card | |
sudo dd bs=1m if=sdcard.img of=/dev/$(DISK_ID) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment