Created
December 29, 2015 02:10
-
-
Save abaez/8552a7d897a960a1894e to your computer and use it in GitHub Desktop.
archlinux arm veyron install
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 | |
sda="/dev/mmcblk1" | |
umount ${sda}* | |
echo "type g and w" && wait 3 | |
fdisk $sda | |
cgpt create $sda | |
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l Kernel -S 1 -T 5 -P 10 $sda | |
cgpt show $sda | |
echo "give me column" | |
read column | |
cgpt add -i 2 -t data -b 40960 -s `expr $column - 40960` -l Root $sda | |
# refresh partition | |
sfdisk -R $sda | |
# format root partition | |
sda2=${sda}p2 | |
mkfs.ext4 $sda2 | |
# rootfs | |
echo "building rootfs" | |
cd /tmp | |
wget http://archlinuxarm.org/os/ArchLinuxARM-veyron-latest.tar.gz | |
mkdir root | |
mount $sda2 root | |
tar -xf ArchLinuxARM-veyron-latest.tar.gz -C root | |
dd if=root/boot/vmlinux.kpart of=${sda}p1 | |
# sync | |
umount root | |
sync |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment