slitaz-arm diff sat @ rev 30

Up .hgignore Makefile rcS
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 05 23:39:50 2014 +0100 (2014-03-05)
parents 78abe0d7b64e
children b38c9a3fca9a
line diff
     1.1 --- a/sat	Mon Mar 03 16:32:33 2014 +0000
     1.2 +++ b/sat	Wed Mar 05 23:39:50 2014 +0100
     1.3 @@ -22,6 +22,10 @@
     1.4  # http://mirror.slitaz.org/packages/cooking/arm/
     1.5  mirror="http://cook.slitaz.org/cross/arm/packages/"
     1.6  
     1.7 +#
     1.8 +# Functions
     1.9 +#
    1.10 +
    1.11  # Help and usage
    1.12  usage() {
    1.13  	cat << EOT
    1.14 @@ -40,6 +44,7 @@
    1.15  $(boldify "Options:")
    1.16    --spk      Clean or include Spk package manager in the distro
    1.17    --kmap     Include the system keymap config in the distro
    1.18 +  --noinit   Dont create the compressed initramfs
    1.19    --work=    Path to work dir with packages and rootfs
    1.20    --size=    Specify optional vdisk size (default 20Mb)
    1.21    --init=    Specify the initramfs compression: gz bz2 xz
    1.22 @@ -82,8 +87,8 @@
    1.23  		# Get --flavor= packages lists
    1.24  		if [ "$flavor" ]; then
    1.25  			echo -n "Getting $flavor packages.list..."
    1.26 -			cp $flavors/$flavor/packages.list ${data} 2>/dev/null &&
    1.27 -			cp $flavors/$flavor/flavor.conf ${data} 2>/dev/null
    1.28 +			cp -f $flavors/$flavor/packages.list ${data} 2>/dev/null &&
    1.29 +			cp -f $flavors/$flavor/flavor.conf ${data} 2>/dev/null
    1.30  			status
    1.31  		fi
    1.32  
    1.33 @@ -145,8 +150,11 @@
    1.34  			mv -f ${rootfs}/boot/linux-* ${distro}/linux-arm
    1.35  			chmod -x ${distro}/linux-arm
    1.36  		else
    1.37 -			echo -n "Missing Kernel directory: rootfs/boot/"; false
    1.38 -			status
    1.39 +			# RPi use a custom Kernel: --rpi
    1.40 +			if [ ! "$rpi" ]; then
    1.41 +				echo -n "Missing Kernel directory: rootfs/boot/"; false
    1.42 +				status
    1.43 +			fi
    1.44  		fi
    1.45  
    1.46  		# SLITAZ_ARCH
    1.47 @@ -217,16 +225,18 @@
    1.48  		fi
    1.49  
    1.50  		# Rootfs cpio: gzip xz --> /usr/lib/slitaz/liblive.sh ???
    1.51 -		echo -n "Compressing initramfs: $initramfs"
    1.52 -		case "$initramfs" in
    1.53 -			*.bz2) find . | cpio -o -H newc | bzip2 > ../$initramfs ;;
    1.54 -			*.gz) find . | cpio -o -H newc | gzip -9 > ../$initramfs ;;
    1.55 -			*.xz) find . | cpio -o -H newc | xz -9 --format=lzma > ../$initramfs ;;
    1.56 -		esac
    1.57 +		if [ ! "$noinit" ]; then
    1.58 +			echo -n "Compressing initramfs: $initramfs"
    1.59 +			case "$initramfs" in
    1.60 +				*.bz2) find . | cpio -o -H newc | bzip2 > ../$initramfs ;;
    1.61 +				*.gz) find . | cpio -o -H newc | gzip -9 > ../$initramfs ;;
    1.62 +				*.xz) find . | cpio -o -H newc | xz -9 --format=lzma > ../$initramfs ;;
    1.63 +			esac
    1.64 +		fi
    1.65  		
    1.66  		# Summary
    1.67  		status
    1.68 -		separator && echo ""
    1.69 +		separator && newline
    1.70  		boldify "SliTaz ARM distro summary"
    1.71  		separator
    1.72  		time=$(($(date +%s) - $time))
    1.73 @@ -300,21 +310,21 @@
    1.74  		# Lets use and HD in Qemu to store files|packages|whatever
    1.75  		vdisk="vdisk.img"
    1.76  		: ${size=20}
    1.77 +		newline
    1.78  		echo "Creating virtual disk: $vdisk"
    1.79  		cd $work
    1.80  		dd if=/dev/zero of=$vdisk bs=1M count=$size
    1.81  		#mkfs.ext3 -q -T ext3 -L "SliTaz" -F $vdisk 
    1.82  		# Partition
    1.83  		echo "Creating partition with: fdisk"
    1.84 -		echo "
    1.85 +		fdisk ${vdisk} >/dev/null << EOT
    1.86  o
    1.87  n
    1.88  p
    1.89  1
    1.90 -
    1.91 -
    1.92 -w" \
    1.93 -		| fdisk $vdisk >/dev/null 2>/dev/null && newline ;;
    1.94 +w
    1.95 +EOT
    1.96 +		newline ;;
    1.97  	
    1.98  	emu)
    1.99  		cd $work