I have made the following changes intended for :
  CE:Adaptation:N950-N9 / nokia-n950-configs

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/3235

Thank You,
bossbot ([email protected])

[This message was auto-generated]

---

Request # 3235:

Messages from BOSS:
     Could not notify CE-maintainers (no address found)

State:   review          2011-11-24T07:53:04 bossbot

Reviews:
     accepted by bossbot : Prechecks completed; none failed.
     new by   None

Changes:
  submit: home:sage:branches:CE:Adaptation:N950-N9 / nokia-n950-configs -> 
CE:Adaptation:N950-N9 / nokia-n950-configs
  
changes files:
--------------

++++++ new changes file:
--- nokia-n950-configs.changes
+++ nokia-n950-configs.changes
@@ -0,0 +1,24 @@
+* Wed Nov 23 2011 Marko Saukko <[email protected]> - 0.3.0
+- Moved nokia-n950-configs.service to multi-user.target.wants.
+- Removed old init.d script deps and merged all scripts to one 
nokia-n950-configs.sh
+
+* Tue Nov 22 2011 Robin Burchell <[email protected]> - 0.2.1
+- Take runtime graphicssystem into use now Mer package is released.
+  This saves a significant amount of RAM per backgrounded GUI process.
+
+* Fri Oct 21 2011 Marko Saukko <[email protected]> - 0.2.0
+- Executed spectacle 0.23 and added boss.conf.
+
+* Thu Sep 22 2011 Marko Saukko <[email protected]> - 0.2.0
+- Added n950-plymouth-start-update.service to update splash during boot.
+
+* Tue Sep 13 2011 Marko Saukko <[email protected]> - 0.2.0
+- Update for systemd.
+
+* Mon Aug 22 2011 Teemu Tuominen <[email protected]> - 0.1.0
+- camera-pipelines.conf upgrade 
+  (orig. gst-nokia-videosrc 0.57.0/data/pipelines.conf)
+
+* Fri Jul 01 2011 Tommi Keisala <[email protected]> - 0.1.0
+- Initial version of configuration package for n950
+

++++++ deleted changes files:
--- n950-configs.changes

old:
----
  n950-alsamixer.sh
  n950-camera.sh
  n950-configs.changes
  n950-dsp-bridge.sh
  n950-swap.sh

new:
----
  nokia-n950-configs.changes

spec files:
-----------
--- nokia-n950-configs.spec
+++ nokia-n950-configs.spec
@@ -7,7 +7,7 @@
 
 Name:       nokia-n950-configs
 Summary:    Nokia N950-specific configuration files
-Version:    0.2.1
+Version:    0.3.0
 Release:    0
 Group:      System/Startup Services
 License:    GPLv2
@@ -15,21 +15,18 @@
 Source0:    n950-input-rules.conf
 Source1:    n950-xkb-hack.desktop
 Source2:    asound_n950.state
-Source3:    n950-alsamixer.sh
-Source4:    n950-camera.sh
-Source5:    n950-dsp-bridge.sh
-Source6:    n950-swap.sh
-Source7:    meegotouch-N950.conf
-Source8:    camera-pipelines.conf
-Source9:    enable_gprs.desktop
-Source10:    enable_gprs.sh
-Source11:    n950-qt-mtf-config.sh
-Source12:    %{name}.sh
-Source13:    %{name}.service
-Source14:    n950-plymouth-start-update.service
-Source15:    boss.conf
+Source3:    meegotouch-N950.conf
+Source4:    camera-pipelines.conf
+Source5:    enable_gprs.desktop
+Source6:    enable_gprs.sh
+Source7:    n950-qt-mtf-config.sh
+Source8:    %{name}.sh
+Source9:    %{name}.service
+Source10:    n950-plymouth-start-update.service
+Source11:    boss.conf
 Source100:  nokia-n950-configs.yaml
 Requires:   uxlaunch
+Requires:   xorg-x11-xkb-utils
 Requires:   systemd
 Requires(preun): systemd
 Requires(post): systemd
@@ -58,24 +55,21 @@
 %install
 rm -rf %{buildroot}
 # >> install pre
