Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Commit

Permalink
Add a script to reboot from NAND
Browse files Browse the repository at this point in the history
- needs applying aml_autoscript to work
- add "Reboot from NAND" option to Confluence power menu
- "switch_system" is used for compatibility with old modified bootloaders.
  • Loading branch information
kszaq committed Mar 23, 2016
1 parent beececb commit d6b66e8
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
21 changes: 21 additions & 0 deletions projects/Amlogic/filesystem/usr/sbin/rebootfromnand
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################

/usr/sbin/fw_setenv bootfromnand 1
/usr/sbin/reboot switch_system
27 changes: 27 additions & 0 deletions projects/Amlogic/patches/kodi/reboot-from-nand.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/addons/skin.confluence/720p/DialogButtonMenu.xml b/addons/skin.confluence/720p/DialogButtonMenu.xml
index e6cbfd8..6a80d84 100644
--- a/addons/skin.confluence/720p/DialogButtonMenu.xml
+++ b/addons/skin.confluence/720p/DialogButtonMenu.xml
@@ -184,6 +184,22 @@
<font>font13</font>
<label>13013</label>
</control>
+ <control type="button" id="15">
+ <description>Reboot from NAND button</description>
+ <width>340</width>
+ <height>40</height>
+ <textcolor>grey2</textcolor>
+ <focusedcolor>white</focusedcolor>
+ <align>center</align>
+ <textwidth>290</textwidth>
+ <texturefocus border="25,5,25,5">ShutdownButtonFocus.png</texturefocus>
+ <texturenofocus border="25,5,25,5">ShutdownButtonNoFocus.png</texturenofocus>
+ <onclick>System.ExecWait("/usr/sbin/rebootfromnand")</onclick>
+ <visible>System.CanReboot</visible>
+ <pulseonselect>no</pulseonselect>
+ <font>font13</font>
+ <label>Reboot from NAND</label>
+ </control>
<control type="button" id="9">
<description>Logoff button</description>
<width>340</width>

0 comments on commit d6b66e8

Please sign in to comment.