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

@ -428,7 +428,7 @@ formatpartitions()
copyingsystem() copyingsystem()
{ {
# getting UUID of root partition #getting UUID of root partition
#ROOT_ID=`/sbin/blkid -s UUID -o value "${DEVICE}p2"` #ROOT_ID=`/sbin/blkid -s UUID -o value "${DEVICE}p2"`
#info "blkid -s UUID -o value ${DEVICE}p2" #info "blkid -s UUID -o value ${DEVICE}p2"
#info "root partition ID: $ROOT_ID" #info "root partition ID: $ROOT_ID"
@ -623,59 +623,63 @@ ROOT="/mnt/root"
BUILD_PATH="$INSTALL_PATH/build" BUILD_PATH="$INSTALL_PATH/build"
ARM_VERSION="armv7hl" 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 ) # assign TARGET ( rpi or xu3-4 )
if [ $CREATEIMAGE ];then case $TARGET in
case $TARGET in xu3 | xu4)
xu3||xu4)
CREATEIMG="createxu3-4image" CREATEIMG="createxu3-4image"
break;; break;;
rpi) rpi)
CREATEIMG="createrpiimage" CREATEIMG="createrpiimage"
FIRMWARE_PATH="$SOURCE_PATH/.." FIRMWARE_PATH="$SOURCE_PATH/.."
FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip" FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
FIRMWARE_DIR="firmware-stable" FIRMWARE_DIR="firmware-stable"
break;; break;;
*) *)
CREATEIMG="createxu3-4image" CREATEIMG="createxu3-4image"
TARGET="xu4" TARGET="xu4"
break;; break;;
esac 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 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 "source path: $SOURCE_PATH"
info "Install path: $INSTALL_PATH" info "Install path: $INSTALL_PATH"
info "Build path: $BUILD_PATH" info "Build path: $BUILD_PATH"
info "Commande : $CMDNAME" info "Commande : $CMDNAME"
info "Firmware path : $FIRMWARE_PATH" info "Firmware path : $FIRMWARE_PATH"
info "Firmware dir : $FIRMWARE_DIR" info "Firmware dir : $FIRMWARE_DIR"
info "target : $TARGET"
if [[ "$IMAGE_SIZE" -lt 7 ]] || [[ "$IMAGE_SIZE" -gt 128 ]];then if [[ "$IMAGE_SIZE" -lt 7 ]] || [[ "$IMAGE_SIZE" -gt 128 ]];then
IMAGE_SIZE=7 IMAGE_SIZE=7
@ -715,13 +719,9 @@ case $OPT in
all) all)
verify_disk_space verify_disk_space
if [ $? -eq 1 ];then if [ $? -eq 1 ];then
warning "Not enough space on disk" echo "Not enough space on disk\nDo you want to continue anyway ? [Y,n]"
if ! [ -e /usr/bin/dialog ];then read yn
warning "installing cdialog" if [ $yn = "n" ];then
urpmi --auto --force cdialog
fi
dialog --yesno "Not enough space on disk\nDo you want to continue anyway ?" 7 40
if [ $? -eq 1 ];then
exit 6 exit 6
fi fi
fi fi
@ -756,4 +756,3 @@ case $OPT in
installbasesystem installbasesystem
;; ;;
esac esac

View File

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