
So I tried to read this whole thread and got lost in the discussion. I'm wondering of something along the following lines would address your concerns:
#define CONFIG_SYS_FDT_PAD 0x3000
/* Allow for arch specific config before we boot */ int __fdt_board_size(void) { return CONFIG_SYS_FDT_PAD; } int fdt_board_size(void) __attribute__((weak, alias("__ fdt_board_size")));
int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base, char **of_flat_tree, ulong *of_size) { ...
if ((fdt_blob + *of_size + fdt_board_size()) >= ((char *)CONFIG_SYS_BOOTMAPSZ + bootmap_base)) relocate = 1;
... }
Than board specific code knows what fix ups might happen and can implement dynamic behavior and do something like:
int fdt_board_size(void) { determine_my_firmsize() + __fdt_board_size() }
- k