From abace893545224750dc11f28667d5f6c2fc6c618 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 31 Aug 2010 22:33:13 +0200 Subject: [PATCH] installer: add installer.conf, set version to 0.2.2, add some menupoints for bios update, add oem message Signed-off-by: Stephan Raue --- .../tools/installer/config/installer.conf | 9 ++++++ packages/tools/installer/install | 6 ++++ packages/tools/installer/scripts/installer | 28 ++++++++++++++----- 3 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 packages/tools/installer/config/installer.conf diff --git a/packages/tools/installer/config/installer.conf b/packages/tools/installer/config/installer.conf new file mode 100644 index 0000000000..8ade18bc10 --- /dev/null +++ b/packages/tools/installer/config/installer.conf @@ -0,0 +1,9 @@ +# Disklabel for System an Storage partition + DISKLABEL_SYSTEM="System" + DISKLABEL_STORAGE="Storage" + +# Defaultsize of system partition (Cylinder: 16=132MB, 31=255MB) + PARTSIZE_SYSTEM="16" + +# additional parameters to extlinux + EXTLINUX_PARAMETERS="" diff --git a/packages/tools/installer/install b/packages/tools/installer/install index 8dd96ffea1..c9070c4773 100755 --- a/packages/tools/installer/install +++ b/packages/tools/installer/install @@ -13,3 +13,9 @@ $SCRIPTS/install flashrom mkdir -p $INSTALL/usr/bin cp $PKG_DIR/scripts/installer $INSTALL/usr/bin +mkdir -p $INSTALL/etc + if [ -f $PROJECT_DIR/$PROJECT/installer/installer.conf ]; then + cp $PROJECT_DIR/$PROJECT/installer/installer.conf $INSTALL/etc + else + cp $PKG_DIR/config/installer.conf $INSTALL/etc + fi diff --git a/packages/tools/installer/scripts/installer b/packages/tools/installer/scripts/installer index 6ef217e71b..eb82ac53e1 100755 --- a/packages/tools/installer/scripts/installer +++ b/packages/tools/installer/scripts/installer @@ -52,6 +52,8 @@ # cumulative, e.g., "\Zb\Z1" makes the following text bold (perhaps bright) # red. Restore normal settings with "\Zn". +[ -f /etc/installer.conf ] && . /etc/installer.conf || exit 0 + function dbglg() { # Acts just like echo cmd, with automatic redirection @@ -275,6 +277,14 @@ function msg_not_implemented() { dialog --colors --backtitle "$BACKTITLE" --title "$MSG_TITLE" --msgbox "$MSG_INFOBOX" 7 70 } +function msg_oem_only() { + # show an dialog that this function is only implemented on special builds + MSG_TITLE="\Z2[ FOR OEM ONLY ]\Zn" + MSG_INFOBOX=" OEM only feature, this function is not implemented in this build! \n if you have questions about this feature visit http://www.openelec.tv!!!" + + dialog --colors --backtitle "$BACKTITLE" --title "$MSG_TITLE" --msgbox "$MSG_INFOBOX" 7 70 +} + function msg_warning_beta() { # show an warning dialog if we use beta software MSG_TITLE="\Z1[ BETA WARNING ]\Zn" @@ -366,7 +376,8 @@ function menu_bios() { dialog --colors --backtitle "$BACKTITLE" --cancel-label "$MSG_CANCEL" \ --title "$MSG_TITLE" --menu "$MSG_MENU" 25 70 5 \ 1 "Backup installed BIOS" \ - 2 "Update BIOS" 2> $TMPDIR/biosmenu + 2 "Update BIOS" \ + 3 "Erase BIOS (not recommended)" 2> $TMPDIR/biosmenu case $? in 0) @@ -374,6 +385,7 @@ function menu_bios() { case $ITEM_BIOSMENU in 1) bios_backup; break;; 2) bios_update; break;; + 2) bios_erase; break;; esac ;; 1) @@ -403,6 +415,12 @@ function bios_update() { menu_bios } +function bios_erase() { + # TODO: update the bios + msg_not_implemented + menu_bios +} + function logfile_show() { # TODO: show the logfile msg_not_implemented @@ -424,15 +442,11 @@ function do_poweroff() { } # setup needed variables - TMPDIR="/tmp/installer" BETA="yes" - VERSION="0.2.1" + VERSION="0.2.2" BACKTITLE="OpenELEC.tv Installer $VERSION" - DISKLABEL_SYSTEM="System" - DISKLABEL_STORAGE="Storage" - PARTSIZE_SYSTEM="16" # Defaultsize of system partition (Cylinder: 16=132MB, 31=255MB) - EXTLINUX_PARAMETERS="" + TMPDIR="/tmp/installer" LOGFILE="$TMPDIR/install.log" # prepare temporary directory