From: Kyle Edwards <kyleedwardsny@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH-v2 1/2] mips: qemu-mips/64: Remove obsolete CONFIG_SYS_MONITOR_LEN from config
Date: Wed, 12 Apr 2017 22:42:31 -0400 [thread overview]
Message-ID: <1492051352-5240-2-git-send-email-kyleedwardsny@gmail.com> (raw)
In-Reply-To: <1492051352-5240-1-git-send-email-kyleedwardsny@gmail.com>
This fixes an issue with the saveenv command causing U-Boot to no
longer work on the QEMU Mips pseudoboard. Because the offset of the
environment was being determined by CONFIG_SYS_MONITOR_LEN, and this
value was less than the actual size of U-Boot, saveenv was overwriting
parts of the U-Boot code. Because CONFIG_SYS_MONITOR_LEN is no longer
used on MIPS, this patch removes it and places the environment at the
end of the pseudoboard's 4MB flash.
Signed-off-by: Kyle Edwards <kyleedwardsny@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---
include/configs/qemu-mips.h | 3 +--
include/configs/qemu-mips64.h | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h
index be7f4f2..b67d413 100644
--- a/include/configs/qemu-mips.h
+++ b/include/configs/qemu-mips.h
@@ -102,7 +102,6 @@
*/
/* The following #defines are needed to get flash environment right */
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_MONITOR_LEN (192 << 10)
#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
@@ -115,10 +114,10 @@
#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
#define CONFIG_ENV_IS_IN_FLASH
-#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
/* Address and size of Primary Environment Sector */
#define CONFIG_ENV_SIZE 0x8000
+#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + (4 << 20) - CONFIG_ENV_SIZE)
#define CONFIG_ENV_OVERWRITE 1
diff --git a/include/configs/qemu-mips64.h b/include/configs/qemu-mips64.h
index 39afbff..4856087 100644
--- a/include/configs/qemu-mips64.h
+++ b/include/configs/qemu-mips64.h
@@ -102,7 +102,6 @@
*/
/* The following #defines are needed to get flash environment right */
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_MONITOR_LEN (192 << 10)
#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
@@ -115,10 +114,10 @@
#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
#define CONFIG_ENV_IS_IN_FLASH
-#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
/* Address and size of Primary Environment Sector */
#define CONFIG_ENV_SIZE 0x8000
+#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + (4 << 20) - CONFIG_ENV_SIZE)
#define CONFIG_ENV_OVERWRITE 1
--
2.7.4
next prev parent reply other threads:[~2017-04-13 2:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 2:42 [U-Boot] [PATCH-v2 0/2] Fix several bugs in qemu-mips/64 configurations Kyle Edwards
2017-04-13 2:42 ` Kyle Edwards [this message]
2017-04-14 17:35 ` [U-Boot] [PATCH-v2 1/2] mips: qemu-mips/64: Remove obsolete CONFIG_SYS_MONITOR_LEN from config Daniel Schwierzeck
2017-04-13 2:42 ` [U-Boot] [PATCH-v2 2/2] mips: qemu-mips/64: Expand malloc pool for CONFIG_SYS_BOOTPARAMS_LEN Kyle Edwards
2017-04-14 17:36 ` Daniel Schwierzeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492051352-5240-2-git-send-email-kyleedwardsny@gmail.com \
--to=kyleedwardsny@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.