From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Edwards Date: Tue, 11 Apr 2017 19:06:28 -0400 Subject: [U-Boot] [PATCH 1/2] mips: qemu-mips: Remove obsolete CONFIG_SYS_MONITOR_LEN from config In-Reply-To: <1491951989-15837-1-git-send-email-kyleedwardsny@gmail.com> References: <1491951989-15837-1-git-send-email-kyleedwardsny@gmail.com> Message-ID: <1491951989-15837-2-git-send-email-kyleedwardsny@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Cc: Daniel Schwierzeck --- include/configs/qemu-mips.h | 3 +-- 1 file changed, 1 insertion(+), 2 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 -- 2.7.4