add SZ 1.52 updater files
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 27 Mar 2013 15:58:57 +0000 (17:58 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 27 Mar 2013 15:58:57 +0000 (17:58 +0200)
hotfix_updater/superzaxxon/PXML.xml [new file with mode: 0644]
hotfix_updater/superzaxxon/index.html [new file with mode: 0644]
hotfix_updater/superzaxxon/run.sh [new file with mode: 0755]
hotfix_updater/superzaxxon/updater.png [new file with mode: 0644]
hotfix_updater/superzaxxon/updater.sh [new file with mode: 0755]

diff --git a/hotfix_updater/superzaxxon/PXML.xml b/hotfix_updater/superzaxxon/PXML.xml
new file mode 100644 (file)
index 0000000..44459d2
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PXML xmlns="http://openpandora.org/namespaces/PXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PXML_schema.xsd">
+
+  <package id="szupdater1.openpandora.org">
+    <titles>
+      <title lang="en_US">Pandora SuperZaxxon updater</title>
+    </titles>
+    <version major="1" minor="7" release="0" build="0" type="release"/>
+    <author name="OpenPandora Team" website="http://www.openpandora.org"/>
+  </package>
+  <application id="szupdater1.openpandora.org">
+
+    <titles>
+      <title lang="en_US">Pandora SuperZaxxon updater</title>
+    </titles>
+    <title lang="en_US">Pandora SuperZaxxon updater</title>
+    <exec command="./run.sh"/>
+    <icon src="updater.png"/>
+    <info name="SuperZaxxon updater readme" type="text/html" src="index.html"/>
+
+    <descriptions>
+      <description lang="en_US">SuperZaxxon firmware updater.</description>
+    </descriptions>
+    <author name="OpenPandora Team" website="http://www.openpandora.org"/>
+    
+    <version major="1" minor="7" release="0" build="0"/>
+    <licenses>
+      <license name="other" />
+    </licenses>
+    <categories>
+      <category name="System">
+      </category>
+    </categories>
+  </application>
+
+</PXML>
diff --git a/hotfix_updater/superzaxxon/index.html b/hotfix_updater/superzaxxon/index.html
new file mode 100644 (file)
index 0000000..d6947a9
--- /dev/null
@@ -0,0 +1,113 @@
+<html>
+  <head>
+    <title>Updater for SuperZaxxon</title>
+  </head>
+  <body>
+<p><b>Information</b></p><p>This file will update your Pandora OS. Simply run it as any normal PND. After installation, you can delete it.<br />This pack is intended for SuperZaxxon firmware line, it will not work properly if applied on older firmwares.
+<!---
+It can be installed on a fresh OS as well as on an OS which has a previous Hotfix already installed.<br />
+A previous hotfix does NOT need to be installed - Hotfix Pack 5 includes all stuff from the previous Hotfixes as well. </p>
+<p><br />This pack updates the following:<br /><br />
+<i>Hotfix 1:</i><br />
+* Kernel: Fixed a bug that caused the Linux Systemtimer to halt sometimes<br />
+* Included missing packages: python-shell_2.6.4, python-pygtk_2.16.0, python-pycairo_1.4.0, gnome-vfs-plugin-http_2.24.1, gnome-vfs-plugin-ftp_2.24.1<br />
+<br />
+<i>Hotfix 2:</i><br />
+* Bluetooth: Disabling and restoring state on startup now working properly<br />
+* XFCE4: When switching from MiniMenu to XFCE4, the settings are now properly loaded<br />
+* Brightness-State: When shutting down, a brightness level of 0 is not saved<br />
+* MiniMenu: Fixed caching and closed a memory leak<br />
+* Automount: Now using umask 0 and noatime. Unmounting is using Lazy Mount.<br />
+* Interfaces: Fixed the file. Now WiFi isn't disturbed by usb-network anymore<br />
+* WiFi: LEDs now working<br />
+* Kernel: Video: don't force waiting for refresh<br />
+* MiniMenu: XFCE4-Apps now included in MiniMenu<br />
+* New: Boost, Lua5.1 and Evince<br />
+* New: Script to change the LCD refresh rate from 50 / 60 Hz (ideal for emulators)<br />
+* Some typo fixes and general tweaks<br />
+<br />
+<i>Hotfix 3:</i><br />
+* Kernel: Fixed problem with broken sound on some units. Also improved ALSA Buffer Underrun problems<br />
+* Kernel Modules: Added USB Sound and Midi Modules as well as the TUN/TAN-Module<br />
+* U-Boot: Fixed LCD timings on Reset (which caused weird dots around the Logo on reboot / Reset)<br />
+* U-Boot: Added serial out via USB (ideal for debugging when trying to port new OSes to the Pandora)<br />
+* MiniMenu: Added automatic Refresh on SD Card insert and quick navigation using keyboard letters<br />
+* Battery-Settings: LED now starts blinking at 10% and shuts down at 5%. The previous values were too short.<br />
+* Bugfix: op_fbrunapp had some problems with command line parameters. That's now fixed.<br />
+* Services: Removed unneeded services from Startup - also services most users don't need (like dropbear, samba, etc.) They can be re-enabled with the new Startup-Settings<br />
+* Startup-Settings: Added enabling / disabling services<br />
+* New: Added Mass Storage mode via Mini-USB (can be enabled in the System-Menu)<br />
+* Automount: Now using Label names (if the card has one) instead of mmcblk*<br />
+* Automount: Now using Dirsync instead of sync with 2s Buffer flush. This increases SD Write speed A LOT. However, be sure to wait at least 2 seconds before removing your SD Card after you saved data<br />
+* Not yet fixed: PNDs will not run if they have a space in the filename or path (do not use spaces in your SD-Card labels for now!)<br />
+* pnd_run-Script: Changed a few things to make it compatible with spaces in filenames (still needs some other fix). Thanks to Ivanovic.<br />
+* Bluetooth-Script: Fixed save / restore settings on startup (thanks to urjaman)<br />
+<br />
+<i>Hotfix 4:</i><br />
+* Kernel: Added Bluetooth patch by urjaman. PAN (bluetooth internet connections) work fine now.<br />
+* WiFi: Fixed the problem where you could not reconnect after you lost a connections<br />
+* xf86-video-omapfb: add pandora specific screen blanking<br />
+* Nub Mousebuttons: Moving down is now middle mousebuttons. Recognition of mouseclicks with the nub has been enhanced (patch by urjaman)<br />
+* Pandora-Scripts: The internal scripts (CPU-Speed, Startup-Manager, etc.) have icons now.<br />
+* Pandora-Scripts: Added simple TV-Out script.<br />
+* Lid: Opening / Closing will not affect the powersave mode anymore.<br />
+* Enhanced brightness scripts (made the more linear)<br />
+* Powersave mode: Fixed the CPU Speed setting<br />
+* pnd_run: Added support for clockspeed setting<br />
+* libpnd: Support spaces in pathnames and PND-Names.<br />
+* Updated to a more recent XFCE4-Version<br /><br />
+* First-Run-Wizard and Time / Date script: Fixed bug of not-appearing calendar<br />
+* New default config for vim (thanks to Nils Kneuper (Ivanovic))<br />
+* Python: Added python-misc and python-modules<br />
+* New lib: libaudiofile0 now included<br />
+* MiniMenu: New config dialogue included (will be improved in the future)<br />
+* udev 151: add rule to reserve fb2<br />
+* Leds: Fix TWL4030 PWM LED driver (thanks to Urja Rannikko)<br />
+* Pandora misc: HACK to change OPP level according to set mhz (thanks to Urja Rannikko) + OPP limiter added (by notaz)<br />
+* OMAP: DSS2: make filter coefficient tables human readable, DSS2: add some hackish FIR filter coefficient access<br />
+<br />
+<i>Hotfix 5:</i><br />
+<br />
+Fixes:<br />
+* LCD-Settings: Fixed the bug where the user could delete the default gamma setting<br />
+* Mass Storage Settings: Fixed a bug where it didn't remount the card under certain conditions<br />
+* First Run Wizard + Date / Time-Setting: Fixed timezone-selection.<br />
+* WiFi: New driver and firmware version with a lot of fixes (Yuri Ershov, notaz and Denis 'GNUtoo' Carikli)<br />
+* xf86-video-omapfb: Handle cycle/forcer events better<br />
+* Automount: Unmount from Thunar / XFCE4 is now possible<br />
+* Low-Power-Mode: Speed now set to 125 MHz (works more stable and doesn't use more power)<br />
+* Lid Closing: Disabled LCD Blanking, since that has issues with some programs<br />
+* Brightness-Buttons: Changed values so that the screen doesn't flicker anymore<br />
+* pnd_run: Lots of fixes and cleanups (sebt3)<br />
+* pnd_run: Fixed running of directories with PXMLs inside (Paul Brook)<br />
+* pnd_run.sh: Remove empty AUFS-Directories after unmounting (thanks to sebt3)<br />
+* U-Boot: Add WiFi reset on boot (fixes occassional power eating from WiFi Chip even if it was switched off)<br />
+* Fixed broken OPP after the unit crashed (patch by urjaman)<br />
+* Included latest SGX PowerVR drivers (thanks to notaz)<br />
+* MiniMenu: A lot of bugfixes and optimizations.<br />
+* omap3-sgx-modules: backport spinlock fix from omap3630 (thanks to notaz)<br />
+* mount.sh: Small optimization (changed rm to rmdir)<br />
+* MiniMenu: Now using only 3-4% CPU when idling<br />
+* Kernel: Various fixed, especially the errors when copying from one SD Card to the other one should be fixed (thanks to urjaman and notaz).<br />
+<br />
+New Features:<br />
+* LCD-Settings: Added Video-FIR-Selector (current and default one)<br />
+* Applications: Removed Pidgin, Gnumeric, AbiWord, Clawsmail (use the PNDs for sebt3!)<br />
+* Applications: Added GCalcTool (Calculator)<br />
+* Tools: Added xdotool<br />
+* CPU-Speed: Now configurable using /etc/pandora/conf/cpu.conf or using the new CPU-Settings-Editor<br />
+* Pandora-State: Can now set a default CPU Speed during startup<br />
+* XFCE4: Enabled Icons in Startmenu, added Pandora-Splashscreen<br />
+* pnd_run: Script now popups a message if mount fails (sebt3)<br />
+* U-Boot: Pandora Menu: Always add serial option (for sure)<br />
+* Libraries: Added libsamplerate<br />
+* MiniMenu: Added new config options (i.e. do not quit on app run, remove detail panel, etc.)<br />
+* MiniMenu: Added Subcategories in the Grid (for quicker browsing).<br />
+* MiniMenu: Included OVR-Editor (so you can rename, move or change other settings of PNDs)<br />
+* MiniMenu: Added Directory Browser<br />
+* OS: Added Version number to Splashscreen<br />
+<br />
+--->
+
+</body>
+</html>
diff --git a/hotfix_updater/superzaxxon/run.sh b/hotfix_updater/superzaxxon/run.sh
new file mode 100755 (executable)
index 0000000..c114351
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+t=`which terminal`
+if [ -z "$t" ]; then
+  zenity --error --text='terminal is missing.'
+  exit 1
+fi
+
+gksudo -m "Firmware updater requires root permissions, please enter your password" id
+exec sudo -n terminal -x sh -c ./updater.sh
diff --git a/hotfix_updater/superzaxxon/updater.png b/hotfix_updater/superzaxxon/updater.png
new file mode 100644 (file)
index 0000000..ed2ec02
Binary files /dev/null and b/hotfix_updater/superzaxxon/updater.png differ
diff --git a/hotfix_updater/superzaxxon/updater.sh b/hotfix_updater/superzaxxon/updater.sh
new file mode 100755 (executable)
index 0000000..9e72b9b
--- /dev/null
@@ -0,0 +1,146 @@
+#!/bin/sh
+
+logfile=/tmp/updater.log
+oldkernel=/boot/uImage-3
+newkernel=boot/uImage-3
+
+if ! grep -q '[[:blank:]]/[[:blank:]]*ubifs' /proc/mounts; then
+  # prefer alternative locations when running from SD
+  test -e /media/PANDORABOOT/uImage && oldkernel=/media/PANDORABOOT/uImage
+  test -e /media/PANDORABOOT/uImage-3 && oldkernel=/media/PANDORABOOT/uImage-3
+  test -e /media/BOOT/uImage && oldkernel=/media/BOOT/uImage
+  test -e /media/BOOT/uImage-3 && oldkernel=/media/BOOT/uImage-3
+fi
+
+if ! test -e $oldkernel; then
+  zenity --error --text "SuperZaxxon Final firmware required, sorry."
+  exit 1
+fi
+
+if ! test -e $newkernel || ! test -d lib || ! test -d ipk; then
+  zenity --error --text "Required files are missing, perhaps this .pnd got corrupted."
+  exit 1
+fi
+
+root_free=`df | grep '/$' | sed -e '2~1d' | awk '{print $4}'`
+if [ "$root_free" -lt 2000 ]; then
+  zenity --error --text "There is not enough space left in root partition.
+This usually means your NAND is almost full.
+
+Delete some files and try again, or just do a full reflash."
+  exit 1
+fi
+
+if [ "`id -u`" != "0" ]; then
+  zenity --error --text "Root permissions required."
+  exit 1
+fi
+
+get_ver()
+{
+  dd if=$1 bs=32 skip=1 count=1 2> /dev/null \
+    | strings | sed -e 's/.*\([0-9]\.[0-9]\.[0-9]*\).*/\1/'
+}
+
+get_vercode()
+{
+  ver1=`echo $1 | awk -F. '{printf $1}'`
+  ver2=`echo $1 | awk -F. '{printf $2}'`
+  ver3=`echo $1 | awk -F. '{printf $3}'`
+  echo $((($ver1 << 16) + ($ver2 << 8) + $ver3))
+}
+
+log()
+{
+  echo -en "\033[0;32m"
+  echo "$@"
+  echo -en "\033[0m"
+
+  echo "$@" >> $logfile
+}
+
+echo > $logfile
+
+kernel_failed_detect=true
+kernel_ask_newer=false
+kernel_do_update=false
+kernel_reboot_needed=false
+
+oldver=`get_ver $oldkernel`
+newver=`get_ver $newkernel`
+oldvcode=`get_vercode $oldver`
+newvcode=`get_vercode $newver`
+
+# echo $oldver $newver $oldvcode $newvcode
+
+if [ -n "$oldver" -a -n "$newver" -a -n "$oldvcode" -a -n "$newvcode" ]; then
+  if [ "$oldvcode" -lt "$(((3 << 16) + (2 << 8) + 21))" ]; then
+    # a version before SZ-Final
+    zenity --error --text "SuperZaxxon Final firmware required, sorry."
+    exit 1
+  fi
+
+  if [ "$oldvcode" -eq "$newvcode" ]; then
+    oldtime=`stat -c %Y $oldkernel`
+    newtime=`stat -c %Y $newkernel`
+    if [ "$oldtime" -gt "$newtime" ]; then
+      kernel_ask_newer=true
+    else
+      kernel_failed_detect=false
+      kernel_do_update=true
+    fi
+  elif [ "$oldvcode" -gt "$newvcode" ]; then
+    kernel_ask_newer=true
+  else
+    kernel_failed_detect=false
+    kernel_do_update=true
+  fi
+fi
+
+if $kernel_ask_newer; then
+  if zenity --question --text "It seems you have newer kernel already installed, 
+overwrite it?"; then
+    kernel_do_update=true
+  fi
+elif $kernel_failed_detect; then
+  if zenity --question --text "Could not determine what kernel is installed on your system, 
+so have to ask, do you want to overwrite your current kernel?"; then
+    kernel_do_update=true
+  fi
+fi
+
+if $kernel_do_update; then
+  if ! cmp $newkernel $oldkernel > /dev/null; then
+    log "updating kernel at $oldkernel from $oldver to $newver ..."
+    cp -a $newkernel $oldkernel
+    sync
+    kernel_reboot_needed=true
+  fi
+
+  log "updating modules for $newver ..."
+  if [ -n "$oldver" -a -d "/lib/modules/$oldver" ]; then
+    rm -rf /lib/modules/$oldver
+  fi
+  cp -a lib /
+  sync
+  if ! $kernel_reboot_needed; then
+    # we can depmod now
+    depmod -a
+    sync
+  fi
+fi
+
+log "installing packages..."
+opkg install ipk/* | tee -a $logfile
+sync
+
+# since uninstall script of gtk-touchscreen-mode-enable is broken, edit this out manually
+sudo sed -i -e 's/^\(gtk-touchscreen-mode = 1\)/#\1/' /etc/gtk-2.0/gtkrc
+
+log "all done. You can find logfile at $logfile"
+if $kernel_reboot_needed; then
+  zenity --question --text "Reboot required to start the new kernel.
+Reboot now?" && reboot
+else
+  zenity --info --text "Update complete."
+fi