diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-12-23 12:52:56 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-12-23 12:52:56 +0000 |
commit | 9341acda13aa2e8d8df4f04f80c14ace52f9aa27 (patch) | |
tree | 5b65f3604728fcc7a3b0ce061290af9bae0ff14f /src/arch/i386/Makefile.bigbootblock.inc | |
parent | 336daa76faa6255cf487100a9741c740802bb32f (diff) | |
download | coreboot-9341acda13aa2e8d8df4f04f80c14ace52f9aa27.tar.xz |
Tiny Bootblock, step 1/n.
Introduce the tiny bootblock infrastructure and use it on QEmu.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4989 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/i386/Makefile.bigbootblock.inc')
-rw-r--r-- | src/arch/i386/Makefile.bigbootblock.inc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/arch/i386/Makefile.bigbootblock.inc b/src/arch/i386/Makefile.bigbootblock.inc new file mode 100644 index 0000000000..06af5d2b64 --- /dev/null +++ b/src/arch/i386/Makefile.bigbootblock.inc @@ -0,0 +1,35 @@ +ifdef POST_EVALUATION + +####################################################################### +# Build the final rom image + +$(obj)/coreboot.pre: $(obj)/coreboot.bootblock $(CBFSTOOL) + rm -f $@ + $(CBFSTOOL) $@ create $(CONFIG_COREBOOT_ROMSIZE_KB)K $(obj)/coreboot.bootblock + +####################################################################### +# Build the bootblock + +$(obj)/coreboot.bootblock: $(obj)/coreboot + @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" + $(OBJCOPY) -O binary $< $@ + +$(obj)/ldscript.ld: $(ldscripts) $(obj)/ldoptions + printf 'INCLUDE "ldoptions"\n' > $@ + printf '$(foreach ldscript,$(ldscripts),INCLUDE "$(ldscript:$(obj)/%=%)"\n)' >> $@ + +$(obj)/crt0_includes.h: $(crt0s) + printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@ + +$(obj)/mainboard/$(MAINBOARDDIR)/crt0.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s + $(CC) -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 + $(CC) -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 $@ + +$(obj)/coreboot: $(initobjs) $(obj)/ldscript.ld + @printf " LINK $(subst $(obj)/,,$(@))\n" + $(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(obj)/ldscript.ld $(initobjs) + $(NM) -n $(obj)/coreboot | sort > $(obj)/coreboot.map + +endif |