# Build the romstage
$(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $$(romstage-objs) $(obj)/romstage/ldscript.ld
@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)
$(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; }
cat $(obj)/location.txt >> $(obj)/location.ld
printf ';\n' >> $(obj)/location.ld
TARGET(binary)
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.text);