mx6cuboxi: Move the default environment for all devices
authorJon Nettleton <jon@solid-run.com>
Mon, 25 Jun 2018 10:39:03 +0000 (13:39 +0300)
committerStefano Babic <sbabic@denx.de>
Mon, 23 Jul 2018 08:56:06 +0000 (10:56 +0200)
Previously we had stored the environment right after the
u-boot.img on the disk.  I never liked this because with dtbs
being included and such the image could grow in size.  Instead
we move the environment to be negatively offset from the 1MB
mark.  Almost all our images start at 4MB's, and most standard
images start at 1MB, and all our storage devices are a minimum
1MB.  Therefore we can store env there for all classes of devices
and have plenty of space in case u-boot.img needs to grow.

Signed-off-by: Jon Nettleton <jon@solid-run.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
include/configs/mx6cuboxi.h

index a647aab..7fa63fd 100644 (file)
 
 /* Environment organization */
 #define CONFIG_ENV_SIZE                        (8 * 1024)
-#define CONFIG_ENV_OFFSET              (8 * 64 * 1024)
+#define CONFIG_ENV_OFFSET              (SZ_1M - CONFIG_ENV_SIZE)
 
 #endif                         /* __MX6CUBOXI_CONFIG_H */