Why i can't run save on a multi-core combined u-boot.ldr on ADSP-SC5xx board

Document created by HuanFeng Employee on Jul 27, 2017Last modified by HuanFeng Employee on Sep 19, 2017
Version 3Show Document
  • View in full screen mode

Q:  After flashing a multi-core uboot.ldr which is combined with mcapi_send_recv_Core1_sc589.dxe and u-boot and init file on ADSP-SC5xx EZ-Kit board, the console gives out a message "Warning – bad CRC , using default environment", the board will not boot on next power on or reset.

 

A: This issue is mostly because elfloader.exe does not support the "punchit" feature as of now, save command will write into Flash and break the dual core u-boot.ldr image on it. For users prefer to use save command to change the environment on fly in dual core application, we recommend a workaround as following:

Change the u-boot source file as following, note in this example the location for saving environment variable on Flash will start from 0x70000, you will need to increase it more if the size of your combined u-boot.ldr is larger than that, but make sure to update your usage of MTD table in Linux kernel accordingly so that your MTD partion does not get overwritten by accident.

Header 1

diff --git a/include/configs/sc589-ezkit.h b/include/configs/sc589-ezkit.h
index adde83a..7dbbc65 100644
--- a/include/configs/sc589-ezkit.h
+++ b/include/configs/sc589-ezkit.h
@@ -169,10 +169,10 @@
  * Env Storage Settings
  */
 #define CONFIG_ENV_IS_IN_SPI_FLASH
-#define CONFIG_ENV_OFFSET       0x10000
+#define CONFIG_ENV_OFFSET       0x70000
 #define CONFIG_ENV_SIZE         0x2000
 #define CONFIG_ENV_SECT_SIZE    0x10000
-#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
+/*#define CONFIG_ENV_IS_EMBEDDED_IN_LDR*/
 #define CONFIG_ENV_SPI_BUS 2
 #define CONFIG_ENV_SPI_CS 1
 
diff --git a/include/configs/sc_adi_common.h b/include/configs/sc_adi_common.h
index da3599c..f940644 100644
--- a/include/configs/sc_adi_common.h
+++ b/include/configs/sc_adi_common.h
@@ -258,7 +258,7 @@
 /*
  * Env Storage Settings
  */
-#define CONFIG_ENV_OFFSET       0x10000
+#define CONFIG_ENV_OFFSET       0x70000
 #define CONFIG_ENV_SIZE         0x2000
 #define CONFIG_ENV_SECT_SIZE    0x10000
 /* We need envcrc to embed the env into LDRs */

2 people found this helpful

Attachments

    Outcomes