1
0

In progress modifications

This commit is contained in:
Daniel Tartavel 2018-06-09 16:15:50 +02:00
parent 074e6a5e03
commit 8bdc8e1724
2 changed files with 35 additions and 36 deletions

View File

@ -623,38 +623,9 @@ ROOT="/mnt/root"
BUILD_PATH="$INSTALL_PATH/build"
ARM_VERSION="armv7hl"
if [ -z $CONFIG_PATH ];then
CONFIG_PATH="./$TARGET"
fi
if [ -d "./$CONFIG_PATH" ];then
if [-e "./$CONFIG_PATH/config.txt" ]
info "using $CONFIG_PATH/config.txt as config"
. "./$CONFIG_PATH/config.txt"
else
warning "Config file does not exists, do you want i copy template ? [Y|n] "
read yn
if [ -z $yn || $yn -eq "Y" || $yn -eq "y" ];then
/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
fi
/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
warning "You need now to modify the config file and relaunch the script"
exit 1
fi
else
warning "Config directory does not exists, do you want i make it and copy the template file in? [Y|n] "
read yn
if [ -z $yn || $yn -eq "Y" || $yn -eq "y" ];then
/usr/bin/mkdir ./$CONFIG_PATH/
/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
warning "You need now to modify the config file and relaunch the script"
fi
fi
# assign TARGET ( rpi or xu3-4 )
if [ $CREATEIMAGE ];then
case $TARGET in
xu3||xu4)
xu3 | xu4)
CREATEIMG="createxu3-4image"
break;;
rpi)
@ -668,14 +639,47 @@ if [ $CREATEIMAGE ];then
TARGET="xu4"
break;;
esac
info "target : $TARGET"
# path of config file
if [ -z $CONFIG_PATH ];then
info " Config path do not exists, defaulting to ./$TARGET"
CONFIG_PATH="./$TARGET"
fi
if [ -d "./$CONFIG_PATH" ];then
if [ -e "./$CONFIG_PATH/config.txt" ];then
info "using $CONFIG_PATH/config.txt as config"
. "./$CONFIG_PATH/config.txt"
else
warning "Config file does not exists, do you want i copy template ? [Y|n] "
read yn
if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
fi
/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
warning "You need now to modify the config file (./$CONFIG_PATH/config.txt) and relaunch the script"
exit 1
fi
else
warning "Config directory does not exists, do you want i make it and copy the template file in? [Y|n] "
read yn
if [ -z $yn || $yn = "Y" || $yn = "y" ];then
/usr/bin/mkdir ./$CONFIG_PATH/
/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
warning "You need now to modify the config file (./$CONFIG_PATH/config.txt) and relaunch the script"
fi
fi
info "source path: $SOURCE_PATH"
info "Install path: $INSTALL_PATH"
info "Build path: $BUILD_PATH"
info "Commande : $CMDNAME"
info "Firmware path : $FIRMWARE_PATH"
info "Firmware dir : $FIRMWARE_DIR"
info "target : $TARGET"
if [[ "$IMAGE_SIZE" -lt 7 ]] || [[ "$IMAGE_SIZE" -gt 128 ]];then
IMAGE_SIZE=7
@ -715,13 +719,9 @@ case $OPT in
all)
verify_disk_space
if [ $? -eq 1 ];then
warning "Not enough space on disk"
if ! [ -e /usr/bin/dialog ];then
warning "installing cdialog"
urpmi --auto --force cdialog
fi
dialog --yesno "Not enough space on disk\nDo you want to continue anyway ?" 7 40
if [ $? -eq 1 ];then
echo "Not enough space on disk\nDo you want to continue anyway ? [Y,n]"
read yn
if [ $yn = "n" ];then
exit 6
fi
fi
@ -756,4 +756,3 @@ case $OPT in
installbasesystem
;;
esac

View File

@ -15,9 +15,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
MAGEIA_VERSION="6"
MAGEIA_VERSION="cauldron"
ARM_VERSION="armv7hl"
TARGET="xu3-4"
TARGET="xu4"
# URL of the Mageia mirror used to install ( see mirrors.mageia.org )
MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/$MAGEIA_VERSION/$ARM_VERSION"
@ -46,7 +46,7 @@ ROOT_PWD="odroid"
HOSTNAME="xu4.odroid"
#Filesystem of boot partitions (default ext4)
#BOOTFS=ext4
BOOTFS=ext4
#kernel package to install
KERNEL=kernel-odroid