From d6b66e84451563b60df967a6192792a4484495c2 Mon Sep 17 00:00:00 2001 From: kszaq Date: Mon, 21 Mar 2016 00:52:54 +0100 Subject: [PATCH] Add a script to reboot from NAND - 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. --- .../filesystem/usr/sbin/rebootfromnand | 21 +++++++++++++++ .../patches/kodi/reboot-from-nand.patch | 27 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 projects/Amlogic/filesystem/usr/sbin/rebootfromnand create mode 100644 projects/Amlogic/patches/kodi/reboot-from-nand.patch diff --git a/projects/Amlogic/filesystem/usr/sbin/rebootfromnand b/projects/Amlogic/filesystem/usr/sbin/rebootfromnand new file mode 100755 index 00000000000..7699bc0dfa4 --- /dev/null +++ b/projects/Amlogic/filesystem/usr/sbin/rebootfromnand @@ -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 . +################################################################################ + +/usr/sbin/fw_setenv bootfromnand 1 +/usr/sbin/reboot switch_system diff --git a/projects/Amlogic/patches/kodi/reboot-from-nand.patch b/projects/Amlogic/patches/kodi/reboot-from-nand.patch new file mode 100644 index 00000000000..67ad5258f31 --- /dev/null +++ b/projects/Amlogic/patches/kodi/reboot-from-nand.patch @@ -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 @@ + font13 + + ++ ++ Reboot from NAND button ++ 340 ++ 40 ++ grey2 ++ white ++ center ++ 290 ++ ShutdownButtonFocus.png ++ ShutdownButtonNoFocus.png ++ System.ExecWait("/usr/sbin/rebootfromnand") ++ System.CanReboot ++ no ++ font13 ++ ++ + + Logoff button + 340