diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2013-02-04 19:15:06 +0100 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-02-04 22:57:20 +0100 |
commit | ed08bcc12dddfd65edb38353530fec5fae17258d (patch) | |
tree | 6fb50881a7626b764bedecf2dfbca8c0fb3db0a9 /src | |
parent | 63950f83f941c0a6747b5f22b1d7edafb67f5476 (diff) | |
download | coreboot-ed08bcc12dddfd65edb38353530fec5fae17258d.tar.xz |
Hook up corebootPkg as Tianocore payload
This unplugs Stefan's PIANO project.
Change Tianocore payload configuration to use corebootPkg.
As argument you have to give it the COREBOOT.FD generated by
the Tianocore build system.
It automatically determines base address and entry point.
Compression setting is honored (ie. no compression if you don't
want), but corebootPkg currently assumes that coreboot is doing
it. Loading a 6MB payload into CBFS without compression will fail
more often than not.
Change-Id: If9c64c9adb4a846a677c8af40f149ce697059ee6
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/2280
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/Kconfig | 10 | ||||
-rw-r--r-- | src/arch/x86/Makefile.inc | 26 |
2 files changed, 17 insertions, 19 deletions
diff --git a/src/Kconfig b/src/Kconfig index e24eb78037..95afbe1acc 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -539,9 +539,9 @@ endchoice config TIANOCORE_FILE string "Tianocore FILE" depends on PAYLOAD_TIANOCORE - default "DXEFV.Fv" + default "COREBOOT.FD" help - TBD + The result of a corebootPkg build config PAYLOAD_FILE string "Payload path and filename" @@ -558,15 +558,11 @@ config PAYLOAD_FILE depends on PAYLOAD_FILO default "payloads/external/FILO/filo/build/filo.elf" -config PAYLOAD_FILE - depends on PAYLOAD_TIANOCORE - default "$(obj)/tiano/tianocoreboot.elf" - # TODO: Defined if no payload? Breaks build? config COMPRESSED_PAYLOAD_LZMA bool "Use LZMA compression for payloads" default y - depends on PAYLOAD_ELF || PAYLOAD_SEABIOS || PAYLOAD_FILO + depends on PAYLOAD_ELF || PAYLOAD_SEABIOS || PAYLOAD_FILO || PAYLOAD_TIANOCORE help In order to reduce the size payloads take up in the ROM chip coreboot can compress them using the LZMA algorithm. diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index e498121dbe..4d02fcea98 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -48,9 +48,6 @@ endif ifeq ($(CONFIG_PAYLOAD_FILO),y) COREBOOT_ROM_DEPENDENCIES+=filo endif -ifeq ($(CONFIG_PAYLOAD_TIANOCORE),y) -COREBOOT_ROM_DEPENDENCIES+=tianocore -endif ifeq ($(CONFIG_AP_CODE_IN_CAR),y) COREBOOT_ROM_DEPENDENCIES+=$(objcbfs)/coreboot_ap.elf endif @@ -103,10 +100,20 @@ ifeq ($(CONFIG_PAYLOAD_FILO),y) $(CBFSTOOL) $@.tmp add-payload -f $(CONFIG_PAYLOAD_FILE) -n $(CONFIG_CBFS_PREFIX)/payload -c $(CBFS_PAYLOAD_COMPRESS_FLAG) endif ifeq ($(CONFIG_PAYLOAD_TIANOCORE),y) - @printf " PAYLOAD Tiano Core (internal, compression: $(CBFS_PAYLOAD_COMPRESS_FLAG))\n" - $(CBFSTOOL) $@.tmp add-payload -f $(CONFIG_PAYLOAD_FILE) -n $(CONFIG_CBFS_PREFIX)/payload -c $(CBFS_PAYLOAD_COMPRESS_FLAG) - @printf " PAYLOAD Tiano Core FD $(CONFIG_TIANOCORE_FILE)\n" - $(CBFSTOOL) $@.tmp add -f $(CONFIG_TIANOCORE_FILE) -n $(CONFIG_CBFS_PREFIX)/tianocore.fd -t raw + @printf " PAYLOAD Tiano Core (compression: $(CBFS_PAYLOAD_COMPRESS_FLAG))\n" + $(eval $(shell \ + TMPFILE=`mktemp`; \ + head -c1200 $(CONFIG_TIANOCORE_FILE) | \ + tail -c1100 > $$TMPFILE && \ + LC_ALL=C objdump -x $$TMPFILE | \ + grep .text | while read idx nam size vma lma off align; do \ + printf "TIANO_ENTRY:=%d " 0x$$vma; \ + expr `printf "%d - %d - 100" 0x$$vma 0x$$off`; \ + done && \ + rm $$TMPFILE)) + $(eval TIANO_BASE:=$(word 2,$(TIANO_ENTRY))) + $(eval TIANO_ENTRY:=$(word 1,$(TIANO_ENTRY))) + $(CBFSTOOL) $@.tmp add-flat-binary -f $(CONFIG_TIANOCORE_FILE) -n $(CONFIG_CBFS_PREFIX)/payload -l $(TIANO_BASE) -e $(TIANO_ENTRY) -c $(CBFS_PAYLOAD_COMPRESS_FLAG) endif ifeq ($(CONFIG_INCLUDE_CONFIG_FILE),y) @printf " CONFIG $(DOTCONFIG)\n" @@ -417,8 +424,3 @@ filo: CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \ CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE) -tianocore: - $(MAKE) -C payloads/tianocoreboot \ - CC="$(CC)" AS="$(AS)" OBJCOPY="$(OBJCOPY)" \ - obj=$(abspath $(obj))/tiano - |