slitaz-arm rev 55

Finish sat-rpi release, some clean up and add suport for cgi-adm
author Christophe Lincoln <pankso@slitaz.org>
date Fri Mar 14 00:00:28 2014 +0100 (2014-03-14)
parents f02931a2c41f
children e78c96840be9
files sat sat-rpi
line diff
     1.1 --- a/sat	Thu Mar 13 23:17:34 2014 +0100
     1.2 +++ b/sat	Fri Mar 14 00:00:28 2014 +0100
     1.3 @@ -136,7 +136,7 @@
     1.4  			status
     1.5  		done
     1.6  
     1.7 -		# Install spk if requested. Spk multiarch support must be tested
     1.8 +		# Install spk Hg if requested. Spk multiarch support must be tested
     1.9  		if [ "$spk" ]; then
    1.10  			hg=http://hg.slitaz.org
    1.11  			echo -n "Installing: spk ($hg)"
    1.12 @@ -172,6 +172,13 @@
    1.13  			. var/lib/tazpkg/installed/linux/receipt
    1.14  			depmod -b . ${VERSION}-slitaz
    1.15  		fi
    1.16 +		
    1.17 +		# CGI Admin
    1.18 +		if [ -d "$work/cgi-adm" ]; then
    1.19 +			echo -n "Installing SliTaz ARM CGI Admin interface..."
    1.20 +			cp -a ${rpi}/cgi-adm/* ${rootfs}/var/www/adm
    1.21 +			status
    1.22 +		fi
    1.23  
    1.24  		# Custom rootfs: make sure all files belong to root
    1.25  		if [ -d "$work/rootfs" ]; then
     2.1 --- a/sat-rpi	Thu Mar 13 23:17:34 2014 +0100
     2.2 +++ b/sat-rpi	Fri Mar 14 00:00:28 2014 +0100
     2.3 @@ -71,9 +71,7 @@
     2.4  }
     2.5  
     2.6  header() {
     2.7 -	newline
     2.8 -	boldify "$@"
     2.9 -	separator
    2.10 +	newline && boldify "$@" && separator
    2.11  }
    2.12  
    2.13  # Get minimal RPi firmware
    2.14 @@ -211,6 +209,7 @@
    2.15  		if [ ! -x "/usr/bin/sat" ]; then
    2.16  			error "Sat is not installed" && exit 1
    2.17  		fi
    2.18 +		check_root
    2.19  		
    2.20  		# We may want to simply regenerate the RPi distro
    2.21  		if [ ! "$nosat" ]; then
    2.22 @@ -230,9 +229,14 @@
    2.23  		
    2.24  		# TazBerry
    2.25  		echo -n "Installing TazBerry..."
    2.26 -			cp -f ${rpi}/tazberry ${rootfs}/usr/bin
    2.27 +		cp -f ${rpi}/tazberry ${rootfs}/usr/bin
    2.28  		status
    2.29  		
    2.30 +		# CGI Admin
    2.31 +		#echo -n "Installing TazBerry CGI..."
    2.32 +		#cp -a ${rpi}/cgi-adm/* ${rootfs}/var/www/adm
    2.33 +		#status
    2.34 +		
    2.35  		# Overclocking
    2.36  		echo -n "Setting: Overclocking..."
    2.37  		set_oclock; status
    2.38 @@ -345,12 +349,6 @@
    2.39  				${fs}/lib/modules/*/source
    2.40  		fi
    2.41  		
    2.42 -		#get_tools
    2.43 -		#echo "Compressing: zImage to kernel.img"
    2.44 -		#cd ${tools}
    2.45 -		#python imagetool-uncompressed.py ${fs}/boot/zImage
    2.46 -		#mv -f kernel.img ${fs}/boot && rm ${fs}/boot/zImage
    2.47 -		
    2.48  		# Pack .tazpkg
    2.49  		cd ${data}
    2.50  		echo "Creating package: receipt"
    2.51 @@ -373,6 +371,7 @@
    2.52  		
    2.53  	get-linux)
    2.54  		# Precook RPi kernel
    2.55 +		check_root
    2.56  		mkdir -p ${data}
    2.57  		
    2.58  		# Last version
    2.59 @@ -442,22 +441,34 @@
    2.60  		rm -rf ${dname} && mkdir ${dname}
    2.61  		cp -a boot rootfs ${dname}
    2.62  		cat > ${dname}/README << EOT
    2.63 -SliTaz Raspberry Pi - $flavor-$(date +%Y%m%d) -
    2.64 +SliTaz Raspberry Pi - $flavor-$(date +%Y%m%d) - http://arm.slitaz.org/rpi
    2.65  --------------------------------------------------------------------------------
    2.66  
    2.67 +boot/   : Must be copied to a FAT32 partition
    2.68 +rootfs/ : Must be copied to a ext4 or btrfs partition
    2.69 +
    2.70  Manual Installation. Assuming the sdcard is /dev/sdc and have got 3 
    2.71  partitions (boot,swap,root). Mount the sdcard, copy files, unmount:
    2.72  
    2.73   # mkdir -p /media/rpi/boot /media/rpi/root
    2.74 + 
    2.75   # mount /dev/sdc1 /media/rpi/boot
    2.76   # mount /dev/sdc3 /media/rpi/root
    2.77 + 
    2.78   # cp -a boot/* /media/rpi/boot
    2.79   # cp -a rootfs/* /media/rpi/root
    2.80 + 
    2.81   # umount /media/rpi/boot
    2.82   # umount /media/rpi/root
    2.83 - 
    2.84 +
    2.85 +--------------------------------------------------------------------------------
    2.86 +
    2.87  EOT
    2.88 -		;;
    2.89 +		echo "Creating: ${dname}.tar.xz"
    2.90 +		tar -cJf ${dname}.tar.xz ${dname}
    2.91 +		echo "Creating: ${dname}.md5"
    2.92 +		md5sum ${dname}.tar.xz > ${dname}.md5
    2.93 +		rm -rf ${dname} ;;
    2.94  	
    2.95  	clean)
    2.96  		echo "Cleaning: $rpi"