mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 18:14:24 +00:00
Generate build time and date message at link time.
So it updates each time a bootloader changes, not just when bl*_main.c files are recompiled. Fixes ARM-software/tf-issues#33 Change-Id: Ie8e1a7bd7e1913d2e96ac268606284f76af8c5ab Signed-off-by: Jon Medhurst <tixy@linaro.org>
This commit is contained in:
parent
38aa76a87f
commit
fb05246201
6 changed files with 10 additions and 11 deletions
5
Makefile
5
Makefile
|
@ -353,8 +353,11 @@ $(BUILD_DIR) :
|
||||||
|
|
||||||
$(ELF) : $(OBJS) $(LINKERFILE)
|
$(ELF) : $(OBJS) $(LINKERFILE)
|
||||||
@echo " LD $$@"
|
@echo " LD $$@"
|
||||||
|
@echo 'const char build_message[] = "Built : "__TIME__", "__DATE__;' | \
|
||||||
|
$$(CC) $$(CFLAGS) -xc - -o $(BUILD_DIR)/build_message.o
|
||||||
$$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \
|
$$(Q)$$(LD) -o $$@ $$(LDFLAGS) -Map=$(MAPFILE) --script $(LINKERFILE) \
|
||||||
--entry=$(BL$(1)_ENTRY_POINT) $(OBJS)
|
--entry=$(BL$(1)_ENTRY_POINT) $(OBJS) \
|
||||||
|
$(BUILD_DIR)/build_message.o
|
||||||
|
|
||||||
$(DUMP) : $(ELF)
|
$(DUMP) : $(ELF)
|
||||||
@echo " OD $$@"
|
@echo " OD $$@"
|
||||||
|
|
|
@ -70,7 +70,7 @@ void bl1_main(void)
|
||||||
|
|
||||||
/* Announce our arrival */
|
/* Announce our arrival */
|
||||||
printf(FIRMWARE_WELCOME_STR);
|
printf(FIRMWARE_WELCOME_STR);
|
||||||
printf("Built : %s, %s\n\r", __TIME__, __DATE__);
|
printf("%s\n\r", build_message);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find out how much free trusted ram remains after BL1 load
|
* Find out how much free trusted ram remains after BL1 load
|
||||||
|
|
|
@ -58,9 +58,7 @@ void bl2_main(void)
|
||||||
/* Perform platform setup in BL1 */
|
/* Perform platform setup in BL1 */
|
||||||
bl2_platform_setup();
|
bl2_platform_setup();
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
printf("BL2 %s\n\r", build_message);
|
||||||
printf("BL2 Built : %s, %s\n\r", __TIME__, __DATE__);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Find out how much free trusted ram remains after BL2 load */
|
/* Find out how much free trusted ram remains after BL2 load */
|
||||||
bl2_tzram_layout = bl2_plat_sec_mem_layout();
|
bl2_tzram_layout = bl2_plat_sec_mem_layout();
|
||||||
|
|
|
@ -83,9 +83,8 @@ void bl31_main(void)
|
||||||
/* Perform platform setup in BL1 */
|
/* Perform platform setup in BL1 */
|
||||||
bl31_platform_setup();
|
bl31_platform_setup();
|
||||||
|
|
||||||
#if defined (__GNUC__)
|
printf("BL31 %s\n\r", build_message);
|
||||||
printf("BL31 Built : %s, %s\n\r", __TIME__, __DATE__);
|
|
||||||
#endif
|
|
||||||
/* Initialise helper libraries */
|
/* Initialise helper libraries */
|
||||||
bl31_lib_init();
|
bl31_lib_init();
|
||||||
|
|
||||||
|
|
|
@ -121,9 +121,7 @@ uint64_t tsp_main(void)
|
||||||
tsp_stats[linear_id].cpu_on_count++;
|
tsp_stats[linear_id].cpu_on_count++;
|
||||||
|
|
||||||
spin_lock(&console_lock);
|
spin_lock(&console_lock);
|
||||||
#if defined (__GNUC__)
|
printf("TSP %s\n\r", build_message);
|
||||||
printf("TSP Built : %s, %s\n\r", __TIME__, __DATE__);
|
|
||||||
#endif
|
|
||||||
INFO("Total memory base : 0x%x\n", mem_layout->total_base);
|
INFO("Total memory base : 0x%x\n", mem_layout->total_base);
|
||||||
INFO("Total memory size : 0x%x bytes\n", mem_layout->total_size);
|
INFO("Total memory size : 0x%x bytes\n", mem_layout->total_size);
|
||||||
INFO("Free memory base : 0x%x\n", mem_layout->free_base);
|
INFO("Free memory base : 0x%x\n", mem_layout->free_base);
|
||||||
|
|
|
@ -140,6 +140,7 @@ extern void __dead2 run_image(unsigned long entrypoint,
|
||||||
void *first_arg,
|
void *first_arg,
|
||||||
void *second_arg);
|
void *second_arg);
|
||||||
extern unsigned long *get_el_change_mem_ptr(void);
|
extern unsigned long *get_el_change_mem_ptr(void);
|
||||||
|
extern const char build_message[];
|
||||||
|
|
||||||
#endif /*__ASSEMBLY__*/
|
#endif /*__ASSEMBLY__*/
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue