Makefile: rename linker intermediate variable
Renamed CONFIG_ROMBASE to ROMSTAGE_BASE and removed it from Kconfig. Removed no-op calculation in ldscript. Change-Id: I53d39b60f07db76c8537b3133e59360687b9d4a7 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/802 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-by: Rudolf Marek <r.marek@assembler.cz>
This commit is contained in:
parent
c0ea5436c4
commit
2172f61ede
|
@ -8,10 +8,6 @@ config AP_IN_SIPI_WAIT
|
||||||
default n
|
default n
|
||||||
depends on ARCH_X86
|
depends on ARCH_X86
|
||||||
|
|
||||||
config ROMBASE
|
|
||||||
hex
|
|
||||||
default 0xffff0000
|
|
||||||
|
|
||||||
config RAMBASE
|
config RAMBASE
|
||||||
hex
|
hex
|
||||||
default 0x100000
|
default 0x100000
|
||||||
|
|
|
@ -342,10 +342,10 @@ $(obj)/bootblock.elf: $(obj)/mainboard/$(MAINBOARDDIR)/bootblock.o $(obj)/bootbl
|
||||||
# Build the romstage
|
# Build the romstage
|
||||||
$(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $$(romstage-objs) $(obj)/romstage/ldscript.ld
|
$(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $$(romstage-objs) $(obj)/romstage/ldscript.ld
|
||||||
@printf " LINK $(subst $(obj)/,,$(@))\n"
|
@printf " LINK $(subst $(obj)/,,$(@))\n"
|
||||||
printf "CONFIG_ROMBASE = 0x0;\n" > $(obj)/location.ld
|
printf "ROMSTAGE_BASE = 0x0;\n" > $(obj)/location.ld
|
||||||
$(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(romstage-objs)
|
$(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(romstage-objs)
|
||||||
$(OBJCOPY) -O binary $(obj)/romstage.elf $(obj)/romstage.bin
|
$(OBJCOPY) -O binary $(obj)/romstage.elf $(obj)/romstage.bin
|
||||||
printf "CONFIG_ROMBASE = 0x" > $(obj)/location.ld
|
printf "ROMSTAGE_BASE = 0x" > $(obj)/location.ld
|
||||||
$(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin $(CONFIG_CBFS_PREFIX)/romstage $(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt || { echo "The romstage is larger than XIP size. Please expand the CONFIG_XIP_ROM_SIZE" ; exit 1; }
|
$(CBFSTOOL) $(obj)/coreboot.pre1 locate $(obj)/romstage.bin $(CONFIG_CBFS_PREFIX)/romstage $(CONFIG_XIP_ROM_SIZE) > $(obj)/location.txt || { echo "The romstage is larger than XIP size. Please expand the CONFIG_XIP_ROM_SIZE" ; exit 1; }
|
||||||
cat $(obj)/location.txt >> $(obj)/location.ld
|
cat $(obj)/location.txt >> $(obj)/location.ld
|
||||||
printf ';\n' >> $(obj)/location.ld
|
printf ';\n' >> $(obj)/location.ld
|
||||||
|
|
|
@ -25,13 +25,8 @@ OUTPUT_ARCH(i386)
|
||||||
TARGET(binary)
|
TARGET(binary)
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = CONFIG_ROMBASE;
|
. = ROMSTAGE_BASE;
|
||||||
|
|
||||||
/* cut _start into last 64k */
|
|
||||||
_x = .;
|
|
||||||
. = (_x < CONFIG_ROMBASE) ? (CONFIG_ROMBASE) : _x;
|
|
||||||
|
|
||||||
/* This section might be better named .setup */
|
|
||||||
.rom . : {
|
.rom . : {
|
||||||
_rom = .;
|
_rom = .;
|
||||||
*(.rom.text);
|
*(.rom.text);
|
||||||
|
|
Loading…
Reference in New Issue