slitaz-arm rev 196

tazbian: misc fixes
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 16 13:34:10 2014 +0100 (2014-11-16)
parents 4e701eef29cb
children 635fc61b4e63
files rpi/tazbian
line diff
     1.1 --- a/rpi/tazbian	Sun Nov 16 10:42:30 2014 +0100
     1.2 +++ b/rpi/tazbian	Sun Nov 16 13:34:10 2014 +0100
     1.3 @@ -44,8 +44,10 @@
     1.4  BASE=$(ls -d slitaz-rpi-base-*/rootfs)
     1.5  [ ! -d "$BASE" ] && echo "Abort ($BASE) !" && exit 1
     1.6  wget http://hg.slitaz.org/slitaz-arm/raw-file/tip/rpi/piboot
     1.7 -chmod +x piboot
     1.8 +wget http://hg.slitaz.org/slitaz-boot-scripts/raw-file/tip/init
     1.9 +chmod +x piboot init
    1.10  mv piboot $BASE/sbin
    1.11 +mv init $BASE/sbin/pisubroot
    1.12  wget http://cook.slitaz.org/cross/arm/packages/packages.list
    1.13  while read file pkg extra ; do
    1.14  	[ -s boot$file ] && continue
    1.15 @@ -63,12 +65,9 @@
    1.16  /usr/lib/libgcrypt.so		libgcrypt		aria2
    1.17  /usr/lib/libgmp.so		gmp			aria2
    1.18  /usr/lib/libnettle.so		nettle			aria2
    1.19 -/usr/share/terminfo/l/linux	ncurses-common		aria2
    1.20 -/lib/libncurses.so		ncurses			aria2
    1.21  /usr/lib/libreadline.so		readline		aria2
    1.22 -/usr/lib/libstdc++.so		gcc-lib-base p11-kit	aria2
    1.23 +/usr/bin/p11-kit		p11-kit			aria2
    1.24  /usr/lib/libgnutls.so		libgnutls		aria2
    1.25 -/usr/lib/libcrypto.so		libcrypto		aria2
    1.26  /usr/lib/libtasn1.so		libtasn1		aria2
    1.27  /usr/bin/gnutls-cli		gnutls			aria2
    1.28  /usr/bin/aria2c			aria2			aria2
    1.29 @@ -100,14 +99,17 @@
    1.30  	fi
    1.31  done
    1.32  ( cd $BASE/ ; find -type d ) | while read dir; do
    1.33 -	rmdir $LIVE/$file 2> /dev/null
    1.34 +	rmdir $LIVE/$dir 2> /dev/null
    1.35  done
    1.36  
    1.37  ( cd $BASE ; find * | cpio -o -H newc ) | \
    1.38  	gzip -9 > fs/boot/slitaz/rootfs-base.gz
    1.39  ( cd $LIVE ; find * | cpio -o -H newc ) | \
    1.40  	gzip -9 > fs/boot/slitaz/rootfs-live.gz
    1.41 -
    1.42 +if [ -x /usr/bin/advdef ]; then
    1.43 +	advdef -z4 fs/boot/slitaz/rootfs-base.gz
    1.44 +	advdef -z4 fs/boot/slitaz/rootfs-live.gz
    1.45 +fi
    1.46  
    1.47  # Create raspbian package
    1.48  echo "2.0" > debian-binary
    1.49 @@ -130,6 +132,10 @@
    1.50  
    1.51  set -e
    1.52  
    1.53 +set -- \$(awk '/ \/ / { if (\$1 != "rootfs") print \$1 " " \$3 }' < /proc/mounts)
    1.54 +RDEV=\$1
    1.55 +FSTYPE=\$2
    1.56 +
    1.57  cd /$DESTDIR
    1.58  zcat /boot/slitaz/rootfs-base.gz | cpio -idmu
    1.59  zcat /boot/slitaz/rootfs-core.gz | cpio -idmu
    1.60 @@ -142,19 +148,22 @@
    1.61  
    1.62  if [ ! -f /boot/menu.txt ]; then
    1.63  
    1.64 -for i in i18n keyboard ; di
    1.65 +for i in i18n keyboard ; do
    1.66  	[ -s /etc/sysconfig/\$i ] && . /etc/sysconfig/\$i
    1.67  done
    1.68 -find /$DESTDIR/usr/share/kbd/keymaps | grep /\$KEYTABLE.map.gz\$ && KMAP=\$KEYTABLE
    1.69 +KMAP=
    1.70 +find /$DESTDIR/usr/share/kbd/keymaps | grep /\$KEYTABLE.map.gz\$ && KMAP=kmap=\$KEYTABLE
    1.71  cat > /boot/menu.txt <<EOM
    1.72  title=Raspberry PI boot menu
    1.73  subtitle=Select the OS with ARROW keys and hit RETURN
    1.74  timeout=30
    1.75  default=raspbian
    1.76 -#kmap=\${KMAP:-us}
    1.77 +\$KMAP
    1.78  edittitle=Edit menu
    1.79 +readonly
    1.80  #noedit
    1.81 -#webpath=http://my.home.web.site/pxe/rpi/index.php
    1.82 +#nowebboot
    1.83 +#webpath=http://my.home.web.site/pxe/rpi/index.php http://or.this.one/rpi.txt
    1.84  EOM
    1.85  cp /boot/config.txt /boot/raspbian/
    1.86  mv /boot/\$(sed '/^kernel/!d;s/.*=//' /boot/config.txt) /boot/raspbian/
    1.87 @@ -162,20 +171,17 @@
    1.88  sed -i '/^kernel/d;/^initrd/d' /boot/config.txt
    1.89  echo "kernel=slitaz/kernel.img" >> /boot/config.txt
    1.90  echo "initrd=slitaz/rootfs-base.gz" >> /boot/config.txt
    1.91 -set -- \$(awk '/ \/ / { if (\$1 != "rootfs") print \$1 " " \$3 }')
    1.92 -RDEV=\$1
    1.93 -FSTYPE=\$2
    1.94  echo "root=/dev/null rdinit=/sbin/piboot quiet" > /boot/cmdline.txt
    1.95 -echo "root=/dev/null mount=\$RDEV subroot=$DESTDIR rootwait quiet" > /boot/slitaz/cmdline.txt
    1.96 -if [ -s /$DESTDIR/usr/share/i18n/locales/\${LANG%.*} -a -n "\$KMAP" ]; then
    1.97 -	echo "root=/dev/null lang=\${LANG%.*} kmap=\$KMAP quiet"
    1.98 -else
    1.99 -	echo "root=/dev/null quiet"
   1.100 -fi > /boot/slitaz-base/cmdline.txt
   1.101 +echo "root=/dev/null rdinit=/sbin/pisubroot mount=\$RDEV subroot=$DESTDIR rootwait quiet" > /boot/slitaz/cmdline.txt
   1.102 +L=
   1.103 +[ -s /$DESTDIR/usr/share/i18n/locales/\${LANG%.*} ] && L=lang=\${LANG%.*} 
   1.104 +echo "root=/dev/null \$L \$KMAP quiet" > /boot/slitaz-base/cmdline.txt
   1.105  cp /boot/slitaz-base/cmdline.txt /boot/slitaz-live/cmdline.txt
   1.106  
   1.107  fi
   1.108  
   1.109 +echo "The SliTaz boot menu is available for next (re)boot."
   1.110 +
   1.111  exit 0
   1.112  EOT
   1.113  cat > postrm <<EOT
   1.114 @@ -216,4 +222,5 @@
   1.115  ar rcs slitaz-$VERSION-1_armhf.deb debian-binary control.tar.gz data.tar.gz
   1.116  mv slitaz-$VERSION-1_armhf.deb $CURDIR
   1.117  cd $CURDIR
   1.118 +rm -rf $TMPDIR
   1.119  ls -l slitaz-$VERSION-1_armhf.deb