slitaz-arm rev 67
Bunch of changes to prepare an official release
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Mar 17 01:27:41 2014 +0100 (2014-03-17) |
parents | 9ccff84f2ed7 |
children | a92d7d48dd29 |
files | flavors/base/packages.list flavors/rpi-base/packages.list flavors/rpi-desktop/packages.list rootfs/etc/init.d/rcS rootfs/etc/init.d/system.sh rootfs/etc/inittab rootfs/etc/skel/.Xdefaults rootfs/root/.Xdefaults rootfs/root/.xsession rootfs/usr/bin/slitaz-config rootfs/var/lib/dpkg/status rpi/README rpi/cgi-adm/plugins/rpi_boot/rpi_boot.cgi rpi/release/README rpi/release/install.sh rpi/rootfs/etc/fstab rpi/tazberry sat-rpi |
line diff
1.1 --- a/flavors/base/packages.list Sun Mar 16 16:43:16 2014 +0100 1.2 +++ b/flavors/base/packages.list Mon Mar 17 01:27:41 2014 +0100 1.3 @@ -6,6 +6,7 @@ 1.4 linux 1.5 slitaz-base-files 1.6 slitaz-boot-scripts 1.7 +slitaz-configs-base 1.8 slitaz-tools 1.9 spk 1.10 tazirc
2.1 --- a/flavors/rpi-base/packages.list Sun Mar 16 16:43:16 2014 +0100 2.2 +++ b/flavors/rpi-base/packages.list Mon Mar 17 01:27:41 2014 +0100 2.3 @@ -5,17 +5,22 @@ 2.4 kbd-base 2.5 slitaz-base-files 2.6 slitaz-boot-scripts 2.7 +slitaz-configs-base 2.8 slitaz-tools 2.9 spk 2.10 tazirc 2.11 util-linux-blkid 2.12 util-linux-uuid 2.13 +ncurses 2.14 ncurses-common 2.15 ncursesw 2.16 libcomerr 2.17 e2fsprogs 2.18 +libssl 2.19 +libcrypto 2.20 dialog 2.21 zlib 2.22 dropbear 2.23 joe 2.24 clex 2.25 +lynx
3.1 --- a/flavors/rpi-desktop/packages.list Sun Mar 16 16:43:16 2014 +0100 3.2 +++ b/flavors/rpi-desktop/packages.list Mon Mar 17 01:27:41 2014 +0100 3.3 @@ -6,6 +6,8 @@ 3.4 slitaz-base-files 3.5 slitaz-boot-scripts 3.6 slitaz-tools 3.7 +slitaz-icon 3.8 +slitaz-polar-cursors 3.9 spk 3.10 tazirc 3.11 util-linux-blkid 3.12 @@ -44,6 +46,7 @@ 3.13 libxml2 3.14 acl 3.15 fontconfig 3.16 +jpeg 3.17 pixman 3.18 xorg-libX11 3.19 xorg-libXft 3.20 @@ -68,6 +71,9 @@ 3.21 xorg-libXxf86vm 3.22 xorg-libXfont 3.23 xorg-libXinerama 3.24 +xorg-libXcursor 3.25 +xorg-libXrandr 3.26 +xorg-libXdamage 3.27 xorg-libfontenc 3.28 xorg-xkbcomp 3.29 xorg-server-light 3.30 @@ -76,6 +82,7 @@ 3.31 xorg-xf86-input-fbdev 3.32 xorg-xload 3.33 xorg-xclock 3.34 +ttf-dejavu 3.35 giflib 3.36 tiff 3.37 libid3tag 3.38 @@ -84,3 +91,9 @@ 3.39 imlib2 3.40 hsetroot 3.41 jwm 3.42 +fox 3.43 +adie 3.44 +pathfinder 3.45 +shutterbug 3.46 +calculator 3.47 +links
4.1 --- a/rootfs/etc/init.d/rcS Sun Mar 16 16:43:16 2014 +0100 4.2 +++ b/rootfs/etc/init.d/rcS Mon Mar 17 01:27:41 2014 +0100 4.3 @@ -23,10 +23,9 @@ 4.4 mount -a 4.5 4.6 # Mount /run as tmpfs so runtime data are not written to disk 4.7 -echo -n "Mounting tmpfs filesystem on: /run" 4.8 +echo "Mounting tmpfs filesystem on: /run" 4.9 mount -t tmpfs tmpfs /run 4.10 mount --bind /run /var/run 4.11 -status 4.12 4.13 # Store boot messages to log files 4.14 log="/var/log/boot.log" 4.15 @@ -39,16 +38,15 @@ 4.16 # Use udev and disable hotplug helper (udevd listen to netlink) 4.17 if [ -x "/sbin/udevd" ]; then 4.18 echo "" > /proc/sys/kernel/hotplug 4.19 - echo "Starting udevd & udevadm [trigger settle]..." 4.20 + echo "Starting udev daemon..." 4.21 udevd --daemon 2>/dev/null 4.22 udevadm trigger 4.23 udevadm settle --timeout=120 4.24 else 4.25 # Fallback to Busybox mdev 4.26 - echo "Creating device nodes: /sbin/mdev -s" 4.27 + echo -n "Creating device nodes: /sbin/mdev -s" 4.28 echo "/sbin/mdev" > /proc/sys/kernel/hotplug 4.29 - mdev -s 4.30 - status 4.31 + mdev -s; status 4.32 fi 4.33 4.34 # Clean up /tmp 4.35 @@ -76,14 +74,14 @@ 4.36 if [ "$LOAD_MODULES" ]; then 4.37 colorize 33 "Loading Kernel modules..." 4.38 for mod in ${LOAD_MODULES}; do 4.39 - modprobe -v $mod 4.40 + modprobe -v $mod | tee -a ${log} 4.41 done 4.42 fi 4.43 4.44 # Start all init scripts 4.45 for script in ${RUN_SCRIPTS}; do 4.46 colorize 34 "Processing: /etc/init.d/$script" 4.47 - /etc/init.d/$script 4.48 + /etc/init.d/$script | tee -a ${log} 4.49 done 4.50 4.51 # Start all daemons 4.52 @@ -94,13 +92,6 @@ 4.53 done 4.54 fi 4.55 4.56 -# System time option 4.57 -if fgrep -q 'rdate' /proc/cmdline; then 4.58 - echo -n "Setting system date..." 4.59 - rdate -s 203.129.68.14 2>/dev/null 4.60 - status 4.61 -fi 4.62 - 4.63 newline 4.64 colorize 32 "$MESSAGE" 4.65
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/rootfs/etc/init.d/system.sh Mon Mar 17 01:27:41 2014 +0100 5.3 @@ -0,0 +1,49 @@ 5.4 +#!/bin/sh 5.5 +# 5.6 +# /etc/init.d/system.sh : SliTaz ARM hardware configuration 5.7 +# 5.8 +# This script configures the sound card and screen. It also configures 5.9 +# system language, keyboard and TZ. 5.10 +# 5.11 +. /etc/init.d/rc.functions 5.12 +. /etc/rcS.conf 5.13 + 5.14 +# Activate swap partition 5.15 +if fgrep -q "swap" /etc/fstab; then 5.16 + swapon -a 5.17 +fi 5.18 + 5.19 +# Sound configuration: restore or init 5.20 +if [ -d /proc/asound ]; then 5.21 + if [ -s /var/lib/alsa/asound.state ]; then 5.22 + echo -n "Restoring sound configuration..." 5.23 + alsactl restore; status 5.24 + else 5.25 + echo -n "Initializing sound card..." 5.26 + alsactl init 5.27 + fi 5.28 +fi 5.29 + 5.30 +# Locale config 5.31 +[ -s "/etc/locale.conf" ] || echo "LANG=C" > /etc/locale.conf 5.32 +. /etc/locale.conf 5.33 +echo -n "Setting system locale: $LANG" 5.34 +export LC_ALL=${LANG}; status 5.35 + 5.36 +# Keymap config 5.37 +[ -s "/etc/keymap.conf" ] || echo "us" > /etc/keymap.conf 5.38 +kmap=$(cat /etc/keymap.conf) 5.39 +echo -n "Loading console keymap: $kmap" 5.40 +tazkeymap $kmap >/dev/null; status 5.41 + 5.42 +# Timezone config 5.43 +[ -s "/etc/TZ" ] || echo "UTC" > /etc/TZ 5.44 +tz=$(cat /etc/TZ) 5.45 +echo -n "Setting time zone to: $tz" 5.46 +export TZ=${tz}; status 5.47 + 5.48 +# Xorg configuration: $HOME is not yet set 5.49 +if [ ! -s /etc/X11/xorg.conf ] && [ -x /usr/bin/Xorg ]; then 5.50 + echo "Configuring Xorg server..." && HOME="/root" 5.51 + tazx config-xorg 2>/var/log/xorg.configure.log 5.52 +fi
6.1 --- a/rootfs/etc/inittab Sun Mar 16 16:43:16 2014 +0100 6.2 +++ b/rootfs/etc/inittab Mon Mar 17 01:27:41 2014 +0100 6.3 @@ -5,7 +5,7 @@ 6.4 # SHell invocations for selected ttys 6.5 tty1::respawn:/sbin/getty 38400 tty1 6.6 tty2::respawn:/sbin/getty 38400 tty2 6.7 -tty3::askfirst:-/bin/sh 6.8 +tty2::respawn:/sbin/getty 38400 tty3 6.9 6.10 # Stuff to do before rebooting or shutting down 6.11 ::restart:/etc/init.d/shutdown.sh
7.1 --- a/rootfs/etc/skel/.Xdefaults Sun Mar 16 16:43:16 2014 +0100 7.2 +++ b/rootfs/etc/skel/.Xdefaults Mon Mar 17 01:27:41 2014 +0100 7.3 @@ -14,7 +14,7 @@ 7.4 xterm*faceName: DejaVu Sans Mono 7.5 xterm*faceNameDoublesize:WenQuanYi WenQuanYi Micro Hei Mono-12 7.6 xterm*faceSize: 12 7.7 -xterm*utf8: 2 7.8 +xterm*utf8: 2 7.9 xterm*eightBitInput: true 7.10 7.11 ! Xload settings.
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 8.2 +++ b/rootfs/root/.Xdefaults Mon Mar 17 01:27:41 2014 +0100 8.3 @@ -0,0 +1,23 @@ 8.4 +!~/.Xdefault: Control the behavior of x-clients. 8.5 +! 8.6 + 8.7 +! Xcursor theme (~/.icons). 8.8 +! 8.9 +Xcursor.theme: slitaz-polar 8.10 + 8.11 +! XTerm settings. 8.12 +! 8.13 +xterm*background: #000000 8.14 +xterm*foreground: #ffffff 8.15 +xterm*cursorColor: #d66018 8.16 +xterm*scrollBar: off 8.17 +xterm*faceName: DejaVu Sans Mono 8.18 +xterm*faceNameDoublesize:WenQuanYi WenQuanYi Micro Hei Mono-12 8.19 +xterm*faceSize: 12 8.20 +xterm*utf8: 2 8.21 +xterm*eightBitInput: true 8.22 + 8.23 +! Xload settings. 8.24 +! 8.25 +!xload*background: black 8.26 +!xload*foreground: lightblue
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 9.2 +++ b/rootfs/root/.xsession Mon Mar 17 01:27:41 2014 +0100 9.3 @@ -0,0 +1,5 @@ 9.4 +# ~/.xsession: Start X window session manually on your system (startx). 9.5 +# 9.6 +Xorg & 9.7 +#xterm & 9.8 +exec jwm
10.1 --- a/rootfs/usr/bin/slitaz-config Sun Mar 16 16:43:16 2014 +0100 10.2 +++ b/rootfs/usr/bin/slitaz-config Mon Mar 17 01:27:41 2014 +0100 10.3 @@ -32,18 +32,25 @@ 10.4 echo "root:$passwd" | chpasswd --md5 10.5 } 10.6 10.7 +set_date() { 10.8 + clear && newline 10.9 + echo -n "Old date:"; date 10.10 + rdate -s 203.129.68.14 2>/dev/null 10.11 + echo -n "New date:"; date 10.12 + sleep 4 10.13 +} 10.14 + 10.15 # Main Dialog menu 10.16 main_box() { 10.17 dialog \ 10.18 - --clear \ 10.19 - --title "$title" \ 10.20 - --ok-label "Exec" \ 10.21 - --cancel-label "Quit" \ 10.22 + --clear --title "$title" \ 10.23 + --ok-label "Exec" --cancel-label "Quit" \ 10.24 --menu "" ${height} ${width} 14 \ 10.25 "keyboard" "$(gettext 'System keyboard setting')" \ 10.26 "locale" "$(gettext 'System language setting')" \ 10.27 "root-passwd" "$(gettext 'Change root password')" \ 10.28 -"quit" "$(gettext 'Exit from TazBerry tool')" 2>${tmp} 10.29 +"set-date" "$(gettext 'Set system date from the web')" \ 10.30 +"quit" "$(gettext 'Exit from SliTaz Config')" 2>${tmp} 10.31 10.32 # Handle options 10.33 opt=${?} 10.34 @@ -54,14 +61,11 @@ 10.35 # Handle actions 10.36 action=$(cat $tmp) 10.37 case "$action" in 10.38 - keyboard) 10.39 - tazkeymap ;; 10.40 - locale) 10.41 - tazlocale ;; 10.42 - root-passwd) 10.43 - root_passwd ;; 10.44 - quit) 10.45 - rm -rf ${tmpdir} && exit 0 ;; 10.46 + keyboard) tazkeymap ;; 10.47 + locale) tazlocale ;; 10.48 + root-passwd) root_passwd ;; 10.49 + set-date) set_date ;; 10.50 + quit) rm -rf ${tmpdir} && exit 0 ;; 10.51 esac 10.52 } 10.53
11.1 --- a/rpi/README Sun Mar 16 16:43:16 2014 +0100 11.2 +++ b/rpi/README Mon Mar 17 01:27:41 2014 +0100 11.3 @@ -37,14 +37,14 @@ 11.4 better security with file permissions. When ready and you know your disk 11.5 path (sat-rpi ls-dev) you can install SliTaz RPi with: 11.6 11.7 -# sat-rpi install --dev=/dev/sdX 11.8 +# sat-rpi install 11.9 11.10 11.11 Sat RPi commands and options 11.12 -------------------------------------------------------------------------------- 11.13 To get the list of commands and options with a short help simply run: 11.14 11.15 -$ sat-rpi 11.16 +$ sat-rpi help 11.17 11.18 --turbo: The forced turbo option turns off the dynamic clocks and runs the 11.19 Raspberry Pi constantly at the highest arm_freq.
12.1 --- a/rpi/cgi-adm/plugins/rpi_boot/rpi_boot.cgi Sun Mar 16 16:43:16 2014 +0100 12.2 +++ b/rpi/cgi-adm/plugins/rpi_boot/rpi_boot.cgi Mon Mar 17 01:27:41 2014 +0100 12.3 @@ -1,11 +1,11 @@ 12.4 #!/bin/sh 12.5 # 12.6 -# TazBerry CGI Plugin - Skeleton 12.7 +# TazBerry CGI Plugin - Boot configs and options 12.8 # 12.9 12.10 if [ "$(GET rpi_boot)" ]; then 12.11 html_header "Boot" 12.12 - echo "<h1>SliTaz RPi Boot</h1>" 12.13 + echo "<h1>SliTaz Raspberry Pi Boot</h1>" 12.14 12.15 cat << EOT 12.16 <p> 12.17 @@ -15,12 +15,12 @@ 12.18 12.19 <pre> 12.20 12.21 -Kernel boot parameters 12.22 +Kernel boot parameters [ <a href="$script?editor&file=/boot/cmdline.txt">Edit</a> ] 12.23 -------------------------------------------------------------------------------- 12.24 $(cat /boot/cmdline.txt 2>/dev/null) 12.25 12.26 12.27 -RPi configuration file 12.28 +RPi configuration file [ <a href="$script?editor&file=/boot/config.txt">Edit</a> ] 12.29 -------------------------------------------------------------------------------- 12.30 $(cat /boot/config.txt 2>/dev/null) 12.31 12.32 @@ -29,6 +29,7 @@ 12.33 -------------------------------------------------------------------------------- 12.34 $(ls -1 /boot) 12.35 </pre> 12.36 + 12.37 EOT 12.38 12.39 html_footer
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/rpi/release/README Mon Mar 17 01:27:41 2014 +0100 13.3 @@ -0,0 +1,18 @@ 13.4 +SliTaz Raspberry Pi - Cooking/Release - http://arm.slitaz.org/rpi 13.5 +================================================================================ 13.6 + 13.7 + 13.8 +boot/ : Must be copied to a FAT32 partition 13.9 +rootfs/ : Must be copied to an ext4 or btrfs partition 13.10 + 13.11 + 13.12 +Installation script 13.13 +------------------- 13.14 +Be sure the SD card has got 3 partitions (boot,swap,root). Then you simply have 13.15 +to run the install.sh script from this SliTaz Raspberry Pi release directory: 13.16 + 13.17 +# ./install.sh 13.18 + 13.19 + 13.20 +================================================================================ 13.21 +
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 14.2 +++ b/rpi/release/install.sh Mon Mar 17 01:27:41 2014 +0100 14.3 @@ -0,0 +1,93 @@ 14.4 +#!/bin/sh 14.5 +# 14.6 +# SliTaz Raspberry Pi Release - SD card installation 14.7 +# 14.8 +# Copyright (C) 2012-2014 SliTaz ARM - BSD License 14.9 +# Author: Christophe Lincoln <pankso@slitaz.org> 14.10 +# 14.11 + 14.12 +dev="$1" 14.13 +boot="/media/rpi/boot" 14.14 +root="/media/rpi/rootfs" 14.15 + 14.16 +# Only for root 14.17 +if [ $(id -u) != 0 ]; then 14.18 + echo "You must be root to install TazBerry" && exit 0 14.19 +fi 14.20 + 14.21 +# Run only in a SliTaz ARM release tarball with boot/ and rootfs/ 14.22 +[ -d "./boot" ] || exit 1 14.23 +[ -d "./rootfs" ] || exit 1 14.24 + 14.25 +# Usage: colorize NB "Message" 14.26 +colorize() { 14.27 + echo -e "\\033[1;${1}m${2}\\033[0;39m" 14.28 +} 14.29 + 14.30 +separator() { 14.31 + echo "================================================================================" 14.32 +} 14.33 + 14.34 +status() { 14.35 + if [ "$?" = 0 ]; then 14.36 + colorize 32 " OK" 14.37 + else 14.38 + colorize 31 " ERROR" 14.39 + fi 14.40 +} 14.41 + 14.42 +umount_sd() { 14.43 + umount /dev/${dev}1 2>/dev/null || exit 1 14.44 + umount /dev/${dev}3 2>/dev/null || exit 1 14.45 +} 14.46 + 14.47 +# 14.48 +# Let's start 14.49 +# 14.50 +clear 14.51 +cat << EOT 14.52 + 14.53 +$(colorize 35 "SliTaz Raspberry Pi Installation") 14.54 +$(separator) 14.55 +Before processing please read the SliTaz ARM/RPi installation howto on: 14.56 + 14.57 + http://arm.slitaz.org/rpi 14.58 + 14.59 +EOT 14.60 + 14.61 +# SD card check 14.62 +[ "$dev" ] || echo -n "SD card device name (ex sdc): "; read dev 14.63 +[ "$dev" ] || exit 1 14.64 +if ! fdisk -l | grep -q "/dev/${dev}3"; then 14.65 + echo "Unable to find: /dev/${dev}3"; exit 1 14.66 +fi 14.67 + 14.68 +# Mount 14.69 +if mount | grep -q "^/dev/$dev[1-3]"; then 14.70 + umount_sd 14.71 +fi 14.72 +echo -n "Mounting: /dev/$dev partitions..." 14.73 +mkdir -p ${boot} ${root} 14.74 +mount /dev/${dev}1 ${boot} || exit 1 14.75 +mount /dev/${dev}3 ${root} || exit 1; status 14.76 + 14.77 +# Clean up 14.78 +echo -n "Cleaning: filesystem directories..." 14.79 +for dir in bin dev etc lib media mnt proc sbin sys tmp usr var run 14.80 +do 14.81 + rm -rf ${root}/${dir} 14.82 +done; status 14.83 + 14.84 +# Install 14.85 +echo -n "Installing: boot files..." 14.86 +cp -a boot/* ${boot}; status 14.87 +echo -n "Installing: rootfs files..." 14.88 +cp -a rootfs/* ${root}; status 14.89 + 14.90 +# Unmount 14.91 +echo -n "Unmounting: RPi sdcard..." 14.92 +umount_sd; status 14.93 +separator 14.94 +echo "Insert the SD card into your Raspberry Pi and boot!" 14.95 +echo "" 14.96 +exit 0
15.1 --- a/rpi/rootfs/etc/fstab Sun Mar 16 16:43:16 2014 +0100 15.2 +++ b/rpi/rootfs/etc/fstab Mon Mar 17 01:27:41 2014 +0100 15.3 @@ -1,7 +1,8 @@ 15.4 # /etc/fstab: Slitaz ARM static filesystems. 15.5 # 15.6 -proc /proc proc defaults 0 0 15.7 -sysfs /sys sysfs defaults 0 0 15.8 -/dev/mmcblk0p1 /boot auto noauto,noatime 1 2 15.9 -/dev/mmcblk0p2 none swap sw 0 0 15.10 -/dev/mmcblk0p3 / btrfs noatime 0 1 15.11 +proc /proc proc defaults 0 0 15.12 +sysfs /sys sysfs defaults 0 0 15.13 +tmpfs /dev/shm tmpfs defaults 0 0 15.14 +/dev/mmcblk0p1 /boot vfat noatime 1 2 15.15 +/dev/mmcblk0p2 swap swap defaults 0 0 15.16 +/dev/mmcblk0p3 / btrfs noatime 0 1
16.1 --- a/rpi/tazberry Sun Mar 16 16:43:16 2014 +0100 16.2 +++ b/rpi/tazberry Mon Mar 17 01:27:41 2014 +0100 16.3 @@ -43,12 +43,12 @@ 16.4 mem_used=$(free -m | fgrep "Mem:" | awk '{print $3}') 16.5 mem_used_pct=$(( ( ${mem_used} * 100) / ${mem_total} )) 16.6 cat << EOT 16.7 -$(gettext 'Kernel') : $(uname -snrm) 16.8 -$(gettext 'Uptime') : $(uptime | awk '{print $3}' | sed s"/:/h /" | sed s"/,/min/") 16.9 -$(gettext 'Network IP') : $(echo $ip | awk '{print $1}') 16.10 -$(gettext 'CPU heat') : $(awk '{printf "%3.1f C\n", $1/1000}' /sys/class/thermal/thermal_zone0/temp) 16.11 -$(gettext 'Processes') : $(ps | wc -l) 16.12 -Memory usage : ${mem_used_pct}% 16.13 +$(gettext 'Kernel') : $(uname -snrm) 16.14 +$(gettext 'Uptime') : $(uptime | awk '{print $3}' | sed s"/:/h /" | sed s"/,/min/") 16.15 +$(gettext 'Network IP') : $(echo $ip | awk '{print $1}') 16.16 +$(gettext 'CPU heat') : $(awk '{printf "%3.1f C\n", $1/1000}' /sys/class/thermal/thermal_zone0/temp) 16.17 +$(gettext 'Processes') : $(ps | wc -l) 16.18 +$(gettext 'Memory usage') : ${mem_used_pct}% 16.19 EOT 16.20 } 16.21
17.1 --- a/sat-rpi Sun Mar 16 16:43:16 2014 +0100 17.2 +++ b/sat-rpi Mon Mar 17 01:27:41 2014 +0100 17.3 @@ -20,18 +20,15 @@ 17.4 rpi_git="$rpi/git" 17.5 kernel="$rpi_git/linux" 17.6 firmware="$rpi_git/firmware" 17.7 -tools="$rpi_git/tools" 17.8 +dev="$2" 17.9 17.10 # URLs 17.11 rpi_mirror="http://mirror.slitaz.org/arm/rpi/" 17.12 fw_url="https://github.com/raspberrypi/firmware/raw/master/boot/" 17.13 -tools_url="https://raw.github.com/raspberrypi/tools/master/mkimage/" 17.14 rpi_git_url="git://github.com/raspberrypi/" 17.15 17.16 # Lists 17.17 fwlist="bootcode.bin fixup.dat start.elf" 17.18 -toolslist="imagetool-uncompressed.py args-uncompressed.txt \ 17.19 -boot-uncompressed.txt" 17.20 17.21 # 17.22 # Functions 17.23 @@ -56,12 +53,11 @@ 17.24 clean Clean the current work directory 17.25 17.26 $(boldify "Options:") 17.27 - --up Update for commands: firmware, tools, kernel 17.28 + --up Update for commands: firmware and kernel 17.29 --turbo Force the RPi to run at the highest arm_freq 17.30 --oclock= Set the RPi overclocking mode in config.txt 17.31 --vc Install the RPi VC libraries in /opt/vc 17.32 --nosat Don't regenerate the distro with sat 17.33 - --git Remove RPi git files on clean up 17.34 17.35 EOT 17.36 } 17.37 @@ -71,7 +67,7 @@ 17.38 } 17.39 17.40 header() { 17.41 - newline && boldify "$@" && separator 17.42 + newline && colorize 35 "$@" && separator 17.43 } 17.44 17.45 # Get minimal RPi firmware 17.46 @@ -132,6 +128,11 @@ 17.47 EOT 17.48 } 17.49 17.50 +umount_sd() { 17.51 + umount /dev/${dev}1 2>/dev/null || exit 1 17.52 + umount /dev/${dev}3 2>/dev/null || exit 1 17.53 +} 17.54 + 17.55 # 17.56 # Commands 17.57 # 17.58 @@ -151,10 +152,8 @@ 17.59 rpiboot="/media/rpi/boot" 17.60 rpiroot="/media/rpi/rootfs" 17.61 header "SliTaz Raspberry Pi install" 17.62 - if [ ! "$dev" ]; then 17.63 - echo "Missing: --dev= cmdline option" 17.64 - newline && exit 1 17.65 - fi 17.66 + [ "$dev" ] || echo -n "SD card device name (ex sdc): "; read dev 17.67 + [ "$dev" ] || exit 1 17.68 17.69 # Store sdcard partition(s) list 17.70 fdisk -l /dev/${dev} | grep "^/dev/$dev" | awk '{print $1}' \ 17.71 @@ -168,8 +167,7 @@ 17.72 # Mount sdcard 17.73 if mount | grep -q "^/dev/$dev[1-3]"; then 17.74 debug "Unmounting: /dev/$dev" 17.75 - umount /dev/${dev}1 2>/dev/null || exit 1 17.76 - umount /dev/${dev}3 2>/dev/null || exit 1 17.77 + umount_sd 17.78 fi 17.79 echo -n "Mounting: /dev/$dev partitions" 17.80 mkdir -p ${rpiboot} ${rpiroot} 17.81 @@ -188,12 +186,12 @@ 17.82 17.83 # Unmount 17.84 echo -n "Unmounting: RPi sdcard" 17.85 - umount ${rpiboot} 17.86 - umount ${rpiroot} 17.87 - status 17.88 + umount_sd; status 17.89 17.90 rm -f ${data}/sdcard.part 17.91 - separator && newline ;; 17.92 + separator 17.93 + echo "Insert the SD card into your Raspberry Pi and boot!" 17.94 + newline ;; 17.95 17.96 ls-dev) 17.97 newline 17.98 @@ -219,7 +217,7 @@ 17.99 newline 17.100 fi 17.101 17.102 - boldify "SliTaz Raspberry Pi distro" 17.103 + colorize 35 "SliTaz Raspberry Pi distro" 17.104 separator 17.105 mkdir -p ${boot} 17.106 17.107 @@ -245,7 +243,7 @@ 17.108 done 17.109 status 17.110 17.111 - # TazBerry ncurses and CGI data/plugins 17.112 + # TazBerry 17.113 echo -n "Copying: TazBerry..." 17.114 cp -f ${rpi}/tazberry ${rootfs}/usr/bin 17.115 cp -a ${rpi}/cgi-adm/* ${rootfs}/var/www/adm 17.116 @@ -311,8 +309,7 @@ 17.117 check_root 17.118 install="$data/linux-install" 17.119 if [ ! -d "/cross/$arch" ]; then 17.120 - error "Missing cross toolchain in: /cross/$arch" 17.121 - exit 1 17.122 + error "Missing cross toolchain in: /cross/$arch" && exit 1 17.123 fi 17.124 17.125 # Kernel source 17.126 @@ -379,9 +376,9 @@ 17.127 17.128 get-fw) 17.129 get_fw ;; 17.130 - 17.131 - get-tools) 17.132 - get_tools ;; 17.133 + 17.134 + clone-fw) 17.135 + clone_fw ;; 17.136 17.137 get-linux) 17.138 # Precook RPi kernel 17.139 @@ -439,9 +436,6 @@ 17.140 mkdir -p ${arch} 17.141 cp -a ${name}-${vers}/${arch}/* ${arch} 17.142 echo "Tools path: /cross/${arch}/tools/bin" ;; 17.143 - 17.144 - clone-fw) 17.145 - clone_fw ;; 17.146 17.147 release) 17.148 # Used to release official SliTaz RPi images 17.149 @@ -454,30 +448,8 @@ 17.150 dsize=$(du -sh $distro | awk '{print $1}' | cut -d "." -f 1) 17.151 rm -rf ${dname} && mkdir ${dname} 17.152 cp -a boot rootfs ${dname} 17.153 - cat > ${dname}/README << EOT 17.154 -SliTaz Raspberry Pi - $flavor-$(date +%Y%m%d) - http://arm.slitaz.org/rpi 17.155 --------------------------------------------------------------------------------- 17.156 - 17.157 -boot/ : Must be copied to a FAT32 partition 17.158 -rootfs/ : Must be copied to a ext4 or btrfs partition 17.159 - 17.160 -Manual Installation. Assuming the sdcard is /dev/sdc and has got 3 17.161 -partitions (boot,swap,root). Mount the sdcard, copy files, unmount: 17.162 - 17.163 - # mkdir -p /media/rpi/boot /media/rpi/root 17.164 - 17.165 - # mount /dev/sdc1 /media/rpi/boot 17.166 - # mount /dev/sdc3 /media/rpi/root 17.167 - 17.168 - # cp -a boot/* /media/rpi/boot 17.169 - # cp -a rootfs/* /media/rpi/root 17.170 - 17.171 - # umount /media/rpi/boot 17.172 - # umount /media/rpi/root 17.173 - 17.174 --------------------------------------------------------------------------------- 17.175 - 17.176 -EOT 17.177 + echo "Copying: SliTaz release files" 17.178 + cp ${rpi}/release/* ${dname} 17.179 echo "Creating: ${dname}.tar.xz" 17.180 tar -cJf ${dname}.tar.xz ${dname} 17.181 echo "Creating: ${dname}.md5" 17.182 @@ -486,8 +458,8 @@ 17.183 17.184 clean) 17.185 echo "Cleaning: $rpi" 17.186 - rm -rf ${data} 17.187 - [ "$git" ] && rm -rf ${rpi_git} ;; 17.188 - *) usage ;; 17.189 + rm -rf ${data} ${rpi_git} ;; 17.190 + 17.191 + *|*help) usage ;; 17.192 esac 17.193 exit 0