summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2011-04-15 03:34:05 +0000
committerStefan Reinauer <stepan@openbios.org>2011-04-15 03:34:05 +0000
commite50952f53294b3939f851c0feacaf13e31bc5a44 (patch)
tree05bd36704b36297905c13e04620e841149560af7
parentd85400d80548d8db8dd604d959fe858d33ca39be (diff)
downloadcoreboot-e50952f53294b3939f851c0feacaf13e31bc5a44.tar.xz
add FILO easy payload option
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6504 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--payloads/external/FILO/Makefile.inc43
-rw-r--r--src/Kconfig30
-rw-r--r--src/arch/x86/Makefile.inc16
3 files changed, 87 insertions, 2 deletions
diff --git a/payloads/external/FILO/Makefile.inc b/payloads/external/FILO/Makefile.inc
new file mode 100644
index 0000000000..0641c317b2
--- /dev/null
+++ b/payloads/external/FILO/Makefile.inc
@@ -0,0 +1,43 @@
+TAG-$(CONFIG_FILO_MASTER)=
+NAME-$(CONFIG_FILO_MASTER)=HEAD
+TAG-$(CONFIG_FILO_STABLE)=-r 139
+NAME-$(CONFIG_FILO_STABLE)=STABLE
+
+unexport KCONFIG_AUTOCONFIG
+
+all: filo
+
+checkout:
+ echo " SVN FILO $(NAME-y)"
+ test -d filo || \
+ svn co svn://coreboot.org/filo/trunk/filo $(TAG-y)
+ cd filo; svn update $(TAG-y)
+
+config: libpayload
+ echo " CONFIG FILO $(NAME-y)"
+ $(MAKE) -C filo defconfig
+ echo "CONFIG_COREBOOT=y" >> filo/.config
+ echo "CONFIG_DEBUG_SERIAL=y" >> filo/.config
+ echo "CONFIG_COREBOOT_FLASH=y" >> filo/.config
+ echo "CONFIG_LZMA=y" >> filo/.config
+ echo "CONFIG_FLASH_FLOPPY=y" >> filo/.config
+ echo "CONFIG_VGAHOOKS=y" >> filo/.config
+ # This shows how to force a previously set .config option *off*
+ #echo "# CONFIG_SMBIOS is not set" >> filo/.config
+
+filo: config
+ echo " MAKE FILO $(NAME-y)"
+ $(MAKE) -C filo
+
+libpayload: checkout
+ cd ../../libpayload && $(MAKE) defconfig && \
+ $(MAKE) && $(MAKE) DESTDIR=../external/FILO/filo/build install
+
+clean:
+ test -d filo && $(MAKE) -C filo clean || exit 0
+
+distclean:
+ rm -rf filo
+
+.PHONY: checkout config filo clean distclean
+
diff --git a/src/Kconfig b/src/Kconfig
index ca7b898c4f..b9539d1a1e 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -358,6 +358,15 @@ config PAYLOAD_SEABIOS
See http://coreboot.org/Payloads for more information.
+config PAYLOAD_FILO
+ bool "FILO"
+ help
+ Select this option if you want to build a coreboot image
+ with a FILO payload. If you don't know what this is
+ about, just leave it enabled.
+
+ See http://coreboot.org/Payloads for more information.
+
endchoice
choice
@@ -375,6 +384,21 @@ config SEABIOS_MASTER
Newest SeaBIOS version
endchoice
+choice
+ prompt "FILO version"
+ default FILO_STABLE
+ depends on PAYLOAD_FILO
+
+config FILO_STABLE
+ bool "0.6.0"
+ help
+ Stable FILO version
+config FILO_MASTER
+ bool "HEAD"
+ help
+ Newest FILO version
+endchoice
+
config PAYLOAD_FILE
string "Payload path and filename"
depends on PAYLOAD_ELF
@@ -386,11 +410,15 @@ config PAYLOAD_FILE
depends on PAYLOAD_SEABIOS
default "payloads/external/SeaBIOS/seabios/out/bios.bin.elf"
+config PAYLOAD_FILE
+ depends on PAYLOAD_FILO
+ default "payloads/external/FILO/filo/build/filo.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
+ depends on PAYLOAD_ELF || PAYLOAD_SEABIOS || PAYLOAD_FILO
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 e620e1cd09..bf2393ca55 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -43,6 +43,9 @@ endif
ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
COREBOOT_ROM_DEPENDENCIES+=seabios
endif
+ifeq ($(CONFIG_PAYLOAD_FILO),y)
+COREBOOT_ROM_DEPENDENCIES+=filo
+endif
ifeq ($(CONFIG_AP_CODE_IN_CAR),y)
COREBOOT_ROM_DEPENDENCIES+=$(obj)/coreboot_ap
endif
@@ -58,7 +61,7 @@ prebuild-files = \
$(CBFSTOOL) $@ add $(call extract_nth,1,$(file)) $(call extract_nth,2,$(file)) $(call extract_nth,3,$(file)) $(call extract_nth,4,$(file)); )
prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
-$(obj)/coreboot.pre1: $(obj)/coreboot.bootblock $$(prebuilt-files) $(CBFSTOOL)
+$(obj)/coreboot.pre1: $(obj)/coreboot.bootblock $(prebuilt-files) $(CBFSTOOL)
rm -f $@
$(CBFSTOOL) $@ create $(CONFIG_COREBOOT_ROMSIZE_KB)K $(obj)/coreboot.bootblock
$(prebuild-files)
@@ -86,6 +89,10 @@ ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
@printf " PAYLOAD SeaBIOS (internal, compression: $(CBFS_PAYLOAD_COMPRESS_NAME))\n"
$(CBFSTOOL) $@.tmp add-payload $(CONFIG_PAYLOAD_FILE) $(CONFIG_CBFS_PREFIX)/payload $(CBFS_PAYLOAD_COMPRESS_FLAG)
endif
+ifeq ($(CONFIG_PAYLOAD_FILO),y)
+ @printf " PAYLOAD FILO (internal, compression: $(CBFS_PAYLOAD_COMPRESS_NAME))\n"
+ $(CBFSTOOL) $@.tmp add-payload $(CONFIG_PAYLOAD_FILE) $(CONFIG_CBFS_PREFIX)/payload $(CBFS_PAYLOAD_COMPRESS_FLAG)
+endif
ifeq ($(CONFIG_GEODE_VSA_FILE),y)
@printf " VSA $(CONFIG_VSA_FILENAME)\n"
$(OBJCOPY) --set-start 0x20 --adjust-vma 0x60000 -I binary -O elf32-i386 -B i386 $(CONFIG_VSA_FILENAME) $(obj)/vsa.o
@@ -283,4 +290,11 @@ seabios:
OBJCOPY="$(OBJCOPY)" STRIP="$(STRIP)" \
CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \
CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE)
+filo:
+ $(MAKE) -C payloads/external/FILO -f Makefile.inc \
+ HOSTCC="$(HOSTCC)" \
+ CC="$(CC)" LD="$(LD)" OBJDUMP="$(OBJDUMP)" \
+ OBJCOPY="$(OBJCOPY)" STRIP="$(STRIP)" \
+ CONFIG_FILO_MASTER=$(CONFIG_FILO_MASTER) \
+ CONFIG_FILO_STABLE=$(CONFIG_FILO_STABLE)