From 64c56461e52f564f8ac9705df8740c077eb78f5c Mon Sep 17 00:00:00 2001 From: Neonkoala Date: Sat, 6 Nov 2010 11:30:01 +0000 Subject: [PATCH] Version 0.1.3 in Makefile. Updated default/temp os config to new standard. --- openiboot/Makefile | 2 +- openiboot/menu.c | 6 +++--- openiboot/openiboot.c | 20 +++++++++----------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/openiboot/Makefile b/openiboot/Makefile index ebf84d0..4a2a348 100644 --- a/openiboot/Makefile +++ b/openiboot/Makefile @@ -36,7 +36,7 @@ LIBRARIES += -lgcc -nostdlib INC += -Iincludes CFLAGS += -Wall -Werror LDFLAGS += -Ttext=$(LOAD) --nostdlib -VERSION = "0.1.2" +VERSION = "0.1.3" COMMIT = $(shell git log | head -n1 | cut -b8-14) BUILD = "$(COMMIT)" CFLAGS += -DOPENIBOOT_VERSION=$(VERSION) -DOPENIBOOT_VERSION_BUILD=$(BUILD) diff --git a/openiboot/menu.c b/openiboot/menu.c index 99d44bb..5a68bda 100644 --- a/openiboot/menu.c +++ b/openiboot/menu.c @@ -178,13 +178,13 @@ int menu_setup(int timeout, int defaultOS) { framebuffer_setloc(0, 0); switch(defaultOS){ - case 0: + case 1: Selection = MenuSelectioniPhoneOS; break; - case 1: + case 2: Selection = MenuSelectionAndroidOS; break; - case 2: + case 3: Selection = MenuSelectionConsole; break; default: diff --git a/openiboot/openiboot.c b/openiboot/openiboot.c index 2320302..592c837 100644 --- a/openiboot/openiboot.c +++ b/openiboot/openiboot.c @@ -86,13 +86,12 @@ void OpenIBootStart() { defaultOS = parseNumber(sDefaultOS); if(sTempOS) tempOS = parseNumber(sTempOS); - if(tempOS!=defaultOS) { - + if(tempOS>0) { switch (tempOS) { - case 0: + case 1: framebuffer_clear(); bufferPrintf("Loading iOS..."); - reset_tempos(sDefaultOS); + reset_tempos(); Image* image = images_get(fourcc("ibox")); if(image == NULL) image = images_get(fourcc("ibot")); @@ -101,10 +100,10 @@ void OpenIBootStart() { chainload((uint32_t)imageData); break; - case 1: + case 2: framebuffer_clear(); bufferPrintf("Loading iDroid..."); - reset_tempos(sDefaultOS); + reset_tempos(); #ifndef NO_HFS #ifndef CONFIG_IPOD radio_setup(); @@ -124,14 +123,13 @@ void OpenIBootStart() { #endif break; - case 2: + case 3: framebuffer_clear(); bufferPrintf("Loading Console..."); - reset_tempos(sDefaultOS); + reset_tempos(); hideMenu = "1"; break; } - } else if(hideMenu && (strcmp(hideMenu, "1") == 0 || strcmp(hideMenu, "true") == 0)) { bufferPrintf("Boot menu hidden. Use 'setenv opib-hide-menu false' and then 'saveenv' to unhide.\r\n"); } else { @@ -511,10 +509,10 @@ static int load_multitouch_images() return 1; } -static void reset_tempos(char* sDefaultOS) +static void reset_tempos() { framebuffer_setdisplaytext(FALSE); - nvram_setvar("opib-temp-os",sDefaultOS); + nvram_setvar("opib-temp-os","0"); nvram_save(); framebuffer_setdisplaytext(TRUE); }