Split crt0.S.lb into prologue and epilogue
(the latter only for romcc), rename crt0_includes.h to crt0.S, and compile that directly. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5383 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
362db613a0
commit
e64b63750f
2
Makefile
2
Makefile
|
@ -320,7 +320,7 @@ clean-for-update: doxygen-clean
|
|||
rm -f $(DEPENDENCIES)
|
||||
rm -f $(obj)/coreboot_ram* $(obj)/coreboot.romstage $(obj)/coreboot.pre* $(obj)/coreboot.bootblock $(obj)/coreboot.a
|
||||
rm -rf $(obj)/bootblock* $(obj)/romstage* $(obj)/location.*
|
||||
rm -f $(obj)/option_table.* $(obj)/crt0_includes.h $(obj)/ldscript
|
||||
rm -f $(obj)/option_table.* $(obj)/crt0.S $(obj)/ldscript
|
||||
rm -f $(obj)/mainboard/$(MAINBOARDDIR)/static.c $(obj)/mainboard/$(MAINBOARDDIR)/config.py $(obj)/mainboard/$(MAINBOARDDIR)/static.dot
|
||||
rm -f $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s $(obj)/mainboard/$(MAINBOARDDIR)/crt0.disasm
|
||||
rm -f $(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc
|
||||
|
|
|
@ -16,7 +16,7 @@ $(obj)/ldscript.ld: $$(ldscripts) $(obj)/ldoptions
|
|||
printf 'INCLUDE "ldoptions"\n' > $@
|
||||
printf '$(foreach ldscript,$(ldscripts),INCLUDE "$(ldscript:$(obj)/%=%)"\n)' >> $@
|
||||
|
||||
$(obj)/crt0_includes.h: $$(crt0s)
|
||||
$(obj)/crt0.S: $$(crt0s)
|
||||
@printf " GEN $(subst $(obj)/,,$(@))\n"
|
||||
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
|
||||
|
||||
|
@ -24,7 +24,7 @@ $(obj)/mainboard/$(MAINBOARDDIR)/crt0.initobj.o: $(obj)/mainboard/$(MAINBOARDDIR
|
|||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
||||
$(CC) -MMD -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
|
||||
|
||||
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(src)/arch/i386/init/crt0.S.lb $(obj)/crt0_includes.h
|
||||
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(obj)/crt0.S
|
||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
||||
$(CC) -MMD -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -include $(obj)/config.h -I. -I$(src) $< > $@.new && mv $@.new $@
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ $(obj)/romstage/ldscript.ld: $$(ldscripts) $(obj)/ldoptions
|
|||
mkdir -p $(obj)/romstage
|
||||
printf '$(foreach ldscript,ldoptions location.ld $(ldscripts),INCLUDE "$(ldscript:$(obj)/%=%)"\n)' > $@
|
||||
|
||||
$(obj)/romstage/crt0_includes.h: $$(crt0s)
|
||||
$(obj)/romstage/crt0.S: $$(crt0s)
|
||||
@printf " GEN $(subst $(obj)/,,$(@))\n"
|
||||
mkdir -p $(obj)/romstage
|
||||
printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
|
||||
|
@ -105,7 +105,7 @@ $(obj)/mainboard/$(MAINBOARDDIR)/crt0.initobj.o: $(obj)/mainboard/$(MAINBOARDDIR
|
|||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
||||
$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
|
||||
|
||||
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(src)/arch/i386/init/crt0.S.lb $(obj)/romstage/crt0_includes.h
|
||||
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(obj)/romstage/crt0.S
|
||||
@printf " CC $(subst $(obj)/,,$(@))\n"
|
||||
$(CC) -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -I$(obj)/romstage -include $(obj)/config.h -I. -I$(src) $< > $@.new && mv $@.new $@
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ endif
|
|||
#######################################################################
|
||||
# done
|
||||
|
||||
crt0s =
|
||||
crt0s = $(src)/arch/i386/init/crt0_prologue.inc
|
||||
ldscripts =
|
||||
ldscripts += $(src)/arch/i386/init/ldscript_fallback_cbfs.lb
|
||||
ifeq ($(CONFIG_BIG_BOOTBLOCK),y)
|
||||
|
@ -196,6 +196,10 @@ crt0s += $(chipset_bootblock_inc)
|
|||
ldscripts += $(chipset_bootblock_lds)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ROMCC),y)
|
||||
crt0s += $(src)/arch/i386/init/crt0_romcc_epilogue.inc
|
||||
endif
|
||||
|
||||
OPTION_TABLE_H:=
|
||||
ifeq ($(CONFIG_HAVE_OPTION_TABLE),y)
|
||||
OPTION_TABLE_H:=$(obj)/option_table.h
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright 2002 Eric Biederman
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
|
||||
#include <arch/asm.h>
|
||||
#include <arch/intel.h>
|
||||
#include <console/loglevel.h>
|
||||
|
||||
#ifndef ASM_CONSOLE_LOGLEVEL
|
||||
#define ASM_CONSOLE_LOGLEVEL CONFIG_MAXIMUM_CONSOLE_LOGLEVEL
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is the entry code the code in .reset section
|
||||
* jumps to this address.
|
||||
*
|
||||
*/
|
||||
.section ".rom.data", "a", @progbits
|
||||
.section ".rom.text", "ax", @progbits
|
||||
|
||||
post_code(0x01) /* delay for chipsets */
|
||||
|
|
@ -21,27 +21,6 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <arch/asm.h>
|
||||
#include <arch/intel.h>
|
||||
#include <console/loglevel.h>
|
||||
|
||||
#ifndef ASM_CONSOLE_LOGLEVEL
|
||||
#define ASM_CONSOLE_LOGLEVEL CONFIG_MAXIMUM_CONSOLE_LOGLEVEL
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is the entry code the code in .reset section
|
||||
* jumps to this address.
|
||||
*
|
||||
*/
|
||||
.section ".rom.data", "a", @progbits
|
||||
.section ".rom.text", "ax", @progbits
|
||||
|
||||
post_code(0x01) /* delay for chipsets */
|
||||
|
||||
#include "crt0_includes.h"
|
||||
|
||||
#if CONFIG_USE_DCACHE_RAM == 0
|
||||
#ifndef CONSOLE_DEBUG_TX_STRING
|
||||
/* uses: esp, ebx, ax, dx */
|
||||
# define __CRT_CONSOLE_TX_STRING(string) \
|
||||
|
@ -143,5 +122,3 @@ str_pre_main: .string "Jumping to coreboot.\r\n"
|
|||
|
||||
str_coreboot_ram_name: .ascii CONFIG_CBFS_PREFIX
|
||||
.string "/coreboot_ram"
|
||||
|
||||
#endif /* CONFIG_USE_DCACHE_RAM */
|
Loading…
Reference in New Issue