]> git.baikalelectronics.ru Git - uboot.git/commitdiff
enable .flags and .callbacks searching
authorBaikal Electronics <support@baikalelectronics.ru>
Wed, 9 Aug 2023 15:00:42 +0000 (18:00 +0300)
committerBaikal Electronics <support@baikalelectronics.ru>
Wed, 9 Aug 2023 15:00:42 +0000 (18:00 +0300)
arch/mips/mach-baikal/baikal_misc.c
env/callback.c
env/flags.c

index e67d87fd81b4a69d576d8ec1f6cf41734650cddf..222a605e380baae9a098f5e99cbcbdbebe028084 100644 (file)
@@ -72,6 +72,14 @@ int board_early_init_r(void)
        gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
 
 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
+/* Copy environment to RAM for using with env_get_f()
+ * This is for restricted capabilities before import
+ */
+       void *data = malloc(CONFIG_ENV_SIZE);
+       if (data) {
+               memcpy(data, (void *)CONFIG_ENV_ADDR, CONFIG_ENV_SIZE);
+               gd->env_addr = (unsigned long)data;
+       }
        /* switch boot controller into SPI mode */
        val = readl((void __iomem *)BAIKAL_BOOT_BASE);
        val |= 0x100;
index 37e3b028d4843211e2ca7e9ab8485fdbf0bc055a..638a02b28f78a73a675994aa37fa7942ad127bb0 100644 (file)
@@ -36,7 +36,7 @@ static struct env_clbk_tbl *find_env_callback(const char *name)
        return NULL;
 }
 
-static int first_call = 0;
+static int first_call = 1;
 static const char *callback_list;
 
 /*
index 4c95ca2e304302278a57cd71f534bf82f9adffa5..e2866361dfe4f22b009a77b06f43fd2be9433dc0 100644 (file)
@@ -434,7 +434,7 @@ static int env_parse_flags_to_bin(const char *flags)
        return binflags;
 }
 
-static int first_call = 0;
+static int first_call = 1;
 static const char *flags_list;
 
 /*