Changeset 4169
- Timestamp:
- 03/05/08 07:09:22 (5 years ago)
- Location:
- trunk/src/target/u-boot/patches
- Files:
-
- 3 edited
-
boot-menu.patch (modified) (14 diffs)
-
gta02-bootmenu.patch (modified) (4 diffs)
-
nor-bootmenu.patch (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/u-boot/patches/boot-menu.patch
r4070 r4169 143 143 --- u-boot.orig/board/neo1973/gta01/gta01.c 144 144 +++ u-boot/board/neo1973/gta01/gta01.c 145 @@ -230,10 +230,15 @@ 145 @@ -230,10 +230,15 @@ int board_late_init(void) 146 146 extern unsigned char booted_from_nand; 147 147 unsigned char tmp; … … 159 159 goto woken_by_reset; 160 160 161 @@ -243,45 +248,41 @@ 161 @@ -243,45 +248,41 @@ int board_late_init(void) 162 162 setenv("pcf50606_int1", buf); 163 163 … … 227 227 continue_boot: 228 228 jbt6k74_init(); 229 @@ -305,6 +306,11 @@ 229 @@ -305,6 +306,11 @@ continue_boot: 230 230 } 231 231 #endif … … 239 239 } 240 240 241 @@ -433,7 +439,17 @@ 241 @@ -433,7 +439,17 @@ void neo1973_gps(int on) 242 242 printf("not implemented yet!\n"); 243 243 } … … 262 262 --- u-boot.orig/board/neo1973/gta01/Makefile 263 263 +++ u-boot/board/neo1973/gta01/Makefile 264 @@ -26,7 +26,7 @@ 264 @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk 265 265 LIB = lib$(BOARD).a 266 266 … … 275 275 --- u-boot.orig/board/neo1973/common/neo1973.h 276 276 +++ u-boot/board/neo1973/common/neo1973.h 277 @@ -32,4 +32,10 @@ 277 @@ -32,4 +32,10 @@ int neo1973_911_key_pressed(void); 278 278 const char *neo1973_get_charge_status(void); 279 279 int neo1973_set_charge_mode(enum neo1973_charger_cmd cmd); … … 290 290 --- u-boot.orig/common/console.c 291 291 +++ u-boot/common/console.c 292 @@ -160,8 +160,12 @@ 292 @@ -160,8 +160,12 @@ void fprintf (int file, const char *fmt, 293 293 294 294 /** U-Boot INITIAL CONSOLE-COMPATIBLE FUNCTION *****************************/ … … 303 303 /* Get from the standard input */ 304 304 return fgetc (stdin); 305 @@ -171,7 +175,7 @@ 305 @@ -171,7 +175,7 @@ int getc (void) 306 306 return serial_getc (); 307 307 } … … 312 312 if (gd->flags & GD_FLG_DEVINIT) { 313 313 /* Test the standard input */ 314 @@ -182,6 +186,16 @@ 314 @@ -182,6 +186,16 @@ int tstc (void) 315 315 return serial_tstc (); 316 316 } … … 346 346 --- u-boot.orig/common/Makefile 347 347 +++ u-boot/common/Makefile 348 @@ -31,6 +31,7 @@ 348 @@ -31,6 +31,7 @@ COBJS-y += main.o 349 349 COBJS-y += ACEX1K.o 350 350 COBJS-y += altera.o … … 358 358 --- /dev/null 359 359 +++ u-boot/common/bootmenu.c 360 @@ -0,0 +1,31 2@@360 @@ -0,0 +1,316 @@ 361 361 +/* 362 362 + * bootmenu.c - Boot menu … … 484 484 + 485 485 + bm_printf(ANSI_CLEAR ANSI_GOTOYX "%s", TOP_ROW, 1, version_string); 486 + bm_printf(ANSI_GOTOYX "*** BOOT MENU ***", TOP_ROW+3, 1); 486 + if (setup->comment) 487 + bm_printf(ANSI_GOTOYX "*** BOOT MENU (%s) ***", 488 + TOP_ROW+3, 1, setup->comment); 489 + else 490 + bm_printf(ANSI_GOTOYX "*** BOOT MENU ***", TOP_ROW+3, 1); 487 491 + bm_printf(ANSI_GOTOYX, MENU_0_ROW, 1); 488 492 + … … 675 679 --- /dev/null 676 680 +++ u-boot/include/bootmenu.h 677 @@ -0,0 +1, 79@@681 @@ -0,0 +1,82 @@ 678 682 +/* 679 683 + * bootmenu.h - Boot menu 680 684 + * 681 + * Copyright (C) 2006-200 7by OpenMoko, Inc.685 + * Copyright (C) 2006-2008 by OpenMoko, Inc. 682 686 + * Written by Werner Almesberger <werner@openmoko.org> 683 687 + * All Rights Reserved … … 708 712 + 709 713 +struct bootmenu_setup { 714 + /* title comment, NULL if none */ 715 + const char *comment; 716 + 710 717 + /* non-zero while the "next" key is being pressed */ 711 718 + int (*next_key)(void *user); -
trunk/src/target/u-boot/patches/gta02-bootmenu.patch
r4164 r4169 3 3 --- u-boot.orig/board/neo1973/gta02/gta02.c 4 4 +++ u-boot/board/neo1973/gta02/gta02.c 5 @@ -306,12 +306,12 @@ continue_boot: 5 @@ -33,6 +33,7 @@ 6 #include <common.h> 7 #include <s3c2440.h> 8 #include <i2c.h> 9 +#include <bootmenu.h> 10 11 #include "../common/neo1973.h" 12 #include "../common/jbt6k74.h" 13 @@ -308,12 +309,16 @@ continue_boot: 6 14 if (!(gpio->GPFDAT & (1 << 5))) 7 15 gpio->GPBDAT &= ~(1 << 2); … … 11 19 if (menu_vote > 0) { 12 20 - bootmenu(); 21 + extern struct bootmenu_setup bootmenu_setup; 22 + 23 + if (booted_from_nand) 24 + bootmenu_setup.comment = "NAND"; 13 25 + neo1973_bootmenu(); 14 26 nobootdelay = 1; … … 18 30 return 0; 19 31 } 20 @@ -4 08,13 +408,11 @@ int neo1973_on_key_pressed(void)32 @@ -410,13 +415,11 @@ int neo1973_on_key_pressed(void) 21 33 & PCF50633_OOCSTAT_ONKEY); 22 34 } … … 34 46 35 47 /* The sum of all part_size[]s must equal to or greater than the NAND size, 48 Index: u-boot/board/neo1973/common/bootmenu.c 49 =================================================================== 50 --- u-boot.orig/board/neo1973/common/bootmenu.c 51 +++ u-boot/board/neo1973/common/bootmenu.c 52 @@ -95,7 +95,9 @@ static void poweroff_if_idle(void *user) 53 } 54 55 56 -static struct bootmenu_setup bootmenu_setup = { 57 +/* "bootmenu_setup" is extern, so platform can tweak it */ 58 + 59 +struct bootmenu_setup bootmenu_setup = { 60 .next_key = aux_key, 61 .enter_key = on_key, 62 .seconds = seconds, -
trunk/src/target/u-boot/patches/nor-bootmenu.patch
r4164 r4169 25 25 char buf[32]; 26 26 int menu_vote = 0; /* <= 0: no, > 0: yes */ 27 @@ -2 46,7 +248,7 @@ int board_late_init(void)27 @@ -250,7 +252,7 @@ int board_late_init(void) 28 28 /* if there's no other reason, must be regular reset */ 29 29 neo1973_wakeup_cause = NEO1973_WAKEUP_RESET; … … 33 33 goto woken_by_reset; 34 34 35 /* obtain wake-up reason, save INT1in environment */36 @@ -3 08,7 +310,7@@ continue_boot:35 /* save wake-up reason in environment */ 36 @@ -310,11 +312,13 @@ continue_boot: 37 37 } 38 38 #endif … … 40 40 - if (menu_vote > 0) { 41 41 + if (menu_vote > 0 || booted_from_nor) { 42 extern struct bootmenu_setup bootmenu_setup; 43 44 if (booted_from_nand) 45 bootmenu_setup.comment = "NAND"; 46 + if (booted_from_nor) 47 + bootmenu_setup.comment = "NOR"; 42 48 neo1973_bootmenu(); 43 49 nobootdelay = 1;
Note: See TracChangeset
for help on using the changeset viewer.
