diff options
author | Jeremy Lainé <jeremy.laine@m4x.org> | 2008-12-15 16:11:43 +0100 |
---|---|---|
committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2008-12-15 16:11:43 +0100 |
commit | 13dd3d37617ad7f7e504e89e7a6d3bc513a61cec (patch) | |
tree | 32794b0f27b747814975e160db6ecd7d7e5fa5a2 /packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch | |
parent | abd423199a861cc8e04d881b170ea44b64eea658 (diff) |
u-boot: update patches for boc01
Diffstat (limited to 'packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch')
-rw-r--r-- | packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch b/packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch new file mode 100644 index 0000000000..e18055e64c --- /dev/null +++ b/packages/u-boot/u-boot-1.3.2/boc01/014-081211-BOOT_RESCUE.patch @@ -0,0 +1,40 @@ +Index: u-boot-1.3.2/common/main.c +=================================================================== +--- u-boot-1.3.2.orig/common/main.c ++++ u-boot-1.3.2/common/main.c +@@ -377,6 +377,15 @@ void main_loop (void) + } + else + #endif /* CONFIG_BOOTCOUNT_LIMIT */ ++#ifdef CONFIG_ENV_BOOTRESCUE ++ if ( gpio_get(GPIO_RED_BUTTON) ) { ++ printf ("Red button pressed: booting in rescue mode.\n"); ++ s = getenv (CONFIG_ENV_BOOTRESCUE); ++ if ( !s ) ++ printf ("Warning: environment variable '" CONFIG_ENV_BOOTRESCUE "' not set. Giving up rescue boot.\n"); ++ } ++ else ++#endif + s = getenv ("bootcmd"); + + debug ("### main_loop: bootcmd=\"%s\"\n", s ? s : "<UNDEFINED>"); +Index: u-boot-1.3.2/include/configs/MPC8313ERDB.h +=================================================================== +--- u-boot-1.3.2.orig/include/configs/MPC8313ERDB.h ++++ u-boot-1.3.2/include/configs/MPC8313ERDB.h +@@ -405,6 +405,7 @@ + #define PRE_INIT_GPIO 0x28 + #define INIT_GPIO 0x08 + #define MAX_GPIO_OUT 7 ++#define GPIO_RED_BUTTON 7 + + /* Digital Thermometer and Thermostat */ + #define CONFIG_DTT_LM73 1 +@@ -558,6 +559,7 @@ + * Environment Configuration + */ + #define CONFIG_ENV_OVERWRITE ++#define CONFIG_ENV_BOOTRESCUE "bootrescue" + + #define CONFIG_ETHADDR 00:E0:0C:00:95:01 + #define CONFIG_HAS_ETH1 |