-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi -
Due to excitement caused by the kernel packages deleting the U-Boot env
on install on NOR-capable kernels (since fixed apparently) I notice that
the default U-Boot env situation seems broken.
The attached patch changes U-Boot behaviour and gta02 machine config to
allow a NOR-capable kernel to boot with the default env in the case the
env was destroyed somehow.
Is it the right thing, part of a larger solution? It at least enables
the device to boot.
- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFHkIQQOjLpvpq7dMoRAhGTAJ9tSeeLQzFeRNmnVJoIACB1/1y7CQCcCEu5
tGiemoZykZsPJ9yiNHtfuuY=
=QvsV
-----END PGP SIGNATURE-----
adjust-default-env.patch
From: warmcat <[EMAIL PROTECTED]>
- MTDPARTS_DEFAULT seemed to have been mis-spelt, MTPARTS_DEFAULT
- it is not created in the env if absent causing boot to fail
- gta02 config still had /dev/mtdblock4 not 5 as default
Signed-off-by: Andy Green <[EMAIL PROTECTED]>
---
common/env_common.c | 8 ++++++--
include/configs/neo1973_gta02.h | 5 +++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/common/env_common.c b/common/env_common.c
index d7af31f..612c38b 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -274,8 +274,12 @@ void env_relocate (void)
setenv("mtdpartsraw", NULL);
/* get ahold of mtdparts if it exists */
mtdparts = getenv("mtdparts");
- if (mtdparts == NULL)
- goto bail;
+ if (mtdparts == NULL) {
+ setenv("mtdparts", MTDPARTS_DEFAULT);
+ mtdparts = getenv("mtdparts");
+ if (!mtdparts)
+ goto bail;
+ }
if (strlen(mtdparts) < 9) /* "mtdparts=" is 9 chars */
goto bail;
/*
diff --git a/include/configs/neo1973_gta02.h b/include/configs/neo1973_gta02.h
index cfbf750..bb59abc 100644
--- a/include/configs/neo1973_gta02.h
+++ b/include/configs/neo1973_gta02.h
@@ -191,7 +191,8 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"usbtty=cdc_acm\0" \
"stderr=usbtty\0stdout=usbtty\0stdin=usbtty\0" \
- "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC2,115200 console=tty0 loglevel=8\0" \
+ "bootargs_base=rootfstype=jffs2 root=/dev/mtdblock5 console=ttySAC2,115200 console=tty0 loglevel=8\0" \
+ "splashimage=nand read.e 0x32000000 splash 0x5000; unzip 0x32000000 0x08800000 0x96000\0" \
""
/*-----------------------------------------------------------------------
@@ -278,7 +279,7 @@
#define CONFIG_RTC_PCF50633 1
#define MTDIDS_DEFAULT "nand0=neo1973-nand"
-#define MTPARTS_DEFAULT "neo1973-nand:256k(u-boot),128k(u-boot_env),2M(kernel),640k(splash),-(rootfs)"
+#define MTDPARTS_DEFAULT "mtdparts=neo1973-nand:256k(u-boot),256k(u-boot_env),2M(kernel),640k(splash),-(rootfs)"
#define CFG_NAND_DYNPART_MTD_KERNEL_NAME "neo1973-nand"
#define CONFIG_NAND_DYNPART