-install -D -m 644 %{SOURCE0} 
$RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d/90-input-n950.conf
-install -D -m 644 %{SOURCE1} 
$RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/n950-xkb-hack.desktop
-install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/asound_n950.state
-install -D -m 755 %{SOURCE3} 
$RPM_BUILD_ROOT%{_sbindir}/n950-alsamixer-settings.sh
-install -D -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/n950-camera.sh
-install -D -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_sbindir}/n950-dsp-bridge.sh
-install -D -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_sbindir}/n950-swap.sh
-install -D -m 644 %{SOURCE7} 
$RPM_BUILD_ROOT%{_datadir}/meegotouch/targets/N950.conf
-install -D -m 644 %{SOURCE8} 
$RPM_BUILD_ROOT%{_sysconfdir}/camera/pipelines.conf
-install -D -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/enable_gprs.sh
-install -D -m 755 %{SOURCE11} 
$RPM_BUILD_ROOT/etc/profile.d/n950-qt-mtf-config.sh
-install -D -m 755 %{SOURCE12} $RPM_BUILD_ROOT%{_sbindir}/%{name}.sh
+install -D -m 644 %{SOURCE0} 
$RPM_BUILD_ROOT/%{_sysconfdir}/X11/xorg.conf.d/90-input-n950.conf
+install -D -m 644 %{SOURCE1} 
$RPM_BUILD_ROOT/%{_sysconfdir}/xdg/autostart/n950-xkb-hack.desktop
+install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/asound_n950.state
+install -D -m 644 %{SOURCE3} 
$RPM_BUILD_ROOT/%{_datadir}/meegotouch/targets/N950.conf
+install -D -m 644 %{SOURCE4} 
$RPM_BUILD_ROOT/%{_sysconfdir}/camera/pipelines.conf
+install -D -m 755 %{SOURCE6} $RPM_BUILD_ROOT/%{_bindir}/enable_gprs.sh
+install -D -m 755 %{SOURCE7} 
$RPM_BUILD_ROOT/etc/profile.d/n950-qt-mtf-config.sh
+install -D -m 755 %{SOURCE8} $RPM_BUILD_ROOT/%{_sbindir}/%{name}.sh
 # systemd
-install -D -m 644 %{SOURCE13} 
$RPM_BUILD_ROOT/lib/systemd/system/%{name}.service
-install -d $RPM_BUILD_ROOT/lib/systemd/system/sysinit.target.wants/
-ln -s ../%{name}.service 
$RPM_BUILD_ROOT/lib/systemd/system/sysinit.target.wants/%{name}.service
+install -D -m 644 %{SOURCE9} $RPM_BUILD_ROOT/lib/systemd/system/%{name}.service
+install -d $RPM_BUILD_ROOT/lib/systemd/system/multi-user.target.wants/
+ln -s ../%{name}.service 
$RPM_BUILD_ROOT/lib/systemd/system/multi-user.target.wants/%{name}.service
 
-install -D -m 644 %{SOURCE14} 
$RPM_BUILD_ROOT/lib/systemd/system/n950-plymouth-start-update.service
+install -d $RPM_BUILD_ROOT/lib/systemd/system/sysinit.target.wants/
+install -D -m 644 %{SOURCE10} 
$RPM_BUILD_ROOT/lib/systemd/system/n950-plymouth-start-update.service
 ln -s ../n950-plymouth-start-update.service 
$RPM_BUILD_ROOT/lib/systemd/system/sysinit.target.wants/n950-plymouth-start-update.service
 # << install pre
 
@@ -102,17 +96,13 @@
 %config %{_sysconfdir}/X11/xorg.conf.d/90-input-n950.conf
 %config %{_sysconfdir}/xdg/autostart/n950-xkb-hack.desktop
 %config %{_sysconfdir}/asound_n950.state
