slitaz-arm rev 38

Small clean and up rpi/README
author Christophe Lincoln <pankso@slitaz.org>
date Sat Mar 08 01:38:55 2014 +0100 (2014-03-08)
parents 7c5d5748623d
children ce6806f91674
files rpi/README sat spi
line diff
     1.1 --- a/rpi/README	Fri Mar 07 23:06:51 2014 +0100
     1.2 +++ b/rpi/README	Sat Mar 08 01:38:55 2014 +0100
     1.3 @@ -8,13 +8,8 @@
     1.4  Spi quickstart
     1.5  --------------------------------------------------------------------------------
     1.6  The Raspberry Pi has a lot of specifications. SliTaz ARM provides 'spi' to build
     1.7 -custom SliTaz Rpi distro images ready to boot. To get the list of available 
     1.8 -commands and options:
     1.9 -
    1.10 -# spi help
    1.11 -
    1.12 -Slitaz RPi mirror hosts the prebuilt Linux kernel package. To get the
    1.13 -latest version and unpack it:
    1.14 +custom SliTaz Rpi distro images ready to boot. SliTaz RPi prebuilt Linux kernel
    1.15 +package is hosted on SliTaz mirror. To get the latest version and unpack it:
    1.16  
    1.17  # spi get-linux
    1.18  
    1.19 @@ -23,3 +18,21 @@
    1.20  
    1.21  # spi gen
    1.22  
    1.23 +Then you can install the distro the the sdcard. It is recommended to use
    1.24 +3 partitions, one for /boot formated in FAT32, second for the swap memory
    1.25 +and third for the root filesystem. You can you gparted of 'fdisk' to create
    1.26 +the needed partitions. Main advantages are: more memory for the RPi and 
    1.27 +better security with files permissions. When ready and you know you disk
    1.28 +path (spi ls-dev) you can install SliTaz RPi with:
    1.29 +
    1.30 +# spi install --dev=/dev/sdX
    1.31 +
    1.32 +
    1.33 +Spi commands and options
    1.34 +--------------------------------------------------------------------------------
    1.35 +To get the list of commands and options with a short help simply run:
    1.36 +
    1.37 +$ spi
    1.38 +
    1.39 +
    1.40 +================================================================================
     2.1 --- a/sat	Fri Mar 07 23:06:51 2014 +0100
     2.2 +++ b/sat	Sat Mar 08 01:38:55 2014 +0100
     2.3 @@ -32,6 +32,8 @@
     2.4  
     2.5  $(boldify "Usage:") $(basename $0) [command|--options]
     2.6  
     2.7 +SliTaz ARM Tool - http://arm.slitaz.org
     2.8 +
     2.9  $(boldify "Commands:")
    2.10    gen        Generate a distro cpio/gzip initramfs
    2.11    flavors    List and give info about flavors
    2.12 @@ -42,8 +44,8 @@
    2.13    mirror     Download or sync the SliTaz ARM mirror
    2.14  
    2.15  $(boldify "Options:")
    2.16 +  --kmap     Include the system keymap config in the distro
    2.17    --spk      Clean or include Spk package manager in the distro
    2.18 -  --kmap     Include the system keymap config in the distro
    2.19    --noinit   Don't create the compressed initramfs
    2.20    --work=    Path to work dir with packages and rootfs
    2.21    --size=    Specify optional vdisk size (default 20Mb)
     3.1 --- a/spi	Fri Mar 07 23:06:51 2014 +0100
     3.2 +++ b/spi	Sat Mar 08 01:38:55 2014 +0100
     3.3 @@ -7,6 +7,9 @@
     3.4  #
     3.5  . /lib/libtaz.sh
     3.6  
     3.7 +#: ${arch=armv6hf}
     3.8 +: ${arch=arm}
     3.9 +
    3.10  # Paths
    3.11  [ "$work" ] || work="$(pwd)"
    3.12  distro="$work/distro"
    3.13 @@ -39,14 +42,16 @@
    3.14  
    3.15  $(boldify "Usage:") $(basename $0) [command] [--option]
    3.16  
    3.17 +SliTaz Raspberry Pi Tool
    3.18 +
    3.19  $(boldify "Commands:")
    3.20    info          Display paths and distro info
    3.21    install       Install SliTaz RPi to sdcard
    3.22    gen           Generate a new SliTaz RPi distro
    3.23    cook-linux    Build the Raspberry Pi Linux kernel
    3.24    get-linux     Get the SliTaz RPi linux package
    3.25 -  get-fw        Download or update RPi Firmware
    3.26 -  clone-fw      Clone the RPi Firmware repository
    3.27 +  get-fw        Download or update minimal RPi firmware
    3.28 +  clone-fw      Clone the RPi firmware repository
    3.29    get-tools     Download or update RPi Tools (mkimage)
    3.30    get-prebuilt  Get a prebuilt SliTaz ARM toolchain
    3.31    oclock        Display overclocking information
    3.32 @@ -106,7 +111,20 @@
    3.33  	done
    3.34  }
    3.35  
    3.36 -# Configure overclocking
    3.37 +# RPi Overclocking
    3.38 +show_oclock() {
    3.39 +	cat << EOT
    3.40 +
    3.41 +$(boldify "Overclocking modes:")
    3.42 +none    700MHz  ARM 250MHz core 400MHz SDRAM 0 overvolt
    3.43 +modest  800MHz  ARM 300MHz core 400MHz SDRAM 0 overvolt
    3.44 +medium  900MHz  ARM 333MHz core 450MHz SDRAM 2 overvolt
    3.45 +high    950MHz  ARM 450MHz core 450MHz SDRAM 6 overvolt
    3.46 +turbo   1000MHz ARM 500MHz core 500MHz SDRAM 6 overvolt
    3.47 +
    3.48 +EOT
    3.49 +}
    3.50 +
    3.51  set_oclock() {
    3.52  	case "$oclock" in
    3.53  		none)
    3.54 @@ -255,7 +273,7 @@
    3.55  		fi
    3.56  		
    3.57  		# Overcloking
    3.58 -		echo -n "Setting: Overcloking"
    3.59 +		echo -n "Setting: Overcloking..."
    3.60  		set_oclock; status
    3.61  		
    3.62  		# Force turbo
    3.63 @@ -284,16 +302,20 @@
    3.64  		
    3.65  		# RPi VC libraries
    3.66  		if [ "$vc" ]; then
    3.67 +			vc="${rootfs}/opt/vc"
    3.68  			if [ ! -d "$firmware/opt/vc" ]; then
    3.69  				error "Missing firmware git repository" && exit 1
    3.70  			fi
    3.71 -			# --hardfp
    3.72 -			if [ "$hardfp" ]; then
    3.73 -				echo -n "Not yet supported: SliTaz ARMv6hf"; false
    3.74 -			else
    3.75 -				echo -n "Installing standard: VC libraries"
    3.76 -				cp -a ${firmware}/opt ${rootfs}
    3.77 -			fi
    3.78 +			echo -n "Copying: standard VC libraries"
    3.79 +			cp -a ${firmware}/opt ${rootfs}
    3.80 +			# --> armv6hf
    3.81 +			#cp -a ${firmware}/hardfp/opt ${rootfs}
    3.82 +			chown -R root.root ${rootfs}/opt
    3.83 +			status
    3.84 +			echo -n "Cleaning: VC libraries devel files"
    3.85 +			cross_tools="/cross/arm/tools/bin"
    3.86 +			rm -rf ${vc}/include ${vc}/src ${vc}/lib/*.a
    3.87 +			${cross_tools}/arm-slitaz-linux-gnueabi-strip -s ${vc}/lib/*.so
    3.88  			status
    3.89  		fi
    3.90  		
    3.91 @@ -305,8 +327,6 @@
    3.92  	cook-linux)
    3.93  		# Native SliTaz Toolchain and cross toolchain must be installed
    3.94  		check_root
    3.95 -		#: ${arch=armv6hf}
    3.96 -		: ${arch=arm}
    3.97  		install="$data/linux-install"
    3.98  		if [ ! -d "/cross/$arch" ]; then
    3.99  			error "Missing cross toolchain in: /cross/$arch"
   3.100 @@ -433,16 +453,7 @@
   3.101  		clone_fw ;;
   3.102  	
   3.103  	oclock)
   3.104 -		cat << EOT
   3.105 -
   3.106 -$(boldify "Overclocking modes:")
   3.107 -none    700MHz  ARM 250MHz core 400MHz SDRAM 0 overvolt
   3.108 -modest  800MHz  ARM 300MHz core 400MHz SDRAM 0 overvolt
   3.109 -medium  900MHz  ARM 333MHz core 450MHz SDRAM 2 overvolt
   3.110 -high    950MHz  ARM 450MHz core 450MHz SDRAM 6 overvolt
   3.111 -turbo   1000MHz ARM 500MHz core 500MHz SDRAM 6 overvolt
   3.112 -
   3.113 -EOT
   3.114 +		show_oclock
   3.115  		if [ -f "$boot/config.txt" ]; then
   3.116  			boldify "Current config.txt:"
   3.117  			cat ${boot}/config.txt