added /dev/mmcblk0[p] support from Mario Di Francesco

pull/8/head
Robert Nelson 15 years ago committed by Robert Nelson
parent a33f4e7894
commit db0641f1de

@ -12,6 +12,7 @@ unset FIRMWARE
unset SERIAL_MODE
BOOT_LABEL=boot
PARTITION_PREFIX=""
DIR=$PWD
@ -173,8 +174,8 @@ function cleanup_sd {
echo "Umounting Partitions"
echo ""
sudo umount ${MMC}1 &> /dev/null || true
sudo umount ${MMC}2 &> /dev/null || true
sudo umount ${MMC}${PARTITION_PREFIX}1 &> /dev/null || true
sudo umount ${MMC}${PARTITION_PREFIX}2 &> /dev/null || true
sudo parted -s ${MMC} mklabel msdos
}
@ -199,12 +200,12 @@ echo ""
echo "Formating Boot Partition"
echo ""
sudo mkfs.vfat -F 16 ${MMC}1 -n ${BOOT_LABEL}
sudo mkfs.vfat -F 16 ${MMC}${PARTITION_PREFIX}1 -n ${BOOT_LABEL}
sudo rm -rfd ${DIR}/disk || true
mkdir ${DIR}/disk
sudo mount ${MMC}1 ${DIR}/disk
sudo mount ${MMC}${PARTITION_PREFIX}1 ${DIR}/disk
sudo cp -v ${DIR}/dl/${MLO} ${DIR}/disk/MLO
sudo cp -v ${DIR}/dl/${XLOAD} ${DIR}/disk/x-load.bin.ift
@ -229,7 +230,7 @@ sudo chmod +x ${DIR}/disk/rebuild_uinitrd.sh
cd ${DIR}/disk
sync
cd ${DIR}
cd ${DIR}/
sudo umount ${DIR}/disk || true
echo "done"
@ -339,6 +340,10 @@ while [ ! -z "$1" ]; do
--mmc)
checkparm $2
MMC="$2"
if [[ "${MMC}" =~ "mmcblk" ]]
then
PARTITION_PREFIX="p"
fi
check_mmc
;;
--distro)

Loading…
Cancel
Save