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