Skip to content

Instantly share code, notes, and snippets.

@omgmog
Created October 31, 2014 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omgmog/b7d284ffcbacf84df399 to your computer and use it in GitHub Desktop.
Save omgmog/b7d284ffcbacf84df399 to your computer and use it in GitHub Desktop.
diff to test partx
diff --git a/install.sh b/install.sh
index 63c6661..40865e3 100644
--- a/install.sh
+++ b/install.sh
@@ -30,14 +30,14 @@ UBOOTFILE="nv_uboot-spring.kpart.gz"
if [ $DEVICE = $EMMC ]; then
# for eMMC we need to get some things before we can partition
echo -e "\n[archlinuxfr]\nSigLevel = Never\nServer = http://repo.archlinux.fr/arm\n" >> /etc/pacman.conf
- pacman -Syyu packer devtools-alarm base-devel git libyaml parted dosfstools cgpt parted
+ pacman -Syyu packer devtools-alarm base-devel git libyaml dosfstools cgpt
log "When prompted to modify PKGBUILD for trousers, set arch to armv7h"
packer -S trousers vboot-utils
fi
log "Creating volumes on ${DEVICE}"
umount ${DEVICE}*
-parted ${DEVICE} mklabel gpt
+partx -t gpt -u ${DEVICE}
cgpt create -z ${DEVICE}
cgpt create ${DEVICE}
cgpt add -i 1 -t kernel -b 8192 -s 32768 -l U-Boot -S 1 -T 5 -P 10 ${DEVICE}
@@ -45,7 +45,7 @@ cgpt add -i 2 -t data -b 40960 -s 32768 -l Kernel ${DEVICE}
cgpt add -i 12 -t data -b 73728 -s 32768 -l Script ${DEVICE}
PARTSIZE=`cgpt show ${DEVICE} | grep 'Sec GPT table' | egrep -o '[0-9]+' | head -n 1`
cgpt add -i 3 -t data -b 106496 -s `expr ${PARTSIZE} - 106496` -l Root ${DEVICE}
-partprobe ${DEVICE}
+partx -l ${DEVICE}
mkfs.ext2 $P2
mkfs.ext4 $P3
mkfs.vfat -F 16 $P12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment