r4035 - trunk/src/target/u-boot/patches
werner at sita.openmoko.org
werner at sita.openmoko.org
Sun Feb 10 08:58:00 CET 2008
Author: werner
Date: 2008-02-10 08:57:55 +0100 (Sun, 10 Feb 2008)
New Revision: 4035
Added:
trunk/src/target/u-boot/patches/env-override.patch
Modified:
trunk/src/target/u-boot/patches/series
trunk/src/target/u-boot/patches/uboot-gta02.patch
Log:
This patch introduces a new variable at a well-known address that can be
overwritten from the outsite to change the startup behaviour of u-boot. This
variable is at offset 0x40 (if preboot-override is not enabled) or 0x44 (if
it is), and it points to an alternate data block to be used as the default
environment.
This makes not-default-env.patch obsolete, because we just use this override
when booting from NOR.
env-override.patch:
- cpu/arm920t/start.S: new configuration variable CFG_ENV_OVERRIDE to enable
environment overriding
- cpu/arm920t/start.S: added global variable "env_override" to specifiy an
alternate initial environment
- common/env_common.c (default_env): if env_override is set, use that
environment as the default
uboot-gta02.patch:
- include/configs/neo1973_gta02.h: set CFG_ENV_OVERRIDE
series:
- added env-override.patch
- backed out nor-default-env.patch, since env-override.patch provides the same
functionality (in our context)
Added: trunk/src/target/u-boot/patches/env-override.patch
===================================================================
--- trunk/src/target/u-boot/patches/env-override.patch 2008-02-10 07:51:32 UTC (rev 4034)
+++ trunk/src/target/u-boot/patches/env-override.patch 2008-02-10 07:57:55 UTC (rev 4035)
@@ -0,0 +1,46 @@
+Index: u-boot/common/env_common.c
+===================================================================
+--- u-boot.orig/common/env_common.c
++++ u-boot/common/env_common.c
+@@ -34,6 +34,10 @@
+ extern char *preboot_override;
+ #endif
+
++#ifdef CFG_ENV_OVERRIDE
++extern void *env_override;
++#endif
++
+ DECLARE_GLOBAL_DATA_PTR;
+
+ #ifdef CONFIG_AMIGAONEG3SE
+@@ -207,6 +211,12 @@
+ memcpy (env_ptr->data,
+ default_environment,
+ sizeof(default_environment));
++
++#ifdef CFG_ENV_OVERRIDE
++ if (env_override)
++ memcpy(env_ptr->data, env_override, ENV_SIZE);
++#endif
++
+ #ifdef CFG_REDUNDAND_ENVIRONMENT
+ env_ptr->flags = 0xFF;
+ #endif
+Index: u-boot/cpu/arm920t/start.S
+===================================================================
+--- u-boot.orig/cpu/arm920t/start.S
++++ u-boot/cpu/arm920t/start.S
+@@ -85,6 +85,13 @@
+ .word 0
+ #endif
+
++/* Must follow preboot_override , so we get a well-known address ! */
++#ifdef CFG_ENV_OVERRIDE
++.globl env_override
++env_override:
++ .word 0
++#endif
++
+ #ifdef CONFIG_S3C2410_NAND_BOOT
+ .globl booted_from_nand
+ booted_from_nand:
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2008-02-10 07:51:32 UTC (rev 4034)
+++ trunk/src/target/u-boot/patches/series 2008-02-10 07:57:55 UTC (rev 4035)
@@ -47,6 +47,7 @@
# move these later, once the dust has settled
default-env.patch
+env-override.patch
console-ansi.patch
boot-menu.patch
@@ -84,7 +85,7 @@
uboot-neo1973_defaultconsole_usbtty.patch
# keep this here until we have time to bubble it into the stack
-nor-default-env.patch
+##nor-default-env.patch
# let's see what upstream thinks about this
loadenv.patch
Modified: trunk/src/target/u-boot/patches/uboot-gta02.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-gta02.patch 2008-02-10 07:51:32 UTC (rev 4034)
+++ trunk/src/target/u-boot/patches/uboot-gta02.patch 2008-02-10 07:57:55 UTC (rev 4035)
@@ -609,7 +609,7 @@
===================================================================
--- /dev/null
+++ u-boot/include/configs/neo1973_gta02.h
-@@ -0,0 +1,286 @@
+@@ -0,0 +1,287 @@
+/*
+ * (C) Copyright 2007 OpenMoko, Inc.
+ * Author: Harald Welte <laforge at openmoko.org>
@@ -822,6 +822,7 @@
+#define CFG_ENV_SIZE 0x40000 /* 128k Total Size of Environment Sector */
+#define CFG_ENV_OFFSET_OOB 1 /* Location of ENV stored in block 0 OOB */
+#define CFG_PREBOOT_OVERRIDE 1 /* allow preboot from memory */
++#define CFG_ENV_OVERRIDE /* allow pre-loading the environment */
+
+#define NAND_MAX_CHIPS 1
+#define CFG_NAND_BASE 0x4e000000
More information about the commitlog
mailing list