From: Michael Mrozek Date: Fri, 4 Jun 2010 21:50:13 +0000 (+0200) Subject: Added HotFix-Scripts (not yet finished) for easier editing on multiple PCs :) X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=d1099d9cbb571ddcfc82ea86f44b9b5b5b7995fc Added HotFix-Scripts (not yet finished) for easier editing on multiple PCs :) --- diff --git a/recipes/hotfix/1/gnome-vfs-plugin-ftp_2.24.1-r2.5_armv7a.ipk b/recipes/hotfix/1/gnome-vfs-plugin-ftp_2.24.1-r2.5_armv7a.ipk new file mode 100755 index 0000000..9a1f7fd Binary files /dev/null and b/recipes/hotfix/1/gnome-vfs-plugin-ftp_2.24.1-r2.5_armv7a.ipk differ diff --git a/recipes/hotfix/1/gnome-vfs-plugin-http_2.24.1-r2.5_armv7a.ipk b/recipes/hotfix/1/gnome-vfs-plugin-http_2.24.1-r2.5_armv7a.ipk new file mode 100755 index 0000000..fd0a143 Binary files /dev/null and b/recipes/hotfix/1/gnome-vfs-plugin-http_2.24.1-r2.5_armv7a.ipk differ diff --git a/recipes/hotfix/1/python-pycairo_1.4.0-ml3.5_armv7a.ipk b/recipes/hotfix/1/python-pycairo_1.4.0-ml3.5_armv7a.ipk new file mode 100755 index 0000000..a049ed1 Binary files /dev/null and b/recipes/hotfix/1/python-pycairo_1.4.0-ml3.5_armv7a.ipk differ diff --git a/recipes/hotfix/1/python-pygtk_2.16.0-r1.5_armv7a.ipk b/recipes/hotfix/1/python-pygtk_2.16.0-r1.5_armv7a.ipk new file mode 100755 index 0000000..3b959ba Binary files /dev/null and b/recipes/hotfix/1/python-pygtk_2.16.0-r1.5_armv7a.ipk differ diff --git a/recipes/hotfix/1/python-shell_2.6.4-ml9.1.5_armv7a.ipk b/recipes/hotfix/1/python-shell_2.6.4-ml9.1.5_armv7a.ipk new file mode 100755 index 0000000..47b6e50 Binary files /dev/null and b/recipes/hotfix/1/python-shell_2.6.4-ml9.1.5_armv7a.ipk differ diff --git a/recipes/hotfix/1/uImage b/recipes/hotfix/1/uImage new file mode 100755 index 0000000..44e3de7 Binary files /dev/null and b/recipes/hotfix/1/uImage differ diff --git a/recipes/hotfix/2/interfaces.txt b/recipes/hotfix/2/interfaces.txt new file mode 100644 index 0000000..afbcf20 --- /dev/null +++ b/recipes/hotfix/2/interfaces.txt @@ -0,0 +1,16 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + +# Wireless interfaces +iface wlan0 inet dhcp + wireless_mode managed + wireless_essid any + wpa-driver wext + wpa-conf /etc/wpa_supplicant.conf + +# Bluetooth networking +iface bnep0 inet dhcp + diff --git a/recipes/hotfix/2/mmenu b/recipes/hotfix/2/mmenu new file mode 100755 index 0000000..51de859 Binary files /dev/null and b/recipes/hotfix/2/mmenu differ diff --git a/recipes/hotfix/2/mmenu.conf b/recipes/hotfix/2/mmenu.conf new file mode 100644 index 0000000..76ca773 --- /dev/null +++ b/recipes/hotfix/2/mmenu.conf @@ -0,0 +1,72 @@ +# for the mmenu 'minimenu' +# + +# Note on overriding whats in a .pnd-application/PXML.xml +# Note that you can perform icon name, clockspeed setting and category overrides via an .ovr file +# Note that the icon can be overridden for a pnd-file by making a same-name .png file, in the same location +# "Notes" can be added to an icon using the .ovr file, as well. + +# Skins +# There is a a searchpath to find skin subdirs in; built in skins are in /etc/pandora/mmenu/skins, +# so any subdirectory of that is a skin-name. (ie: /etc/pandora/mmenu/skins/default is skin named 'default') +# Each skin will have its own mmskin.conf file defining how the skin works. All other options should be +# here, so that skin-changes do not break user preferences + +[minimenu] +skin_searchpath /media/*/pandora/mmenu/skins:/etc/pandora/mmenu/skins:./minimenu/skin +skin_selected ~/.mmenuskinchoice +skin_confname mmskin.conf +pndrun /usr/pandora/scripts:./testdata/scripts # searchpath to locate "pnd_run.sh"; why aren't I looking in /etc/pandora/conf/apps for this? +load_previews_now 0 # if >0, will try to load preview pics from pnds at boot time, not defer till later +load_previews_later 1 # if >0, will try to load preview pics sometime (see defer_timer_ms as well) +load_icons_later 0 # if >0, will try to load icons after grid is showing, not during app scanning +defer_icon_us 100000 # when background loading icons (load_icons_later), time between icon loadsa +threaded_preview 0 # if 1, will try to load the preview in background, to avoid slowing up navigation +loglevel 0 # 0 is debug, lots of crap; 3 is better, means 'errors only'. Output may screw up the wrapper! +x11_present_sh /bin/pidof X # command to invoke to determine if X11 is running or not; expects a number on X is present. +desktop_apps 1 # search the pnd standard desktop searchpath for apps +menu_apps 1 # search the pnd standard menu searchpath for apps +aux_searchpath /media/*/pandora/mmenu:/usr/pandora/mmenu # if something here, also search this path; can be used for mmenu-only apps? + +[utility] +terminal /usr/bin/Terminal # could also be /usr/bin/xterm, or a sh-script, or whatever + +[display] +fullscreen 1 # 0 for windowed, >0 for fullscreen +screen_width 800 # for some calculations + +[tabs] +top_maincat 1 # include maincat in top tab bar +top_maincat1 0 # include maincat subcat 1 in top tab bar +top_maincat2 0 # include maincat subcat 1 in top tab bar +top_altcat 1 # include alt cat in top tab bar +top_altcat1 0 # include alt cat subcat 1 in top tab bar +top_altcat2 0 # include alt cat subcat 1 in top tab bar +wraparound 0 # if 1, last tab wraps around to first when going right; going left from first tab goes to last + +[grid] +scroll_increment 4 # number of rows to scroll when jumping up or down (recommend 1, or same as row_max for full page jump) +wrap_horiz_samerow 1 # if 0, wraps to prev/next row; if 1, stays on same row +wrap_vert_stop 0 # if 0, wrap to other end; if 1, stops at top/bottom + +[previewpic] +defer_timer_ms 1500 # after setting selection, how long to wait before we try to load the previewpic +do_cache 1 # if 1, will try to cache previews to SD, for performance boost +cache_searchpath /media/mmcblk[12]p? # devices to consider for caching to, in order +cache_minfree 500 # if free space is less than this (in KB), move to next device +cache_path /pandora/appdata/mmenu.pvwcache # where to write cached images to +cache_findpath /media/mmcblk?p?/pandora/appdata/mmenu.pvwcache # where to look for cached preview pics + +[categories] +catmap_searchpath /media/*/pandora/mmenu:/etc/pandora/mmenu:./minimenu +catmap_confname mmcatmap.conf +do_all_cat 1 # if >0, will show an All category; if 0, skip it, just your cats. +#default_cat Game # if specified, will attempt to use the named category when mmenu starts, instead of 'leftmost' (usually All) + +[filesystem] +do_browser 0 # if >0, will allow filesystem browsing +tab_searchpaths /media/* # for each chunk in searchpath, show a tab (if not empty). +# example: +# /media -> show /media as a single tab +# /media/* -> show a tab for each dir in /media +# /media/mmcblk1p1:/media/mmcblk2p1 -> show 2 tabs, one for first partition on each SD diff --git a/recipes/hotfix/2/rc.wl1251 b/recipes/hotfix/2/rc.wl1251 new file mode 100644 index 0000000..5018c6b --- /dev/null +++ b/recipes/hotfix/2/rc.wl1251 @@ -0,0 +1,66 @@ +#!/bin/sh +DESC="WL1251 MAC80211 Wireless LAN driver" +NAME="wl1251" + +d_stop() { + if `grep -q wl1251 /proc/modules` ; then + rmmod wl1251_sdio + rmmod wl1251 + rmmod board-omap3pandora-wifi + fi +} + +d_start() { + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "rfkill_backport.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "compat.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "cfg80211.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "mac80211.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "compat_firmware_class.ko") + insmod $(busybox find /lib/modules/$(uname -r) -name "ecb.ko") + insmod $(busybox find /lib/modules/$(uname -r) -name "pcbc.ko") + insmod $(busybox find /lib/modules/$(uname -r) -name "arc4.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_tkip.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_wep.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_ccmp.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "wl1251.ko") + insmod $(busybox find /lib/modules/$(uname -r)/updates -name "wl1251_sdio.ko") + insmod $(busybox find /lib/modules/$(uname -r) -name "board-omap3pandora-wifi.ko") + + # restore phyX related LED triggers (they come from mac80211.ko) + sleep 0.5 + if [ -e /sys/class/leds/ ] ; then + for led in /sys/class/leds/* ; do + trigger=$(grep "$(basename $led)" /etc/default/leds | grep "phy" | awk '{print $2}') + if [ "x$trigger" != "x" ] ; then + echo "$trigger" > "$led/trigger" + fi + done + fi +} + +case "$1" in + start) + echo -n "Starting $DESC: $NAME" + d_start & + echo "." + ;; + stop) + echo -n "Stopping $DESC: $NAME" + d_stop + echo "." + ;; + restart|force-reload) + echo -n "Restarting $DESC: $NAME" + d_stop + sleep 1 + d_start + echo "." + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes/hotfix/PXML.xml b/recipes/hotfix/PXML.xml new file mode 100755 index 0000000..7e1c028 --- /dev/null +++ b/recipes/hotfix/PXML.xml @@ -0,0 +1,22 @@ + + + + + + Pandora Hotfix Kit 1 + + + + + Hotfix for your Pandora. + + + + + + + + + + + diff --git a/recipes/hotfix/start.sh b/recipes/hotfix/start.sh new file mode 100755 index 0000000..f105425 --- /dev/null +++ b/recipes/hotfix/start.sh @@ -0,0 +1,2 @@ +#!/bin/bash +gksudo ./updater1.sh \ No newline at end of file diff --git a/recipes/hotfix/updater.png b/recipes/hotfix/updater.png new file mode 100755 index 0000000..ed2ec02 Binary files /dev/null and b/recipes/hotfix/updater.png differ diff --git a/recipes/hotfix/updater1.sh b/recipes/hotfix/updater1.sh new file mode 100755 index 0000000..031b7c2 --- /dev/null +++ b/recipes/hotfix/updater1.sh @@ -0,0 +1,131 @@ +#### THIS SCRIPT IS NOT FINISHED YET! #### + +#!/bin/bash +newkern=b00a5d617f11366689488395b19411de +oldkern=3112d1782a90c2c87ae17a152a35deae +currkern=$(md5sum /boot/uImage | cut -d" " -f1) +needfree=$(ls -lk uImage | grep uImage | cut -d" " -f5) +oldinterfaces=23f72750f2f7335b9c2ed3f55aaa5061 +oldrcwl1251=7a6361e842f0f589418218436affbe07 +newmmenu=af66a5118a9bfef8eca5de13ee64c6a1 +oldmmenu1= +oldmmenu2=fa45e9bc91c48640a9ea592de5fbeb3c +oldmmenuconf1= +oldmmenuconf2=c90d33c362121ddd0e24e9eac0b82da9 +newmmenuconf=d3b237cf95ff6c6e81b23483e87391e1 +currmmenu=$(md5sum /usr/bin/mmenu | cut -d" " -f1) +currmmenuconf=$(md5sum /etc/pandora/conf/mmenu.conf | cut -d" " -f1) +err="Your system has been updated without any errors." + +rm /tmp/updater.log + +if zenity --question --title="Update Package 2" --text="This PND updates your Pandora OS. You can safely delete it after it has finished.\nThis pack includes all updates from Hotfix 1 as well.\n\nDo you want to start the upgrade now? " --ok-label="Start now" --cancel-label="Don't do it" ; then + +( +echo "10" +echo "# Updating kernel if needed" + +# HotFix 1 +# Kernel Update + + if [ $oldkern = $currkern ]; then + rm /boot/uImage.old + currfree=$(df /boot | grep boot | awk '{print $4}') + if [ $currfree -lt $needfree ]; then + err="There is not enough diskspace on /boot/ to update the kernel.\n\nKernel couldn't be updated." + echo "Kernel not updated - not enough diskspace on /boot/" >> /tmp/updater.log + else + cp uImage /boot/uImage.new + sync + currkern=$(md5sum /boot/uImage.new | cut -d" " -f1) + if [ $currkern = $newkern ]; then + mv /boot/uImage /boot/uImage.old + mv /boot/uImage.new /boot/uImage + currkern=$(md5sum /boot/uImage | cut -d" " -f1) + if [ $currkern != $newkern ]; then + rm /boot/uImage + mv /boot/uImage.old /boot/uImage + err="There was a checksum error while copying the kernel.\n\nKernel couldn't be updated. Please check your SD-Card and try to recopy the PND-File." + echo "Kernel not updated - checksum error" >> /tmp/updater.log + fi + else + rm /boot/uImage.new + err="There was a checksum error while copying the kernel.\n\nKernel couldn't be updated. Please check your SD-Card and try to recopy the PND-File." + echo "Kernel not updated - checksum error" >> /tmp/updater.log + fi + fi + fi + echo "Kernel successfully updated" >> /tmp/updater.log + sync + +# Libraries for HotFix 1 + +echo "20" +echo "# Installing missing Python libraries" +if [ ! -f /usr/lib/glob.py ]; + opkg install gnome-vfs-plugin-ftp_2.24.1-r2.5_armv7a.ipk gnome-vfs-plugin-http_2.24.1-r2.5_armv7a.ipk python-pycairo_1.4.0-ml3.5_armv7a.ipk python-pygtk_2.16.0-r1.5_armv7a.ipk python-shell_2.6.4-ml9.1.5_armv7a.ipk + echo "Python libraries successfully updated" >> /tmp/updater.log + sync +else + echo "Python libraries were installed." >> /tmp/updater.log +fi + +# HotFix 2 +# MiniMenu Update + +echo "30" +echo "# Installing updated MiniMenu" + if [ $oldmmenu1 = $currmmenu -o $oldmmenu2 = $currmenu]; then + rm /usr/bin/mmenu.old + cp 2/mmenu /usr/bin/mmenu.new + cp 2/mmenu.conf /etc/pandora/conf/mmenu.conf.new + sync + currmmenu=$(md5sum /usr/bin/mmenu.new | cut -d" " -f1) + if [ $currmmenu = $newmmenu ]; then + mv /usr/bin/mmenu /usr/bin/mmenu.old + mv /etc/pandora/conf/mmenu.conf /etc/pandora/conf/mmenu.conf.old + mv /usr/bin/mmenu.new /usr/bin/mmenu + mv /etc/pandora/conf/mmenu.conf.new /etc/pandora/conf/mmenu.conf + currmmenu=$(md5sum /boot/uImage | cut -d" " -f1) + if [ $currmmenu != $newmmenu ]; then + rm /usr/bin/mmenu + rm /etc/pandora/conf/mmenu.conf + mv /etc/pandora/conf/mmenu.conf.old /etc/pandora/conf/mmenu.conf + mv /usr/bin/mmenu.old /usr/bin/mmenu + err="There was a checksum error while copying MiniMenu.\n\nMiniMenu couldn't be updated. Please check your SD-Card and try to recopy the PND-File." + echo "MiniMenu not updated - checksum error" >> /tmp/updater.log + fi + else + rm /usr/bin/mmenu.new + rm /etc/pandora/conf/mmenu.conf.new + err="There was a checksum error while copying MiniMenu.\n\nMiniMenu couldn't be updated. Please check your SD-Card and try to recopy the PND-File." + echo "MiniMenu not updated - checksum error" >> /tmp/updater.log + fi + fi + fi + echo "MiniMenu successfully updated" >> /tmp/updater.log + sync + +# Libraries for HotFix 2 + +echo "40" +echo "# Installing Boost Library" +if [ ! -f /usr/lib/glob.py ]; + opkg install 2/ + echo "Boost library successfully updated" >> /tmp/updater.log + sync +else + echo "Boost library was already up-to-date." >> /tmp/updater.log +fi + +# Bugfixes in Scripts + +echo "50" +echo "# Installing updated scripts" + + +) + + +# Zenity Progress goes here +fi \ No newline at end of file