"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

vbe: Provide VPL binman-symbols for the next phase

Add support for moving from TPL->VPL->SPL so that the VPL build can fit
properly into the boot flow.

Use #ifdefs to avoid creating unwanted symbols which Binman would then
try (and perhaps fail) to provide.

Add debugging to indicate the next phase.

Signed-off-by: Simon Glass <sjg@chromium.org>

authored by

Simon Glass and committed by
Tom Rini
dab3bbc2 384f815d

+20 -6
+20 -6
common/spl/spl.c
··· 50 50 51 51 #if CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS) 52 52 /* See spl.h for information about this */ 53 + #if defined(CONFIG_SPL_BUILD) 53 54 binman_sym_declare(ulong, u_boot_any, image_pos); 54 55 binman_sym_declare(ulong, u_boot_any, size); 56 + #endif 55 57 56 58 #ifdef CONFIG_TPL 57 59 binman_sym_declare(ulong, u_boot_spl_any, image_pos); ··· 179 181 if (xpl_next_phase() == PHASE_VPL) 180 182 return binman_sym(ulong, u_boot_vpl_any, image_pos); 181 183 #endif 182 - return xpl_next_phase() == PHASE_SPL ? 183 - binman_sym(ulong, u_boot_spl_any, image_pos) : 184 - binman_sym(ulong, u_boot_any, image_pos); 184 + #if defined(CONFIG_TPL) && !defined(CONFIG_VPL) 185 + if (xpl_next_phase() == PHASE_SPL) 186 + return binman_sym(ulong, u_boot_spl_any, image_pos); 187 + #endif 188 + #if defined(CONFIG_SPL_BUILD) 189 + return binman_sym(ulong, u_boot_any, image_pos); 190 + #endif 191 + 192 + return BINMAN_SYM_MISSING; 185 193 } 186 194 187 195 ulong spl_get_image_size(void) ··· 263 271 */ 264 272 if (u_boot_pos && u_boot_pos != BINMAN_SYM_MISSING) { 265 273 /* Binman does not support separated entry addresses */ 266 - spl_image->entry_point = u_boot_pos; 267 - spl_image->load_addr = u_boot_pos; 274 + spl_image->entry_point = spl_get_image_text_base(); 275 + spl_image->load_addr = spl_get_image_text_base(); 276 + spl_image->size = spl_get_image_size(); 277 + log_debug("Next load addr %lx\n", spl_image->load_addr); 268 278 } else { 269 279 spl_image->entry_point = CONFIG_SYS_UBOOT_START; 270 280 spl_image->load_addr = CONFIG_TEXT_BASE; 281 + log_debug("Default load addr %x (u_boot_pos=%lx)\n", 282 + CONFIG_TEXT_BASE, u_boot_pos); 271 283 } 272 284 spl_image->os = IH_OS_U_BOOT; 273 - spl_image->name = "U-Boot"; 285 + spl_image->name = xpl_name(xpl_next_phase()); 286 + log_debug("Next phase: %s at %lx size %lx\n", spl_image->name, 287 + spl_image->load_addr, (ulong)spl_image->size); 274 288 } 275 289 276 290 __weak int spl_parse_board_header(struct spl_image_info *spl_image,