slitaz-arm rev 207

tazbian: check for model 1 in postinstall
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Aug 08 23:42:01 2015 +0200 (2015-08-08)
parents 4ed997df7958
children 23f85a7e62b1
files rpi/tazbian
line diff
     1.1 --- a/rpi/tazbian	Wed Mar 18 19:00:17 2015 +0100
     1.2 +++ b/rpi/tazbian	Sat Aug 08 23:42:01 2015 +0200
     1.3 @@ -10,7 +10,10 @@
     1.4  
     1.5  [ $(id -u) -ne 0 ] && echo "Must be root. Abort." && exit 1
     1.6  
     1.7 +DESTDIR=var/os/slitaz
     1.8  DESCRIPTION="Tiny Linux distribution with multi boot features"
     1.9 +LONG_DESCRIPTION="SliTaz can run fully in RAM or can be installed \
    1.10 +on the SD card in a\nsubdirectory of your Raspbian (example /$DESTDIR)."
    1.11  WEB_SITE="http://arm.slitaz.org/rpi/"
    1.12  MAINTAINER="Pascal Bellard <pascal.bellard@slitaz.org>"
    1.13  
    1.14 @@ -48,7 +51,6 @@
    1.15  TMPDIR=/tmp/rasp$$
    1.16  mkdir -p $TMPDIR
    1.17  cd $TMPDIR
    1.18 -DESTDIR=var/os/slitaz
    1.19  URL=http://mirror.slitaz.org/arm/rpi/
    1.20  wget -O - $URL | sed '/slitaz-rpi/!d;s/.*href=.\([a-zA-Z0-9._-]*\).*/\1/' | sort -r > index
    1.21  VERSION="$(sed '/rpi-desktop/!d' index | sed 's/.*-desktop-\([0-9_-]*\).*/\1/;q')"
    1.22 @@ -173,7 +175,11 @@
    1.23  fi
    1.24  cd - > /dev/null
    1.25  
    1.26 -if [ ! -f /boot/menu.txt ]; then
    1.27 +if ! grep -qs ARMv6-compatible /proc/cpuinfo ; then
    1.28 +
    1.29 +echo "CPU unknown. Can't update /boot. Not RPI model 1?"
    1.30 +
    1.31 +elif [ ! -f /boot/menu.txt ]; then
    1.32  
    1.33  echo "Update /boot ..."
    1.34  for i in keyboard locale ; do
    1.35 @@ -206,10 +212,9 @@
    1.36  echo "root=/dev/null \$L \$KMAP rdinit=/sbin/pisubroot mount=\$RDEV subroot=$DESTDIR rootwait quiet" > /boot/slitaz/cmdline.txt
    1.37  echo "root=/dev/null \$L \$KMAP quiet" > /boot/slitaz-base/cmdline.txt
    1.38  cp /boot/slitaz-base/cmdline.txt /boot/slitaz-live/cmdline.txt
    1.39 +echo "The SliTaz boot menu is available for the next (re)boot."
    1.40  
    1.41  fi
    1.42 -
    1.43 -echo "The SliTaz boot menu is available for the next (re)boot."
    1.44  EOT
    1.45  }
    1.46  
    1.47 @@ -247,8 +252,7 @@
    1.48  Priority: optional
    1.49  Homepage: $WEB_SITE
    1.50  Description: $DESCRIPTION
    1.51 - SliTaz can run fully in RAM or can be installed on the SD card in a
    1.52 - subdirectory of your Raspbian (example /$DESTDIR).
    1.53 +$(echo $LONG_DESCRIPTION | sed 's/^/ /')
    1.54  EOT
    1.55  	( cd fs ; find * -type f -exec md5sum {} \; ) > md5sums
    1.56  	cat > postinst <<EOT