@@ -522,6 +522,12 @@ The following options need to be configured:
expect it to be in bytes, others in MB.
Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes.
+ CONFIG_DISABLE_ENV_INIT [relevant for MIPS only]
+
+ Disable initialization of traditional environment variables
+ passed to Linux. Modern kernels only use variables from command
+ line.
+
CONFIG_OF_LIBFDT
New kernel versions are expecting firmware settings to be
@@ -33,6 +33,12 @@ DECLARE_GLOBAL_DATA_PTR;
#define LINUX_MAX_ENVS 256
#define LINUX_MAX_ARGS 256
+#if defined(CONFIG_DISABLE_ENV_INIT)
+#define need_linux_env 0
+#else
+#define need_linux_env 1
+#endif
+
static int linux_argc;
static char **linux_argv;
static char *linux_argp;
@@ -201,7 +207,8 @@ static void boot_prep_linux_legacy(bootm_headers_t *images)
static void boot_prep_linux(bootm_headers_t *images)
{
- boot_prep_linux_legacy(images);
+ if (need_linux_env)
+ boot_prep_linux_legacy(images);
}
static void boot_jump_linux(bootm_headers_t *images)
Recent linux kernels do not use that special environment variables anymore. Add an option to disable compilation of that code but keep it for compatibilty with older kernels. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> --- README | 6 ++++++ arch/mips/lib/bootm.c | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-)