In progress modifications
This commit is contained in:
		@@ -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"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# assign TARGET ( rpi or xu3-4 )
 | 
				
			||||||
 | 
					case $TARGET in
 | 
				
			||||||
 | 
					xu3 | xu4)
 | 
				
			||||||
 | 
						CREATEIMG="createxu3-4image"
 | 
				
			||||||
 | 
						break;;
 | 
				
			||||||
 | 
					rpi)
 | 
				
			||||||
 | 
						CREATEIMG="createrpiimage"
 | 
				
			||||||
 | 
						FIRMWARE_PATH="$SOURCE_PATH/.."
 | 
				
			||||||
 | 
						FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
 | 
				
			||||||
 | 
						FIRMWARE_DIR="firmware-stable"
 | 
				
			||||||
 | 
						break;;
 | 
				
			||||||
 | 
					*)
 | 
				
			||||||
 | 
						CREATEIMG="createxu3-4image"
 | 
				
			||||||
 | 
						TARGET="xu4"
 | 
				
			||||||
 | 
						break;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					info "target : $TARGET" 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# path of config file
 | 
				
			||||||
if [ -z $CONFIG_PATH ];then
 | 
					if [ -z $CONFIG_PATH ];then
 | 
				
			||||||
 | 
						info " Config path do not exists, defaulting to ./$TARGET"
 | 
				
			||||||
	CONFIG_PATH="./$TARGET"
 | 
						CONFIG_PATH="./$TARGET"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -d "./$CONFIG_PATH" ];then
 | 
					if [ -d "./$CONFIG_PATH" ];then
 | 
				
			||||||
	if [-e "./$CONFIG_PATH/config.txt" ]
 | 
						if [ -e "./$CONFIG_PATH/config.txt" ];then
 | 
				
			||||||
		info "using $CONFIG_PATH/config.txt as config"
 | 
							info "using $CONFIG_PATH/config.txt as config"
 | 
				
			||||||
		. "./$CONFIG_PATH/config.txt"
 | 
							. "./$CONFIG_PATH/config.txt"
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		warning "Config file does not exists, do you want i copy template ? [Y|n] "
 | 
							warning "Config file does not exists, do you want i copy template ? [Y|n] "
 | 
				
			||||||
		read yn
 | 
							read yn
 | 
				
			||||||
		if [ -z $yn || $yn -eq "Y" || $yn -eq "y" ];then
 | 
							if [ -z $yn ] || [ $yn = "Y" ] || [ $yn = "y" ];then
 | 
				
			||||||
			/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
 | 
								/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
		/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
 | 
							/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
 | 
				
			||||||
		warning "You need now to modify the config file and relaunch the script"
 | 
							warning "You need now to modify the config file (./$CONFIG_PATH/config.txt) and relaunch the script"
 | 
				
			||||||
		exit 1
 | 
							exit 1
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	warning "Config directory does not exists, do you want i make it and copy the template file in? [Y|n] "
 | 
						warning "Config directory does not exists, do you want i make it and copy the template file in? [Y|n] "
 | 
				
			||||||
	read yn
 | 
						read yn
 | 
				
			||||||
	if [ -z $yn || $yn -eq "Y" || $yn -eq "y" ];then
 | 
						if [ -z $yn || $yn = "Y" || $yn = "y" ];then
 | 
				
			||||||
		/usr/bin/mkdir ./$CONFIG_PATH/
 | 
							/usr/bin/mkdir ./$CONFIG_PATH/
 | 
				
			||||||
		/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
 | 
							/usr/bin/cp ./config.template "./$CONFIG_PATH/config.txt"
 | 
				
			||||||
		warning "You need now to modify the config file and relaunch the script"
 | 
							warning "You need now to modify the config file (./$CONFIG_PATH/config.txt) and relaunch the script"
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# assign TARGET ( rpi or xu3-4 )
 | 
					
 | 
				
			||||||
if [ $CREATEIMAGE ];then
 | 
					 | 
				
			||||||
	case $TARGET in
 | 
					 | 
				
			||||||
	xu3||xu4)
 | 
					 | 
				
			||||||
		CREATEIMG="createxu3-4image"
 | 
					 | 
				
			||||||
		break;;
 | 
					 | 
				
			||||||
	rpi)
 | 
					 | 
				
			||||||
		CREATEIMG="createrpiimage"
 | 
					 | 
				
			||||||
		FIRMWARE_PATH="$SOURCE_PATH/.."
 | 
					 | 
				
			||||||
		FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
 | 
					 | 
				
			||||||
		FIRMWARE_DIR="firmware-stable"
 | 
					 | 
				
			||||||
		break;;
 | 
					 | 
				
			||||||
	*)
 | 
					 | 
				
			||||||
		CREATEIMG="createxu3-4image"
 | 
					 | 
				
			||||||
		TARGET="xu4"
 | 
					 | 
				
			||||||
		break;;
 | 
					 | 
				
			||||||
	esac
 | 
					 | 
				
			||||||
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
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user