[U-Boot] Wandboard: u-boot.img is getting too large

Wolfgang Denk
2016-07-05T06:11:10Z

Dear Alexey,

In message <1467694422.3144.32.camel@synopsys.com> you wrote:
>
> According to?http://wiki.wandboard.org/index.php/Boot-process#sdcard_boot_data_layout
> Wandboard's SD-card layout is as follows:
> ------------------------------>8---------------------------
> # ?Offset (hex) (dec) ? Description
> ==========================================================
> 1. 0x00000000 Reserved For MBR
> 2. 0x00000200 512 Secondary Image Table (optional)
> 3. 0x00000400 1024 uBoot Image (Starting From IVT)
> 4. 0x00060000 393216 start of uboot env (size:8k)
> 5. 0x00062000 end of uboot env
> 6. 0x00100000 1048576 Linux kernel start
> 7. 0x0076AC00 7777280 start of partition 1

So they reserve 383 KiB for U-Boot, 8 kB for the environment, and then
leave an unused gap of 632 KiB? That's silly.

> IMHO there's an obvious solution for all that - just move U-Boot's env for say
> another 300-400k above like that:

Why place the environment anywhere in the middle of that free space?
Just move it to the very end of it, i. e. make it

Offset Size Usage
1. 0x00000000 512 B Reserved For MBR
2. 0x00000200 512 B Secondary Image Table (optional)
3. 0x00000400 1015 KiB U-Boot image(s)
4. 0x000FE000 8 KiB U-Boot environment
6. 0x00100000 ... Linux kernel

Then you have all options open to grow even further, if needed, or
allocate other stuff below the env without leaving a gap.

Gaps in a memory map are always begging for trouble, expecially when
there is no reason for them.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
For those who like this sort of thing, this is the sort of thing they
like. - Abraham Lincoln