[meta-xilinx] u-boot environment limit

Arno Steffens star at gmx.li
Tue Feb 14 06:39:42 PST 2017


> On 14 February 2017 at 23:22, Arno Steffens <star at gmx.li> wrote:
> > If I increase the uboot environment (by patching zynq-common.h) it happens that uboot stops working.
> > With a few lines changing/adding it seems to boot normal.
> > With more lines is stops after "DRAM:  ECC disabled 496 MiB"
> >
> > Now I played with the patch and get once this (see below):
> > This looks a bit like overwriting memory.
> >
> > So is there a fix limit for the environment? It seems to be one huge string, right?
> > How can I extend this? Is this a bug?
> >
> > #define CONFIG_ENV_SIZE                 0x10000 -> this seems to me big enough.
> 
> The default zynq-common.h CONFIG_ENV_SIZE is double this value, 128 <<
> 10 == 0x20000. And the default environment is pretty packed (64K might
> not be enough).
> 
> If you want your environment to fit within 64K, you will need to
> reduce the default environment config that is provided by
> zynq-common.h.
> 

Uboot shows me like that:
Environment size: 4437/65532 bytes
Seems to be much headroom

> >
> > U-Boot 2016.07-dirty (Feb 14 2017 - 12:59:07 +0100)
> >
> > Model: Zynq MicroZED Board
> > Board: Xilinx Zynq
> > DRAM:  ECC disabled 496 MiB
> > Error binding driver 'gpio_zynq': -12
> > Error binding driver 'serial_zynq': -12
> > Error binding driver 'zynq_qspi': -12
> > Error binding driver 'zynq_gem': -12
> > Error binding driver 'arasan_sdhci': -12
> > Error binding driver 'generic_simple_bus': -12
> > Some drivers failed to bind
> > Error binding driver 'generic_simple_bus': -12
> > Some drivers failed to bind
> > initcall sequence 1ef99b98 failed at call 0400ea34 (err=-12)
> > ### ERROR ### Please RESET the board ###
> 
> These are all ENOMEM errors, likely caused because they are trying to
> read/write past the end of the environment.
> 

Looking at this I can see an address simular to this one:
fdtcontroladdr=1ef95d30
Does it mean to less RAM for uboot?

I don't set this strange number active, found this is 

./common/board_r.c:	setenv_addr("fdtcontroladdr", gd->fdt_blob);

# ifndef CONFIG_SPL_BUILD
	/* Allow the early environment to override the fdt address */
	gd->fdt_blob = (void *)getenv_ulong("fdtcontroladdr", 16,
						(uintptr_t)gd->fdt_blob);
# endif

I have less memory than the standard 1GB.
Just 512MB witch is splitted to 496 and 16 MB via devicetree:

-	memory {
-		device_type = "memory";
-		reg = <0 0x40000000>;
-	};
+  memory {
+    device_type = "memory";
+    reg = <0x0 0x1f000000>; 
+  };
+
+  reserved-memory {
+    #address-cells = <1>;
+    #size-cells = <1>;
+    ranges;
+    buffer_fpga: buffer_fpga at 0x1f000000 {
+    no-map;
+    reg = <0x1f000000 0x1000000>;
+    };
+  };



Best regards
Steffen




> Regards,
> Nathan
> 



More information about the meta-xilinx mailing list