-%attr(755,root,root) %{_sbindir}/n950-alsamixer-settings.sh
-%attr(755,root,root) %{_sbindir}/n950-camera.sh
-%attr(755,root,root) %{_sbindir}/n950-dsp-bridge.sh
-%attr(755,root,root) %{_sbindir}/n950-swap.sh
 %attr(755,root,root) %{_sbindir}/%{name}.sh
 %{_datadir}/meegotouch/targets/*
 %config %{_sysconfdir}/camera/pipelines.conf
 %{_bindir}/*
 %{_sysconfdir}/profile.d/n950-qt-mtf-config.sh
 /lib/systemd/system/%{name}.service
-/lib/systemd/system/sysinit.target.wants/%{name}.service
+/lib/systemd/system/multi-user.target.wants/%{name}.service
 /lib/systemd/system/n950-plymouth-start-update.service
 /lib/systemd/system/sysinit.target.wants/n950-plymouth-start-update.service
 # << files

other changes:
--------------

++++++ nokia-n950-configs.sh
--- nokia-n950-configs.sh
+++ nokia-n950-configs.sh
@@ -1,6 +1,92 @@
 #!/bin/bash
 
-/usr/sbin/n950-alsamixer.sh start
-/usr/sbin/n950-camera.sh start
-/usr/sbin/n950-dsp-bridge.sh start
-/usr/sbin/n950-swap.sh start
+encswap="/dev/mapper/encswap"
+
+start() {
+    echo "Setting alsamixer: loading N950 defaults"
+    alsactl restore 0 -f /etc/asound_n950.state
+    if [ $? -ne 0 ]; then
+        echo "WARNING: Failed to set alsamixer settings for N950."
+    fi
+
+    echo -n "Loading N950 camera modules"
+    RETVAL=0
+    /sbin/modprobe iommu2 || RETVAL=1
+    /sbin/modprobe omap3_iommu || RETVAL=1
+    /sbin/modprobe omap3-isp || RETVAL=1
+    /sbin/modprobe smiapp || RETVAL=1
+    if [ $RETVAL -ne 0 ]; then
+        echo "WARNING: unale to load N950 camera module."
+    fi
+
+    echo "Loading N950 DSP bridge"
+    /sbin/modprobe bridgedriver
+    if [ $? -ne 0 ]; then
+        echo "WARNING: Unable to load N950 DSP bridge."
+    fi
+
+    echo -n "Enabling N950 MTD swap"
+    RETVAL=0
+
+    if [ ! -e $encswap ]; then
+        swappart=`sed -n -e '/swap/s/mtd\([0-9]\).*/\1/p' /proc/mtd` || true
+        if [ -n "$swappart" ]; then
+            modprobe mtdswap partitions=$swappart spare_eblocks=10 header=0 || 
RETVAL=1
+            modprobe dm_mod
+            modprobe dm_crypt
+            /sbin/cryptsetup create -h sha256 -c aes-xts-plain -s 256 -d 
/dev/urandom encswap /dev/mtdswap$swappart || RETVAL=1
+            /sbin/mkswap $encswap || RETVAL=1
+        else
+            echo "ERROR: Could not find swap partion from mtd"
+            RETVAL=1
+        fi
+    fi
+
+    if [ $RETVAL -eq 0 ]; then
+        /sbin/swapon $encswap || RETVAL=1
+    fi
+
+    if [ $RETVAL -ne 0 ]; then
+        echo "WARNING: Unable to enabled N950 MTF swap."
+    fi
+}
+
+
+stop() {
+    echo "Unloading N950 camera modules"
+    RETVAL=0
+    /sbin/rmmod smiapp || RETVAL=1
+    /sbin/rmmod omap3-isp || RETVAL=1
+    /sbin/rmmod omap3_iommu || RETVAL=1
+    /sbin/rmmod iommu2 || RETVAL=1
+    if [ $RETVAL -ne 0 ]; then
+        echo "WARNING: Unable unload camera module."
+    fi
+
+    echo "Unloading N950 DSP bridge"
+    /sbin/rmmod bridgedriver
+    if [ $? -ne 0 ]; then
+        echo "WARNING: Unable to unload DSP bridge."
+    fi
+
+    echo -n "Disabling N950 MTD swap"
+    RETVAL=0
+    /sbin/swapoff $encswap || RETVAL=1
+    if [ $RETVAL -ne 0 ]; then
+        echo "WARNING: Unable to unload camera module."
+    fi
+}
+
+
+case "$1" in
+    start)
+        start
+        ;;
+    stop)
+        stop
+        ;;
+    *)
+        echo "Usage: $0 {start|stop}"
+esac
+
+exit 0

++++++ nokia-n950-configs.yaml
--- nokia-n950-configs.yaml
+++ nokia-n950-configs.yaml
@@ -1,6 +1,6 @@
 Name: nokia-n950-configs
 Summary: Nokia N950-specific configuration files
-Version: 0.2.1
+Version: 0.3.0
 Release: 0
 Group: System/Startup Services
 License: GPLv2
@@ -9,10 +9,6 @@
     - "n950-input-rules.conf"
     - "n950-xkb-hack.desktop"
     - "asound_n950.state"
-    - "n950-alsamixer.sh"
-    - "n950-camera.sh"
-    - "n950-dsp-bridge.sh"
-    - "n950-swap.sh"
     - "meegotouch-N950.conf"
     - "camera-pipelines.conf"
     - "enable_gprs.desktop"
@@ -26,6 +22,10 @@
 
 Requires:
     - uxlaunch
+    # For audio part of %{name}.sh
+    #- alsa-utils
+    # For n950-xkb-hack.desktop
+    - xorg-x11-xkb-utils
 
 NoSetup: yes
 Configure: none

++++++ deleted files:
--- n950-alsamixer.sh
--- n950-camera.sh
--- n950-dsp-bridge.sh
--- n950-swap.sh



Reply via email to