diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 3f3318fa84..e8f87b4d54 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -112,7 +112,7 @@ STAGE0_ARCH_X86_SRC += archelfboot.c endif ifeq ($(CONFIG_CPU_I586),y) - STAGE0_CAR_OBJ = stage0_i586.o + STAGE0_CAR_OBJ = i586/stage0.o else ifeq ($(CONFIG_CPU_AMD_GEODELX),y) STAGE0_CAR_OBJ = geodelx/stage0.o @@ -243,15 +243,7 @@ $(obj)/arch/x86/%.o: $(src)/arch/x86/%.c $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ # Building asm stub. -$(obj)/arch/x86/stage0%.o: $(src)/arch/x86/stage0%.S - $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(CC) -E $(COREBOOTINCLUDE) $< \ - -o $(obj)/arch/x86/stage0_asm.s -DBOOTBLK=0x1f00 \ - -DRESRVED=0xf0 -DDATE=\"`date +%Y/%m/%d`\" - $(Q)printf " AS $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(AS) $(obj)/arch/x86/stage0_asm.s -o $@ - -$(obj)/arch/x86/geodelx/stage0.o: $(src)/arch/x86/geodelx/stage0.S +$(obj)/arch/x86/%/stage0.o: $(src)/arch/x86/%/stage0.S $(Q)mkdir -p $(dir $@) $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(CC) -E $(COREBOOTINCLUDE) $< \ @@ -260,18 +252,6 @@ $(obj)/arch/x86/geodelx/stage0.o: $(src)/arch/x86/geodelx/stage0.S $(Q)printf " AS $(subst $(shell pwd)/,,$(@))\n" $(Q)$(AS) $(obj)/arch/x86/stage0_asm.s -o $@ - -# NOTE HACK. Stefan will fix this :-) -$(obj)/arch/x86/amd/stage0.o: $(src)/arch/x86/amd/stage0.S - $(Q)mkdir -p $(dir $@) - $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(CC) -E $(COREBOOTINCLUDE) $< \ - -I $(src)/include/arch/x86/amd/k8 \ - -o $(obj)/arch/x86/stage0_asm.s -DBOOTBLK=0x1f00 \ - -DRESRVED=0xf0 -DDATE=\"`date +%Y/%m/%d`\" - $(Q)printf " AS $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(AS) $(obj)/arch/x86/stage0_asm.s -o $@ - $(obj)/coreboot.initram $(obj)/coreboot.initram.map: $(obj)/stage0.init $(obj)/stage0-prefixed.o $(INITRAM_SRC) $(Q)printf " CC $(subst $(shell pwd)/,,$(@)) (XIP)\n" $(Q)$(CC) $(INITCFLAGS) -fPIE -c -combine $(COMBINEFLAGS) $(INITRAM_SRC) -o $(obj)/coreboot.initram_partiallylinked.o diff --git a/arch/x86/stage0_i586.S b/arch/x86/i586/stage0.S similarity index 100% rename from arch/x86/stage0_i586.S rename to arch/x86/i586/stage0.S